summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-08-10 15:13:26 -0400
committerRich Felker <dalias@aerifal.cx>2012-08-10 15:13:26 -0400
commite3ebe7db5de64c193202f1c5b321c9a470e730c5 (patch)
tree2a37e6d116b1abe8e2e3b0f8f49d8463e9ad2454
parentc5875ad34b88e159e664587df9f8a9dbac86879f (diff)
downloadmusl-e3ebe7db5de64c193202f1c5b321c9a470e730c5.tar.gz
musl-e3ebe7db5de64c193202f1c5b321c9a470e730c5.tar.bz2
musl-e3ebe7db5de64c193202f1c5b321c9a470e730c5.tar.xz
musl-e3ebe7db5de64c193202f1c5b321c9a470e730c5.zip
use int instead of long for ptrdiff_t on all 32-bit archs
this is needed to match the underlying "ABI" standards. it's not really an ABI issue since the binary representations are the same, but having the wrong type can lead to errors when the type arising from a difference-of-pointers expression does not match the defined type of ptrdiff_t. most of the problems affect C++, not C.
-rwxr-xr-xarch/arm/bits/alltypes.h.sh2
-rwxr-xr-xarch/i386/bits/alltypes.h.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/bits/alltypes.h.sh b/arch/arm/bits/alltypes.h.sh
index 4ba3d81c..274de0df 100755
--- a/arch/arm/bits/alltypes.h.sh
+++ b/arch/arm/bits/alltypes.h.sh
@@ -18,7 +18,7 @@ union \1 \2;\
TYPEDEF unsigned size_t;
TYPEDEF int ssize_t;
-TYPEDEF long ptrdiff_t;
+TYPEDEF int ptrdiff_t;
TYPEDEF __builtin_va_list va_list;
diff --git a/arch/i386/bits/alltypes.h.sh b/arch/i386/bits/alltypes.h.sh
index 10956690..10fcf6a3 100755
--- a/arch/i386/bits/alltypes.h.sh
+++ b/arch/i386/bits/alltypes.h.sh
@@ -18,7 +18,7 @@ union \1 \2;\
TYPEDEF unsigned size_t;
TYPEDEF int ssize_t;
-TYPEDEF long ptrdiff_t;
+TYPEDEF int ptrdiff_t;
#if __GNUC__ >= 3
TYPEDEF __builtin_va_list va_list;