Pārlūkot izejas kodu

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.
Rich Felker 12 gadi atpakaļ
vecāks
revīzija
e3ebe7db5d
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      arch/arm/bits/alltypes.h.sh
  2. 1 1
      arch/i386/bits/alltypes.h.sh

+ 1 - 1
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;
 

+ 1 - 1
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;