Skip to content

Commit

Permalink
Merge pull request #4972 from mneumann/dragonfly-fix-compile
Browse files Browse the repository at this point in the history
Fix compile on Dragonfly
  • Loading branch information
andrewrk authored Apr 7, 2020
2 parents ab05766 + 2b9cef1 commit a20f3e3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmake/Findclang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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_)
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions cmake/Findlld.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion cmake/Findllvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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_)
Expand All @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion lib/std/os/bits/dragonfly.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a20f3e3

Please sign in to comment.