Skip to content

Commit

Permalink
LibC::PtrdiffT is the signed integer type of the result of subtractin…
Browse files Browse the repository at this point in the history
…g two pointers.

ptrdiff_t is used for pointer arithmetic and array indexing, if negative values are possible.

Refs crystal-lang#823, crystal-lang#4589.
  • Loading branch information
akzhan committed Jun 26, 2017
1 parent c6e2077 commit fba8a0e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib_c/aarch64-linux-gnu/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = ULongLong
alias OffsetT = LongLong
end
1 change: 1 addition & 0 deletions src/lib_c/amd64-unknown-openbsd/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = ULong
alias OffsetT = Long
end
1 change: 1 addition & 0 deletions src/lib_c/arm-linux-gnueabihf/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = UInt
alias OffsetT = Int
end
1 change: 1 addition & 0 deletions src/lib_c/i686-linux-gnu/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = UInt
alias OffsetT = Int
end
1 change: 1 addition & 0 deletions src/lib_c/i686-linux-musl/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = UInt
alias OffsetT = Int
end
1 change: 1 addition & 0 deletions src/lib_c/x86_64-linux-gnu/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = ULong
alias OffsetT = Long
end
1 change: 1 addition & 0 deletions src/lib_c/x86_64-linux-musl/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = ULong
alias OffsetT = Long
end
1 change: 1 addition & 0 deletions src/lib_c/x86_64-macosx-darwin/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = ULong
alias OffsetT = Long
end
1 change: 1 addition & 0 deletions src/lib_c/x86_64-portbld-freebsd/c/stddef.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib LibC
alias SizeT = ULong
alias PtrdiffT = Long
end

0 comments on commit fba8a0e

Please sign in to comment.