Jelajahi Sumber

- sync with glibc (and provide a check for icc).
Only affects gcc <2.7 or non-gcc compilers that bailed earlier due to missing int64_t

Bernhard Reutner-Fischer 17 tahun lalu
induk
melakukan
3b44ff3cbc
1 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 6 2
      include/sys/types.h

+ 6 - 2
include/sys/types.h

@@ -163,7 +163,9 @@ typedef unsigned int uint;
 typedef	char int8_t;
 typedef	short int int16_t;
 typedef	int int32_t;
-#  ifdef __GNUC__
+#  if __WORDSIZE == 64
+typedef long int int64_t;
+#  elif defined __GNUC__ || defined __ICC
 __extension__ typedef long long int int64_t;
 #  endif
 # endif
@@ -172,7 +174,9 @@ __extension__ typedef long long int int64_t;
 typedef	unsigned char u_int8_t;
 typedef	unsigned short int u_int16_t;
 typedef	unsigned int u_int32_t;
-# ifdef __GNUC__
+# if __WORDSIZE == 64
+typedef unsigned long int u_int64_t;
+# elif defined __GNUC__ || defined __ICC
 __extension__ typedef unsigned long long int u_int64_t;
 # endif