commit a20f3e3f02b24219f43c2da4568b794051e7d348 (tree)
parent ab05766674b88dc7715d27f7d590d6832ee005ca
Author: Andrew Kelley <andrew@ziglang.org>
Date: Tue, 7 Apr 2020 13:04:37 -0400
Merge pull request #4972 from mneumann/dragonfly-fix-compile
Fix compile on Dragonfly
Diffstat:
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/cmake/Findclang.cmake b/cmake/Findclang.cmake
@@ -13,6 +13,7 @@ find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
/usr/lib/llvm-10/include
/usr/lib/llvm-10.0/include
/usr/local/llvm100/include
+ /usr/local/llvm10/include
/mingw64/include)
macro(FIND_AND_ADD_CLANG_LIB _libname_)
@@ -24,6 +25,7 @@ macro(FIND_AND_ADD_CLANG_LIB _libname_)
/usr/lib/llvm-10/lib
/usr/lib/llvm-10.0/lib
/usr/local/llvm100/lib
+ /usr/local/llvm10/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib)
diff --git a/cmake/Findlld.cmake b/cmake/Findlld.cmake
@@ -10,12 +10,14 @@ find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
PATHS
/usr/lib/llvm-10/include
/usr/local/llvm100/include
+ /usr/local/llvm10/include
/mingw64/include)
find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld
PATHS
/usr/lib/llvm-10/lib
/usr/local/llvm100/lib
+ /usr/local/llvm10/lib
)
if(EXISTS ${LLD_LIBRARY})
set(LLD_LIBRARIES ${LLD_LIBRARY})
@@ -27,6 +29,7 @@ else()
${LLD_LIBDIRS}
/usr/lib/llvm-10/lib
/usr/local/llvm100/lib
+ /usr/local/llvm10/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:/msys64/mingw64/lib)
diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
@@ -9,7 +9,7 @@
if("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
find_program(LLVM_CONFIG_EXE
- NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config
+ NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config
PATHS
"/mingw64/bin"
"/c/msys64/mingw64/bin"
@@ -130,6 +130,7 @@ else()
/usr/lib/llvm-10/include
/usr/lib/llvm-10.0/include
/usr/local/llvm100/include
+ /usr/local/llvm10/include
/mingw64/include)
macro(FIND_AND_ADD_LLVM_LIB _libname_)
@@ -141,6 +142,7 @@ else()
/usr/lib/llvm-10/lib
/usr/lib/llvm-10.0/lib
/usr/local/llvm100/lib
+ /usr/local/llvm10/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib)
diff --git a/lib/std/os/bits/dragonfly.zig b/lib/std/os/bits/dragonfly.zig
@@ -244,6 +244,12 @@ pub const KERN_MAXID = 37;
pub const HOST_NAME_MAX = 255;
+// access function
+pub const F_OK = 0; // test for existence of file
+pub const X_OK = 1; // test for execute or search permission
+pub const W_OK = 2; // test for write permission
+pub const R_OK = 4; // test for read permission
+
pub const O_RDONLY = 0;
pub const O_NDELAY = O_NONBLOCK;
pub const O_WRONLY = 1;
@@ -277,7 +283,6 @@ pub const SEEK_END = 2;
pub const SEEK_DATA = 3;
pub const SEEK_HOLE = 4;
-pub const F_OK = 0;
pub const F_ULOCK = 0;
pub const F_LOCK = 1;
pub const F_TLOCK = 2;