Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #same_file? by providing access to 64 bit inode numbers. #8355

Merged
merged 1 commit into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/lib_c/x86_64-darwin/c/dirent.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ lib LibC

struct Dirent
d_ino : InoT
d_seekoff : UInt64
d_reclen : UShort
d_namlen : UShort
d_type : UChar
d_namlen : UChar
d_name : StaticArray(Char, 256)
end

fun closedir(x0 : DIR*) : Int
fun opendir(x0 : Char*) : DIR*
fun readdir(x0 : DIR*) : Dirent*
fun opendir = "opendir$INODE64"(x0 : Char*) : DIR*
fun readdir = "readdir$INODE64"(x0 : DIR*) : Dirent*
fun rewinddir(x0 : DIR*) : Void
end
9 changes: 5 additions & 4 deletions src/lib_c/x86_64-darwin/c/sys/stat.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ lib LibC

struct Stat
st_dev : DevT
st_ino : InoT
st_mode : ModeT
st_nlink : NlinkT
st_ino : InoT
st_uid : UidT
st_gid : GidT
st_rdev : DevT
st_atimespec : Timespec
st_mtimespec : Timespec
st_ctimespec : Timespec
st_birthtimespec : Timespec
st_size : OffT
st_blocks : BlkcntT
st_blksize : BlksizeT
Expand All @@ -47,11 +48,11 @@ lib LibC
end

fun chmod(x0 : Char*, x1 : ModeT) : Int
fun fstat(x0 : Int, x1 : Stat*) : Int
fun lstat(x0 : Char*, x1 : Stat*) : Int
fun fstat = fstat64(x0 : Int, x1 : Stat*) : Int
fun lstat = lstat64(x0 : Char*, x1 : Stat*) : Int
fun mkdir(x0 : Char*, x1 : ModeT) : Int
fun mkfifo(x0 : Char*, x1 : ModeT) : Int
fun mknod(x0 : Char*, x1 : ModeT, x2 : DevT) : Int
fun stat(x0 : Char*, x1 : Stat*) : Int
fun stat = stat64(x0 : Char*, x1 : Stat*) : Int
fun umask(x0 : ModeT) : ModeT
end
2 changes: 1 addition & 1 deletion src/lib_c/x86_64-darwin/c/sys/types.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lib LibC
alias DevT = Int
alias GidT = UInt
alias IdT = UInt
alias InoT = UInt
alias InoT = UInt64
alias ModeT = UShort
alias NlinkT = UShort
alias OffT = LongLong
Expand Down