27 Commits

Author SHA1 Message Date
Andrew Kelley
b7be57766b
Merge pull request #3715 from daurnimator/towards-afd
Misc windows additions+fixes
2019-12-02 16:12:55 -05:00
Andrew Kelley
d87b13f2f7
fix windows std lib regressions 2019-11-29 21:55:27 -05:00
daurnimator
254c79125b
std: fix WSAIoctl definition
zig automatically passes functions as pointers
2019-11-27 13:01:28 +11:00
daurnimator
2c6788d7de
std: add windows.closesocket 2019-11-27 13:01:07 +11:00
daurnimator
6b5b0e6cd6
std: fix windows.GetOverlappedResult 2019-11-27 13:01:05 +11:00
daurnimator
ce9966a39b
std: improved windows.DeviceIoControl 2019-11-27 13:01:04 +11:00
daurnimator
b05a5a3e52
std: add CreateEvent for windows 2019-11-27 13:01:03 +11:00
daurnimator
78c0d33eb7
std: add WaitForMultipleObjects for windows 2019-11-27 13:01:02 +11:00
daurnimator
21ca54f560
std: add alertable argument for windows.WaitForSingleObject 2019-11-27 13:00:59 +11:00
Andrew Kelley
bdf3680be1
zig fmt 2019-11-25 13:53:13 -05:00
Andrew Kelley
d2cb740dd9 add missing null terminator in windows file path helper function 2019-11-25 01:10:30 -05:00
Andrew Kelley
29e438fd1f
more sentinel-terminated pointers std lib integration
See #3767
2019-11-25 00:43:36 -05:00
Andrew Kelley
bf1cbebea1 improve std.fs.selfExePath and related functions on Windows 2019-11-21 18:51:12 -05:00
daurnimator
431eeb5e20
std: add pieces for WSAIoctl on windows 2019-11-15 10:31:52 +11:00
daurnimator
6469900e79
std: add WSAStartup and WSACleanup for windows 2019-11-15 10:31:47 +11:00
daurnimator
4cf535a01b
std: add WSASocketW for windows 2019-11-14 17:09:22 +11:00
daurnimator
d9d3268cc1
std: add DeviceIoControl and GetOverlappedResult for windows 2019-11-14 17:09:21 +11:00
daurnimator
f4c6cc3270
std: add winsock some definitions 2019-11-14 17:09:19 +11:00
Andrew Kelley
3cf5c2c62b
fix regressed tests and update docs to use "type coercion" 2019-11-08 15:57:25 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as 2019-11-08 15:57:24 -05:00
Andrew Kelley
60cd11bd4b
get rid of std.os.foo.is_the_target
It had the downside of running all the comptime blocks and resolving
all the usingnamespaces of each system, when just trying to discover if
the current system is a particular one.

For Darwin, where it's nice to use `std.Target.current.isDarwin()`, this
demonstrates the utility that #425 would provide.
2019-10-24 01:14:52 -04:00
Andrew Kelley
17eb24a7e4
move types from builtin to std
* All the data types from `@import("builtin")` are moved to
  `@import("std").builtin`. The target-related types are moved
  to `std.Target`. This allows the data types to have methods, such as
  `std.Target.current.isDarwin()`.
 * `std.os.windows.subsystem` is moved to
   `std.Target.current.subsystem`.
 * Remove the concept of the panic package from the compiler
   implementation. Instead, `std.builtin.panic` is always the panic
   function. It checks for `@hasDecl(@import("root"), "panic")`,
   or else provides a default implementation.

This is an important step for multibuilds (#3028). Without this change,
the types inside the builtin namespace look like different types, when
trying to merge builds with different target settings. With this change,
Zig can figure out that, e.g., `std.builtin.Os` (the enum type) from one
compilation and `std.builtin.Os` from another compilation are the same
type, even if the target OS value differs.
2019-10-23 19:09:49 -04:00
Andrew Kelley
e839250c51
Merge branch 'stratact-no-dir-allocators'
closes #2885
closes #2886
closes #2888
closes #3249
2019-10-21 23:54:29 -04:00
Andrew Kelley
87f632b08a fs.Dir.openDir: use empty object name for "." on Windows 2019-10-21 19:19:49 -04:00
Andrew Kelley
ef67c49785
[wip] use NtDll APIs on Windows to implement std.fs.Dir 2019-10-21 14:18:01 -04:00
Nick Erdmann
8774b1d947
std/os/windows: remove subsystem detection for uefi 2019-10-18 19:49:02 +02:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00