Andrew Kelley
832caefc2a
fix regressions
2018-09-02 18:35:32 -04:00
Andrew Kelley
98dc943c07
rework code to avoid duplicate operations
2018-09-02 15:58:08 -04:00
Andrew Kelley
686663239a
printing info from the ModuleInfo substream of DebugInfo
2018-08-29 19:00:24 -04:00
Andrew Kelley
f1b71053de
use RtlCaptureStackBackTrace on windows
2018-08-29 16:35:51 -04:00
Andrew Kelley
41723f842c
Merge branch 'windows-coff-issue721' of https://github.com/Sahnvour/zig into Sahnvour-windows-coff-issue721
2018-08-28 17:32:32 -04:00
Andrew Kelley
fb6d3859e8
zig fmt
2018-08-27 19:25:40 -04:00
Andrew Kelley
ac36f98e72
fix stack traces on linux
2018-08-25 03:07:37 -04:00
Andrew Kelley
478db39866
fix selfExePath on macosx
2018-08-21 20:52:21 -04:00
Andrew Kelley
ea1b21dbdb
fix linux
...
* error.BadFd is not a valid error code. it would always be a bug to
get this error code.
* merge error.Io with existing error.InputOutput
* merge error.PathNotFound with existing error.FileNotFound.
Not all OS's support both.
* add os.File.openReadC
* add error.BadPathName for windows file operations with invalid
characters
* add os.toPosixPath to help stack allocate a null terminating byte
* add some TODOs for other functions to investigate removing the
allocator requirement
* optimize some implementations to use the alternate functions when
a null byte is already available
* add a missing error.SkipZigTest
* os.selfExePath uses a non-allocating API
* os.selfExeDirPath uses a non-allocating API
* os.path.real uses a non-allocating API
* add os.path.realAlloc and os.path.realC
* convert many windows syscalls to use the W versions (See #534 )
2018-08-21 20:31:50 -04:00
Andrew Kelley
51852d2587
fix windows
2018-08-21 16:07:28 -04:00
Andrew Kelley
bda5539e9d
*WIP* std.os assumes comptime-known max path size
...
this allows us to remove the requirement of allocators for a lot
of functions
See #1392
2018-08-21 00:46:42 -04:00
Andrew Kelley
302936309a
Merge branch 'path_max' of https://github.com/shawnl/zig into shawnl-path_max
2018-08-20 17:57:49 -04:00
Andrew Kelley
9e9dce76ff
refactor std.os.makePath to use a switch instead of if
2018-08-20 17:57:03 -04:00
Shawn Landden
bb93886791
do not use an allocator when we don't need to because of the existance of PATH_MAX
2018-08-19 21:42:48 -07:00
Andrew Kelley
c4b9466da7
Merge pull request #1294 from ziglang/async-fs
...
introduce std.event.fs for async file system functions
2018-08-10 15:51:17 -04:00
Andrew Kelley
598e80957e
windows: call CancelIo when canceling an fs watch
2018-08-10 13:19:07 -04:00
Andrew Kelley
23af36c54f
windows fs watching: fix not initializing table value
2018-08-09 21:48:25 -04:00
Andrew Kelley
26a842c264
windows: only create io completion port once
2018-08-09 20:12:46 -04:00
Andrew Kelley
b219feb3f1
initial windows implementation of std.event.fs.Watch
2018-08-09 16:48:44 -04:00
Andrew Kelley
c63ec9886a
std.event.fs.preadv windows implementation
2018-08-08 16:55:19 -04:00
Andrew Kelley
8b456927be
std.event.fs.pwritev windows implementation
...
also fix 2 bugs where the function didn't call allocator.shrink:
* std.mem.join
* std.os.path.resolve
2018-08-08 15:06:32 -04:00
Andrew Kelley
fd50a6896b
std.event.fs support for macos
...
The file I/O stuff is working, but the fs watching
stuff is not yet.
2018-08-07 00:49:09 -04:00
Andrew Kelley
2c9ed664dd
merge @kristate's std lib changes to darwin
2018-08-06 19:36:31 -04:00
Andrew Kelley
24d74cbf44
fix Thread impl on Linux and add docs
2018-08-06 17:31:52 -04:00
Andrew Kelley
d2dd29e80c
separate os.Thread.Id and os.Thread.Handle because of windows
2018-08-06 17:25:24 -04:00
Andrew Kelley
0a3ae9dc6e
fix std.os.Thread.getCurrentId for linux
2018-08-06 16:48:49 -04:00
Andrew Kelley
647fd0f4f1
Merge branch 'threadid' of https://github.com/mdsteele/zig into mdsteele-threadid
2018-08-06 16:12:37 -04:00
Andrea Orru
79d77faebf
More type cast fixes
2018-08-06 02:42:12 -04:00
Andrea Orru
641066d82e
Fix casts
2018-08-06 02:29:11 -04:00
Andrea Orru
d2f5e57b68
Merge branch 'master' into zen_stdlib
2018-08-06 01:43:19 -04:00
Matthew D. Steele
7a2401ef1e
Don't compare ?Thread.Id == Thread.Id in the test
...
It doesn't work, because of issue #1332 .
2018-08-04 21:47:13 -04:00
kristopher tate
a25824e033
zig/std/os/index.zig: clean-up thread id; ( #1 )
...
Ref #1316 #1330
2018-08-04 14:38:51 -04:00
Matthew D. Steele
86d1cc8e2f
Add thread ID support to std.os.Thread ( fixes #1316 )
2018-08-03 21:36:04 -04:00
Andrew Kelley
2680f9ab48
Merge remote-tracking branch 'origin/master' into async-fs
2018-08-03 18:47:30 -04:00
Matthew D. Steele
dcaaa241df
Fix a type error in std.os.linux.getpid() ( #1326 )
...
syscall0() returns usize, but we were trying to @bitCast to i32.
2018-08-03 11:45:23 -04:00
Andrew Kelley
65140b2fba
Merge remote-tracking branch 'origin/master' into async-fs
2018-08-02 17:29:31 -04:00
Andrew Kelley
729f2aceb0
fix API of RtlGenRandom
2018-08-02 13:34:31 -04:00
Andrew Kelley
cbca434cf0
Merge branch 'windows-RtlGenRandom-issue1318' of https://github.com/kristate/zig into pr-1319
2018-08-02 13:26:02 -04:00
kristopher tate
782043e2e6
std/os/windows/util.zig: SKIP instead of PASS on non-windows systems;
...
Tracking Issue #1318 ;
2018-08-03 02:16:49 +09:00
kristopher tate
dde7eb45c5
std/os/index.zig: call getRandomBytes() twice and compare;
...
Tracking Issue #1318 ;
2018-08-03 02:16:19 +09:00
kristopher tate
c44653f40f
std/os/index.zig: swap CryptGetRandom() with RtlGenRandom();
...
Tracking Issue #1318 ;
2018-08-03 02:14:52 +09:00
kristopher tate
22fd359e2c
std/os/windows/advapi32.zig: add SystemFunction036;
...
Tracking Issue #1318 ;
2018-08-03 02:14:06 +09:00
kristopher tate
432b7685bf
std/os/index.zig: use "hw.logicalcpu" instead of "hw.ncpu" in macOS; ( #1317 )
...
Tracking Issue #1252 ;
hw.ncpu was deprecated in macOS. Among 4 new options available (hw.{physicalcpu, physicalcpu_max, logicalcpu, logicalcpu_max}), hw.logicalcpu was chosen because it actually reflects the number of logical cores the OS sees.
2018-08-02 12:59:59 -04:00
Andrew Kelley
3c8d4e04ea
std: file system watching for linux
2018-07-30 13:46:09 -04:00
Andrew Kelley
cc45527333
introduce std.event.fs for async file system functions
...
only works on linux so far
2018-07-30 13:44:36 -04:00
Andrew Kelley
72599d420b
self-hosted: find all libc paths; windows linker code
2018-07-24 00:06:34 -04:00
Andrew Kelley
5a919dd82d
Merge remote-tracking branch 'origin/master' into self-hosted-libc-hello-world
2018-07-23 14:32:13 -04:00
Andrew Kelley
d767fae47e
self-hosted: add first compare-output test
2018-07-23 00:35:53 -04:00
Andrew Kelley
20f286f22a
re-organize std lib darwin files
2018-07-22 00:04:24 -04:00
Sahnvour
2ec9a11646
Very much WIP base implementation for #721 .
...
Currently does:
- read COFF executable file
- locate and load corresponding .pdb file
- expose .pdb content as streams (PDB format)
2018-07-21 20:30:11 +02:00