Andrew Kelley
9ea4965ceb
self-hosted: remove deleted Decls from failed_decls
2020-06-08 15:16:40 -04:00
Andrew Kelley
91930a4ff0
stage2: fix not re-loading source file for updates after errors
2020-06-08 15:16:40 -04:00
Andrew Kelley
cf654b52d6
stage2: -femit-zir respects decl names and supports cycles
2020-06-08 15:16:40 -04:00
Andrew Kelley
d4d954abd2
std.sort: give comparator functions a context parameter
2020-06-08 15:16:40 -04:00
Noam Preil
c405844b0a
[Stage2/x86] Fix 8-bit register order
2020-06-08 02:28:39 -04:00
Andrew Kelley
37695ed81e
Merge pull request #5556 from iansimonson/try_other_addresses
...
tcpConnectToHost try all addresses in AddressList
2020-06-07 13:53:12 -04:00
Ian Simonson
a6d1ef64d7
tcpConnectToHost try all addresses in AddressList
...
The AddressList returned can contain more than one item
e.g. the ipv4 and ipv6 addresses for a given hostname.
Previously if a server had multiple addresses but
was not listening on one of them Zig would give up
immediately.
Now on std.os.ConnectError.ConnectionRefused Zig will
try the next address in the list. Zig still gives up on
all other errors as they are related to the system and
system resources rather than whether the remote server
is listening on a particular address.
2020-06-07 22:39:35 +10:00
Ian Simonson
983f93c840
Test case for tcpConnectToHost fix
2020-06-07 22:39:35 +10:00
Veikka Tuominen
499df9680c
Merge pull request #5531 from Vexu/translate-c
...
Translate-c don't crash on complex switches
2020-06-05 10:41:56 +03:00
Michael Dusan
c0c9d11d8c
stage1: fix constness in some corner cases
...
- for one-possible-value types, ir_analyze_struct_field_ptr()
no longer hardcodes const/volatile
- when slicing arrays, ir_analyze_instruction_slice()
no longer consults ConstValSpecialStatic
closes #5474
2020-06-05 00:49:57 -04:00
Ryan Liptak
f839d34baa
std.os.windows.OpenFile: Handle FILE_IS_A_DIRECTORY status
...
Fixes #5533
2020-06-04 22:53:23 -04:00
Ryan Liptak
95a5f6bf2d
Windows: Handle ERROR_DIRECTORY in std.fs.deleteDirAbsolute when called on a file path
...
ERROR_DIRECTORY (267) is returned from kernel32.RemoveDirectoryW if the path is not a directory. Note also that os.DirectDirError already includes NotDir
Before: error.Unexpected: GetLastError(267): The directory name is invalid.
After: error: NotDir
2020-06-04 22:52:53 -04:00
Ryan Liptak
f7b6957fb4
Windows: Fix std.fs.Dir.deleteDir() deleting files
...
Would previously delete files, now correctly returns error.NotDir. Fixes #5536
2020-06-04 22:51:58 -04:00
Vexu
c27a8bd6be
translate-c: don't crash on complex switches
2020-06-04 14:22:27 +03:00
Vexu
fd067fbe8b
add workaround for #5525
2020-06-04 13:11:23 +03:00
Andrew Kelley
6524a64bda
stage2: fix referencing decls which appear later in the file
2020-06-02 17:43:51 -04:00
Andrew Kelley
14d235dd6e
Merge branch 'lun-4-resolve-ip6'
...
closes #4864
2020-06-02 15:31:14 -04:00
Andrew Kelley
7fd937fef4
cleanups
...
* improve docs
* add TODO comments for things that don't have open issues
* remove redundant namespacing of struct fields
* guard against ioctl returning EINTR
* remove the general std.os.ioctl function in favor of the specific
ioctl_SIOCGIFINDEX function. This allows us to have a more precise
error set, and more type-safe API.
2020-06-02 15:28:46 -04:00
Luna
0d091dc923
Replace os.linux to os.system
2020-06-02 14:56:19 -04:00
Luna
6623efd7d4
Change ioctl's request type to i32
2020-06-02 14:56:19 -04:00
Luna
6d3d1152ea
Add declaration for libc ioctl
2020-06-02 14:56:19 -04:00
Luna
7c71054286
Replace syscall3 to os.ioctl
2020-06-02 14:56:19 -04:00
Luna
09c01ea7b9
Use resolveIp when looking up addresses on linux
2020-06-02 14:56:19 -04:00
Luna
c8468bed42
Add std.os.ioctl
2020-06-02 14:56:19 -04:00
Luna
c7b790ded6
net.test: only call resolveIp6 when os is linux
2020-06-02 14:56:06 -04:00
Luna
15efe03d1f
Add tests for overflow
2020-06-02 14:56:06 -04:00
Luna
b72c862725
Use IFNAMESIZE for scope id value
2020-06-02 14:56:06 -04:00
Luna
aebf28eba3
Make ifru fields sentinel-terminated
2020-06-02 14:56:06 -04:00
Luna
c60daa255f
Replace C types in declarations
2020-06-02 14:56:06 -04:00
Luna
2fa9cf51ff
Plug resolveIp6 into IPv6 tests
2020-06-02 14:56:06 -04:00
Luna
64e55a74de
Add validation for scope ids
2020-06-02 14:56:06 -04:00
Luna
10ea2db5cb
Replace C shorts by integer types
2020-06-02 14:56:06 -04:00
Luna
11a06d4341
Remove warn() calls
2020-06-02 14:56:06 -04:00
Luna
cb649b769c
Fix ifreq definition
2020-06-02 14:56:06 -04:00
Luna
c50ac9a764
Change Unsupported to InterfaceNotFound
2020-06-02 14:56:06 -04:00
Luna
38109d48a3
Make interface name null-terminated before syscall
2020-06-02 14:56:06 -04:00
Luna
5919831529
Stop using mem.len on array
2020-06-02 14:56:06 -04:00
Luna
901aab8761
Add ioctl errors
2020-06-02 14:56:06 -04:00
Luna
2c641c93da
Only resolve scope id when needed
2020-06-02 14:56:06 -04:00
Luna
f02f4c0880
Fix typo and add if_nametoindex
2020-06-02 14:56:06 -04:00
Luna
9c200035f3
Add some interface structs to linux bits
2020-06-02 14:56:06 -04:00
Luna
b816303122
Add basics of resolveIp6
...
Instead of streaming the scope id digits to an u32, we keep a [32]u8 in
the stack and fill it up with the characters we get for scope id.
2020-06-02 14:56:05 -04:00
Andrew Kelley
bae0c9b554
std.HashMap: allow ensureCapacity with a zero parameter
2020-06-02 14:41:45 -04:00
Veikka Tuominen
40a1cfed53
Merge pull request #5510 from jessrud/arraylist-fix
...
pass allocator to self.resize() in appendNTimes()
2020-06-02 18:13:55 +03:00
Jesse Rudolph
100aa6fbaf
pass allocator to self.resize() in appendNTimes()
2020-06-02 09:59:13 -05:00
Alexandros Naskos
aa1a727284
Allow carriare return in comments
2020-06-02 00:56:05 -04:00
Andrew Kelley
c6764fd254
Merge pull request #5475 from marler8997/windowsDns
...
support name resolution on windows
2020-06-01 15:33:05 -04:00
Andrew Kelley
8f4bc77260
Merge pull request #5449 from data-man/more_traits
...
Add more traits
2020-06-01 14:50:01 -04:00
Andrew Kelley
f9b220ec2c
Merge branch 'brodeuralexis-zero-init-helper'
...
closes #5472
2020-06-01 14:47:55 -04:00
Andrew Kelley
109c0b9d96
rename std.mem.defaultInit to std.mem.zeroInit
2020-06-01 14:47:18 -04:00