move register_t and u_int64_t (back) to alltypes
authorRich Felker <dalias@aerifal.cx>
Mon, 22 Jul 2013 20:40:35 +0000 (16:40 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 22 Jul 2013 20:40:35 +0000 (16:40 -0400)
during the header refactoring, I had moved u_int64_t out of alltypes
under the assumption that we could just use long long everywhere.
however, it seems some broken applications make inconsistent mixed use
of u_int64_t and uint64_t, resulting in build errors when the
underlying type differs.

include/alltypes.h.in
include/sys/types.h

index 644c61de88a06fde908509870ffc93c1bb6bfba3..6f7035830d83a20bf1a9be1cc86e783b47bf21d9 100644 (file)
@@ -4,6 +4,7 @@ TYPEDEF _Addr ptrdiff_t;
 TYPEDEF _Addr ssize_t;
 TYPEDEF _Addr intptr_t;
 TYPEDEF _Addr regoff_t;
+TYPEDEF _Reg register_t;
 
 TYPEDEF signed char     int8_t;
 TYPEDEF short           int16_t;
@@ -14,6 +15,7 @@ TYPEDEF unsigned char   uint8_t;
 TYPEDEF unsigned short  uint16_t;
 TYPEDEF unsigned int    uint32_t;
 TYPEDEF unsigned _Int64 uint64_t;
+TYPEDEF unsigned _Int64 u_int64_t;
 TYPEDEF unsigned _Int64 uintmax_t;
 
 TYPEDEF unsigned mode_t;
index db8661bfcba1549415edd83b6243cdf64d8e88d3..27170f6443b85bfbb2c4c776013add74b1a13e11 100644 (file)
@@ -49,13 +49,17 @@ extern "C" {
 #define __NEED_pthread_key_t
 #define __NEED_pthread_once_t
 #define __NEED_useconds_t
+#define __NEED_u_int64_t
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define __NEED_register_t
+#endif
 
 #include <bits/alltypes.h>
 
 typedef unsigned char u_int8_t;
 typedef unsigned short u_int16_t;
 typedef unsigned u_int32_t;
-typedef unsigned long long u_int64_t;
 
 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 typedef char *caddr_t;
@@ -65,7 +69,6 @@ typedef unsigned u_int, uint;
 typedef unsigned long u_long, ulong;
 typedef long long quad_t;
 typedef unsigned long long u_quad_t;
-typedef long register_t;
 #include <endian.h>
 #include <sys/select.h>
 #include <sys/sysmacros.h>