Commit Graph

585 Commits

Author SHA1 Message Date
Robin Voetter 4b8325f381 Remove unneeded os check 2019-08-30 13:02:15 +02:00
Robin Voetter c1f8b201a1 Improve comments near un-implemented functionality 2019-08-30 12:58:44 +02:00
Robin Voetter 2323da3a68 add __aeabi_read_tp 2019-08-29 18:12:58 +02:00
Robin Voetter 108a51b110 fix issues with debug.zig
- Use sys_*stat*64 instead of sys_*stat* where appropriate
- Fix overflow when calculating atime, ctime and mtime on File.stat()
- Fix compilation error casting getEndPos to usize.
2019-08-29 10:34:05 +02:00
Robin Voetter b3ac323a44 TLS initialization, clone definition and _start functionality 2019-08-29 01:14:43 +02:00
Robin Voetter 57de61084e Make mmap use SYS_mmap2 if it exists 2019-08-29 00:55:22 +02:00
Robin Voetter 223b773e03 Add more syscall constants 2019-08-29 00:54:57 +02:00
Robin Voetter 50c37c75d1 add arm32 syscall conventions 2019-08-28 17:41:49 +02:00
Robin Voetter 32f4606cec add arm32 linux bits definitions 2019-08-28 16:35:23 +02:00
Andrew Kelley ec7d7a5b14 Merge pull request #2991 from emekoi/mingw-ci
mingw improvements
2019-08-21 12:29:42 -04:00
Andrew Kelley 3dce41b61a improvements to std lib for event-based I/O 2019-08-16 21:29:29 -04:00
Andrew Kelley 7e75e1075e zig fmt 2019-08-15 18:19:04 -04:00
Euan Torano f2bef0447a Remove unneeded casts. 2019-08-07 22:19:25 +01:00
Euan Torano 2d25348f63 Fix function signature and use a loop to ensure buffer is filled. 2019-08-06 19:32:22 +01:00
Euan T 8aa87ec441 Add misisng newline 2019-08-05 09:23:15 -07:00
Euan Torano 0157365872 Add missing S_IS* for NetBSD 2019-08-05 09:23:15 -07:00
emekoi 59e2c87b4b move windows abi detection to get_native_target 2019-08-03 18:40:27 -05:00
emekoi 102d3f30c4 accept unix style paths on windows-gnu 2019-08-02 19:39:33 -05:00
Euan Torano 24fbd1f1d5 Add S_* values for freebsd. 2019-08-02 16:05:03 +01:00
Euan Torano 1583efda69 Fix call to S_ISCHR and implement for Mac 2019-08-02 15:55:56 +01:00
Andrew Kelley bc31c1280e disable segfault handler when panicking
this prevents a segfault in stack trace printing to activate the
segfault handler.
2019-07-22 12:41:59 -04:00
Andrew Kelley eaf545e24c fix build on windows 2019-07-15 19:50:56 -04:00
Andrew Kelley 49d1a4c562 move lib dirs to lib subdir
also start prefering NtDll API. so far:
 * NtQueryInformationFile
 * NtClose

adds a performance workaround for windows unicode conversion. but that
should probably be removed before merging
2019-07-15 17:54:50 -04:00
Andrew Kelley 51a3938b04 fix the build on macos
Stat structs gain methods to abstract over the platform differences with
regards to mtime, ctime, atime.
2019-07-15 12:28:39 -04:00
Andrew Kelley b23ace27db fix the build on windows 2019-07-15 01:45:26 -04:00
Andrew Kelley aa170a7eff implement std.fs.File.updateTimes for windows 2019-07-15 01:45:26 -04:00
Andrew Kelley 6096dc5f94 move some of the installation from cmake to zig build
This moves the installation of shipped source files from large
CMakeLists.txt lists to zig build recursive directory installation.

On my computer a cmake `make install` takes 2.4 seconds even when it has
to do nothing, and prints a lot of unnecessary lines to stdout that say
"up-to-date: [some file it is installing]".

After this commit, the default output of `make` is down to 1
second, and it does not print any junk to stdout. Further, a `make
install` is no longer required and `make` is sufficient.

This closes #2874.

It also closes #2585. `make` now always invokes `zig build` for
installing files and libuserland.a, and zig's own caching system makes
that go fast.
2019-07-15 01:45:26 -04:00
daurnimator 52f0300505 std: add new linux 5.2 constants 2019-07-12 11:52:32 -04:00
Andrew Kelley 1d2fc446bd cap getdents length argument to INT_MAX
the linux syscall treats this argument as having type int, so passing
extremely long buffer sizes would be misinterpreted by the kernel.
since "short reads" are always acceptable, just cap it down.

patch based on musl commit 3d178a7e2b75066593fbd5705742c5808395d90d
2019-07-08 17:52:28 -04:00
daurnimator e197968734 std: Make linux MAP_ definitions match kernel 2019-07-07 14:31:27 +10:00
daurnimator 7610d39413 std: Linux AT_ constants are the same across architectures 2019-07-07 14:11:43 +10:00
Andrew Kelley 3ad9349f09 add std.os.windows.subsystem
The original issue that #2445 wanted to fix was solved in the previous
commit. However it also exposed the subsystem in the standard library,
which is still useful. So that's done in this commit, and #2445 can be
closed.
2019-07-05 14:08:56 -04:00
emekoi 53ca4118bd added segfault handler support for windows 2019-07-03 14:02:48 -04:00
emekoi 9d42a40a9f return FileNotFound for PATH_NOT_FOUND in DeleteFileW 2019-07-02 14:49:48 -04:00
Andrew Kelley 1a1598c58c stack traces on segfault by default for linux-x86_64
closes #2355
2019-07-02 13:41:16 -04:00
Andrew Kelley 5cd4753bea add missing error code for DeleteFileW 2019-06-26 14:32:19 -04:00
Jonathan Marler c7bcf1a447 Fix windows create process retry/path search 2019-06-18 13:19:06 -04:00
daurnimator 4565f50efe std: add linux kernel definitions for io_uring 2019-06-10 14:40:54 +10:00
daurnimator ae604b4464 std: add linux kernel_rwf type and preadv2+pwritev2 2019-06-10 14:40:54 +10:00
Andrew Kelley b735764898 different array literal syntax when inferring the size
old syntax:  []i32{1, 2, 3}
new syntax: [_]i32{1, 2, 3}

closes #1797
2019-06-09 19:26:32 -04:00
emekoi 26613bfa01 switched to fixed-length buffer for error messages 2019-06-05 17:34:58 -05:00
emekoi 0288034c2f fixed mismatched types 2019-06-05 15:30:01 -05:00
emekoi 0aabfb09f9 removed duplicate definitions 2019-06-05 14:57:20 -05:00
emekoi b74bcc9d76 windows.unexpectedError prints a human friendly string 2019-06-05 14:42:36 -05:00
LemonBoy 46cbed621b Move dl_iterate_phdr to os.zig 2019-05-31 11:59:53 +02:00
LemonBoy 51fc375b0d Correct flag definitions for arm64 2019-05-30 17:05:39 +02:00
LemonBoy 477ee9c8b9 Fix some syscalls on arm64 2019-05-30 16:28:33 +02:00
Andrew Kelley c66a747045 Merge pull request #2546 from LemonBoy/sigaltstack
Add sigaltstack syscall for Linux
2019-05-29 19:38:01 -04:00
Andrew Kelley bfc86776d5 run zig fmt to update use to usingnamespace 2019-05-29 19:09:58 -04:00
LemonBoy 399e026cc0 Add sigaltstack wrapper in os.zig 2019-05-29 22:38:14 +02:00