Commit Graph

125 Commits (69b90e0681bb42980eeb8364e50686a1f9702eb5)

Author SHA1 Message Date
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
Andrew Kelley bfc86776d5
run zig fmt to update `use` to `usingnamespace` 2019-05-29 19:09:58 -04:00
Andrew Kelley 6be79d79aa
fixes for Windows and WASI 2019-05-27 00:48:56 -04:00
Andrew Kelley 3d61e42282
rename "posix" to "bits" 2019-05-26 18:32:44 -04:00
Andrew Kelley 2def23063f
more progress. moving windows API layer to its own file 2019-05-26 18:32:44 -04:00
Andrew Kelley daae7e1f5a
more progress on posix API layer
see #2380
2019-05-26 18:32:43 -04:00
Andrew Kelley 67726e36b0
extract posix functions from std/os.zig to std/os/posix.zig
See #2380
2019-05-26 18:32:40 -04:00
Andrew Kelley c1793d6106
zig fmt on the standard library 2019-05-12 12:56:01 -04:00
Sahnvour a2d5b0fabe Implement Windows' DirectAllocator on top of VirtualAlloc and VirtualFree. 2019-05-11 16:41:13 +02:00
Andrew Kelley 01fb421031 fix regressions on Windows from previous commit 2019-03-15 18:57:07 -04:00
Andrew Kelley 5046aa9403 fix running things with zig build on Windows
Windows doesn't have rpaths for DLLs so we instead add
search paths to Path environment variable when running
an executable that depends on DLLs built with zig build.
2019-03-09 00:42:14 -05:00
Andrew Kelley e402455704
rename std lib files to new convention 2019-03-02 16:46:04 -05:00
Andrew Kelley 67b4de33d2
compile error for import outside package path
closes #2024

there's a new cli option `--main-pkg-path` which you can use to choose
a different root package directory besides the one inferred from the
root source file

and a corresponding build.zig API:
foo.setMainPkgPath(path)
2019-03-02 10:38:27 -05:00
Andrew Kelley 89ffb58197 implement Thread Local Storage on Windows 2019-02-06 18:32:41 -05:00
Andrew Kelley bfc1772d8e fixups 2019-02-01 12:22:21 -05:00
emekoi 3ff9ab332c fixed type signature 2019-01-11 09:56:37 -06:00
emekoi 51fff9fa82 fixed initializer and typos 2019-01-11 09:56:36 -06:00
emekoi 35d93d22db removed nullables 2019-01-11 09:56:36 -06:00
emekoi 9385127052 changed pointer types 2019-01-11 09:56:35 -06:00
emekoi bb31695fbf fixed mutex on windows 2019-01-11 09:56:35 -06:00
emekoi 207fa3849c moved to InitializeCriticalSection to init 2019-01-11 09:56:34 -06:00
emekoi 25d7f5b654 switching back to EnterCriticalSection 2019-01-11 09:56:34 -06:00
emekoi aaae2f5705 switching from EnterCriticalSection to TryEnterCriticalSection 2019-01-11 09:56:33 -06:00
emekoi b61bce254c added mutex for windows 2019-01-11 09:56:32 -06:00
Suirad 5dfca87a65 Update windows imports 2018-11-30 02:08:33 -06:00
Jimmi Holst Christensen 8139c5a516
New Zig formal grammar (#1685)
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00
emekoi 8e69a18d8c made colored output more consistent (#1706)
* made colored output more consistent
* added os.supportsAnsiEscapeCodes
2018-11-08 00:36:36 -05:00
Andrew Kelley 2b395d4ede
remove @minValue,@maxValue; add std.math.minInt,maxInt
closes #1466
closes #1476
2018-10-26 15:01:51 -04:00
Jimmi Holst Christensen 65b7d85524 Fixed code still using old ptr syntax 2018-10-20 17:59:06 +02:00
Jimmi Holst Christensen 378d3e4403
Solve the return type ambiguity (#1628)
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
emekoi 31469daca3 removed unneeded dll extension 2018-10-04 11:43:53 -04:00
Andrew Kelley d1ec8377d1
std lib: flesh out the async I/O streaming API a bit 2018-10-01 10:53:39 -04:00
emekoi 623f5085f1 merged windows dll apis 2018-09-30 01:05:13 -05:00
emekoi d3bf267136 added dynamic library loading for windows 2018-09-30 01:05:13 -05:00
Andrew Kelley 15e59eb142
remove deprecated, unused windows functions
* `CryptAcquireContextA`
 * `CryptReleaseContext`
 * `CryptGenRandom`

See https://github.com/ziglang/zig/issues/534#issuecomment-422208368
2018-09-17 20:07:48 -04:00
Andrew Kelley a757533386 fix zig fmt on windows
closes #1069
2018-09-12 14:26:21 -04:00
emekoi 54f7d58722 fixed WriteFile segfault 2018-09-12 07:01:48 -05:00
Andrew Kelley 92f7474359 switch most windows calls to use W versions instead of A
See #534
2018-09-02 23:25:04 -04:00
Andrew Kelley 98dc943c07 rework code to avoid duplicate operations 2018-09-02 15:58:08 -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 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 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