Commit Graph

8027 Commits

Author SHA1 Message Date
Andrew Kelley
3ff2381042
update glibc source files to 2.31
This is mostly minor modifications to license text.
2020-03-04 14:59:09 -05:00
pfg
e3b37fc9c1 Generated documentation mobile support 2020-03-04 10:47:21 -05:00
Timon Kruiper
e095475d92 Fix docs generation
Commit edb210905d caused the docs generation
to fail, because all the type information in pass1 was already freed in
`zig_llvm_emit_output`.
2020-03-04 09:59:21 -05:00
Andrew Kelley
1cf3209cb8
Merge pull request #4623 from ziglang/update-glibc
Update glibc to 2.31
Closes #4459.
2020-03-04 09:01:19 -05:00
Andrew Kelley
447a89cd4d
update self-hosted zig targets to print correct glibc availability 2020-03-04 01:05:42 -05:00
Andrew Kelley
b21d44f26a
update glibc abilists for 2.31 2020-03-04 00:07:15 -05:00
Andrew Kelley
cd33c5bfe8
zig build: update InstallRawStep to new std.fs API
closes #4622
2020-03-04 00:00:42 -05:00
Andrew Kelley
74fef9db6e
update update_glibc tool to latest zig 2020-03-03 22:52:03 -05:00
Andrew Kelley
67480cd515
update glibc headers to 2.31 2020-03-03 22:46:57 -05:00
Andrew Kelley
3841acf7ef
update process_headers tool to latest zig 2020-03-03 22:40:41 -05:00
Andrew Kelley
8aaab75af0
docs: remove reference to deprecated builtins
closes #3959
2020-03-03 22:14:29 -05:00
Andrew Kelley
c0c9303bd6
put FreeBSD CI in timeout for misbehavior
FreeBSD is dealing with some weird upstream bug right now. We can try to
re-enable this when it is fixed.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244549

very naughty
2020-03-03 21:32:01 -05:00
Andrew Kelley
3b235cfa80
std.zig.CrossTarget: fix compile errors
closes #4620
2020-03-03 21:09:32 -05:00
Andrew Kelley
f6f0b019be
Merge pull request #4618 from ziglang/daurnimator-paths
improvements to std.fs, std.os
2020-03-03 17:05:14 -05:00
Andrew Kelley
1141bfb21b Darwin can return EBADF for sendfile on non-files 2020-03-03 16:52:32 -05:00
Andrew Kelley
c4f81586f1
update docgen to new std.fs API 2020-03-03 16:01:09 -05:00
Andrew Kelley
55dfedff42
update cli test to new std.fs API 2020-03-03 15:58:14 -05:00
Andrew Kelley
4a67dd04c9
breaking changes to std.fs, std.os
* improve `std.fs.AtomicFile` to use sendfile()
   - also fix AtomicFile cleanup not destroying tmp files under some
     error conditions
 * improve `std.fs.updateFile` to take advantage of the new `makePath`
   which no longer needs an Allocator.
 * rename std.fs.makeDir to std.fs.makeDirAbsolute
 * rename std.fs.Dir.makeDirC to std.fs.Dir.makeDirZ
 * add std.fs.Dir.makeDirW and provide Windows implementation of
   std.os.mkdirat. std.os.windows.CreateDirectory is now implemented
   by calling ntdll, supports an optional root directory handle,
   and returns an open directory handle. Its error set has a few more
   errors in it.
 * rename std.fs.Dir.changeTo to std.fs.Dir.setAsCwd
 * fix std.fs.File.writevAll and related functions when len 0 iovecs
   supplied.
 * introduce `std.fs.File.writeFileAll`, exposing a convenient
   cross-platform API on top of sendfile().
 * `NoDevice` added to std.os.MakeDirError error set.
 * std.os.fchdir gets a smaller error set.
 * std.os.windows.CloseHandle is implemented with ntdll call rather than
   kernel32.
2020-03-03 15:23:27 -05:00
daurnimator
1ca5f06762
Update callers of fs.makePath 2020-03-03 13:25:43 -05:00
daurnimator
695b0976c3
std: move makePath to be a Dir method 2020-03-03 13:25:43 -05:00
daurnimator
a19a30bb17
std: move null byte check into toPosixPath
Note that windows NT paths *can* contain nulls
2020-03-03 13:25:43 -05:00
daurnimator
d8f966a04b
std: fix fs.makePath
The previous behaviour of using path.resolve has unexpected behaviour around symlinks.
This more simple implementation is more correct and doesn't require an allocator
2020-03-03 13:25:43 -05:00
daurnimator
bfc569bc98
std: add os.fstatat 2020-03-03 13:25:43 -05:00
daurnimator
627618a38d
std: add Dir.changeDir as wrapper around fchdir 2020-03-03 13:25:43 -05:00
daurnimator
dfb420e6d7
std: add fs.Dir.makeDir 2020-03-03 13:25:43 -05:00
daurnimator
88e27f01c8
std: add mkdirat 2020-03-03 13:25:40 -05:00
Andrew Kelley
582db68a15
remove superfluous comptime keyword 2020-03-03 12:01:17 -05:00
LemonBoy
a6fb6dcfc9 linux: Correct pread64 syscall for ARM/MIPS
Closes #4615
2020-03-03 11:59:16 -05:00
Andrew Kelley
226b801830
Merge pull request #4612 from ziglang/os-read-write-sendfile
std.os read/write functions + sendfile
2020-03-03 10:15:37 -05:00
Andrew Kelley
9d6cc75ce3
disable sendfile test on mips 2020-03-03 09:49:46 -05:00
Andrew Kelley
387418277a
Merge pull request #4601 from alexnask/fix_3997
Allow wrapping in VDSO lookup
2020-03-03 09:15:40 -05:00
Alexandros Naskos
7559418305 Added comment justifying wrapping operations 2020-03-03 12:41:11 +02:00
Andrew Kelley
a66c72749a more macos fixes 2020-03-03 03:10:56 -05:00
Ryan Liptak
d7579a2fcb Fix std.os.unlinkatW for absolute paths
RootDirectory can't be set in ObjectAttributes if ObjectName is an absolute path.

Fixes #4606
2020-03-03 03:07:12 -05:00
Andrew Kelley
859fc856d3
fix macosx and freebsd build failures 2020-03-03 02:57:11 -05:00
Andrew Kelley
c81345c8ae
breaking: std.os read/write functions + sendfile
* rework os.sendfile and add macosx support, and a fallback
   implementation for any OS.
 * fix sendto compile error
 * std.os write functions support partial writes. closes #3443.
 * std.os pread / pwrite functions can now return `error.Unseekable`.
 * std.fs.File read/write functions now have readAll/writeAll variants
   which loop to complete operations even when partial reads/writes
   happen.
 * Audit std.os read/write functions with respect to Linux returning
   EINVAL for lengths greater than 0x7fff0000.
 * std.os read/write shim functions do not unnecessarily loop. Since
   partial reads/writes are part of the API, the caller will be forced
   to loop anyway, and so that would just be code bloat.
 * Improve doc comments
 * Add a non-trivial test for std.os.sendfile
 * Fix std.os.pread on 32 bit Linux
 * Add missing SYS_sendfile bit on aarch64
2020-03-03 02:25:26 -05:00
Terin Stock
bd287dd194
std: implement sendfile on linux
This changset adds a `sendfile(2)` syscall bindings to the linux bits
component. Where available, the `sendfile64(2)` syscall will be
transparently called.

A wrapping function has also been added to the std.os to transform
errno returns to Zig errors.

Change-Id: I86769fc4382c0771e3656e7b21137bafd99a4411
2020-03-02 12:54:50 -05:00
Alexandros Naskos
a48cd1cf58 Allow wrapping in VDSO lookup 2020-03-02 11:44:21 +02:00
xackus
00be934569 short std.builtin enum literals in std lib 2020-03-01 13:57:41 -05:00
Andrew Kelley
3c14327011
Merge branch 'daurnimator-fmt-sentinel-pointers'
closes #3972
2020-03-01 13:53:13 -05:00
Andrew Kelley
ef3d761da5
breaking: std.mem.len no longer takes a type argument
also update fmt code to use std.mem.span.
2020-03-01 13:21:39 -05:00
Andrew Kelley
5b26128bac
add new functions to std.mem and deprecate others
add std.mem.Span
add std.mem.span
add std.mem.length
add std.mem.indexOfSentinel

deprecate std.mem.len
deprecate std.mem.toSlice
deprecate std.mem.toSliceConst
2020-03-01 13:07:55 -05:00
Andrew Kelley
4505857e30
revert changes outside std.fmt 2020-03-01 13:07:31 -05:00
daurnimator
0b0de22fd1
std: format contents of sentinel terminated many pointers
std: add std.meta.Sentinel to get sentinel of a type
2020-03-01 13:04:29 -05:00
Andrew Kelley
b99c6d56da
stage1: fix compilation on 32-bit arm 2020-03-01 03:27:09 -05:00
Andrew Kelley
ae99fabfe4
Merge pull request #4585 from LemonBoy/fix-4581
target: Implement OS version detection for Windows
2020-03-01 02:53:51 -05:00
Andrew Kelley
f082e253b5 fix native OS version detection on macOS
closes #4583
2020-03-01 01:17:50 -05:00
Andrew Kelley
2246812184
use an explicit error set to fix a compilation error
this function has conditionally compiled out code in it about looking
for native glibc.
2020-02-29 22:20:44 -05:00
Andrew Kelley
6fcf6716be
std.Thread.cpuCount on Windows uses the PEB
rather than calling GetSystemInfo from kernel32.dll. Also remove
OutOfMemory from the error set.
2020-02-29 22:13:09 -05:00
Andrew Kelley
d951e0402a
Merge pull request #4586 from daurnimator/windows-PEB
Fill out windows PEB definition
2020-02-29 22:05:56 -05:00