authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-07 13:04:37-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-04-07 13:04:37-04:00
loga20f3e3f02b24219f43c2da4568b794051e7d348
treec16b2d6ef4dad8fdf28543b0e1a0ab23d15b2348
parentab05766674b88dc7715d27f7d590d6832ee005ca
parent2b9cef1e0414f01e024af6f69a885faaeaa95f7c
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #4972 from mneumann/dragonfly-fix-compile

Fix compile on Dragonfly

4 files changed, 14 insertions(+), 2 deletions(-)

cmake/Findclang.cmake+2
......@@ -13,6 +13,7 @@ find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
1313 /usr/lib/llvm-10/include
1414 /usr/lib/llvm-10.0/include
1515 /usr/local/llvm100/include
16 /usr/local/llvm10/include
1617 /mingw64/include)
1718
1819macro(FIND_AND_ADD_CLANG_LIB _libname_)
......@@ -24,6 +25,7 @@ macro(FIND_AND_ADD_CLANG_LIB _libname_)
2425 /usr/lib/llvm-10/lib
2526 /usr/lib/llvm-10.0/lib
2627 /usr/local/llvm100/lib
28 /usr/local/llvm10/lib
2729 /mingw64/lib
2830 /c/msys64/mingw64/lib
2931 c:\\msys64\\mingw64\\lib)
cmake/Findlld.cmake+3
......@@ -10,12 +10,14 @@ find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
1010 PATHS
1111 /usr/lib/llvm-10/include
1212 /usr/local/llvm100/include
13 /usr/local/llvm10/include
1314 /mingw64/include)
1415
1516find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld
1617 PATHS
1718 /usr/lib/llvm-10/lib
1819 /usr/local/llvm100/lib
20 /usr/local/llvm10/lib
1921)
2022if(EXISTS ${LLD_LIBRARY})
2123 set(LLD_LIBRARIES ${LLD_LIBRARY})
......@@ -27,6 +29,7 @@ else()
2729 ${LLD_LIBDIRS}
2830 /usr/lib/llvm-10/lib
2931 /usr/local/llvm100/lib
32 /usr/local/llvm10/lib
3033 /mingw64/lib
3134 /c/msys64/mingw64/lib
3235 c:/msys64/mingw64/lib)
cmake/Findllvm.cmake+3-1
......@@ -9,7 +9,7 @@
99
1010if("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
1111 find_program(LLVM_CONFIG_EXE
12 NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config
12 NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config
1313 PATHS
1414 "/mingw64/bin"
1515 "/c/msys64/mingw64/bin"
......@@ -130,6 +130,7 @@ else()
130130 /usr/lib/llvm-10/include
131131 /usr/lib/llvm-10.0/include
132132 /usr/local/llvm100/include
133 /usr/local/llvm10/include
133134 /mingw64/include)
134135
135136 macro(FIND_AND_ADD_LLVM_LIB _libname_)
......@@ -141,6 +142,7 @@ else()
141142 /usr/lib/llvm-10/lib
142143 /usr/lib/llvm-10.0/lib
143144 /usr/local/llvm100/lib
145 /usr/local/llvm10/lib
144146 /mingw64/lib
145147 /c/msys64/mingw64/lib
146148 c:\\msys64\\mingw64\\lib)
lib/std/os/bits/dragonfly.zig+6-1
......@@ -244,6 +244,12 @@ pub const KERN_MAXID = 37;
244244
245245pub const HOST_NAME_MAX = 255;
246246
247// access function
248pub const F_OK = 0; // test for existence of file
249pub const X_OK = 1; // test for execute or search permission
250pub const W_OK = 2; // test for write permission
251pub const R_OK = 4; // test for read permission
252
247253pub const O_RDONLY = 0;
248254pub const O_NDELAY = O_NONBLOCK;
249255pub const O_WRONLY = 1;
......@@ -277,7 +283,6 @@ pub const SEEK_END = 2;
277283pub const SEEK_DATA = 3;
278284pub const SEEK_HOLE = 4;
279285
280pub const F_OK = 0;
281286pub const F_ULOCK = 0;
282287pub const F_LOCK = 1;
283288pub const F_TLOCK = 2;