diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-22 15:45:28 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-22 15:45:28 -0400 |
commit | 1c6cace0bf88a5f30886665e2c2d2268e3a3ccc5 (patch) | |
tree | 8e5c4f40812c301bae1127f3874b4a82307bdee7 | |
parent | 8327ae0cb23b799bc55a45e0d4bd95f5a2b1cdf1 (diff) | |
download | musl-1c6cace0bf88a5f30886665e2c2d2268e3a3ccc5.tar.gz musl-1c6cace0bf88a5f30886665e2c2d2268e3a3ccc5.tar.xz musl-1c6cace0bf88a5f30886665e2c2d2268e3a3ccc5.zip |
fix regression in size of nlink_t (broken stat struct) on x86_64
rather than moving nlink_t back to the arch-specific file, I've added a macro _Reg defined to the canonical type for register-size values on the arch. this is not the same as _Addr for (not-yet-supported) 32-on-64 pseudo-archs like x32 and mips n32, so a new macro was needed.
-rw-r--r-- | arch/arm/bits/alltypes.h.in | 1 | ||||
-rw-r--r-- | arch/i386/bits/alltypes.h.in | 1 | ||||
-rw-r--r-- | arch/microblaze/bits/alltypes.h.in | 1 | ||||
-rw-r--r-- | arch/mips/bits/alltypes.h.in | 1 | ||||
-rw-r--r-- | arch/powerpc/bits/alltypes.h.in | 1 | ||||
-rw-r--r-- | arch/x86_64/bits/alltypes.h.in | 1 | ||||
-rw-r--r-- | include/alltypes.h.in | 2 |
7 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/bits/alltypes.h.in b/arch/arm/bits/alltypes.h.in index 764a2469..bd23a6ae 100644 --- a/arch/arm/bits/alltypes.h.in +++ b/arch/arm/bits/alltypes.h.in @@ -1,5 +1,6 @@ #define _Addr int #define _Int64 long long +#define _Reg int TYPEDEF __builtin_va_list va_list; TYPEDEF __builtin_va_list __isoc_va_list; diff --git a/arch/i386/bits/alltypes.h.in b/arch/i386/bits/alltypes.h.in index 04fd1cb4..efd2c077 100644 --- a/arch/i386/bits/alltypes.h.in +++ b/arch/i386/bits/alltypes.h.in @@ -1,5 +1,6 @@ #define _Addr int #define _Int64 long long +#define _Reg int #if __GNUC__ >= 3 TYPEDEF __builtin_va_list va_list; diff --git a/arch/microblaze/bits/alltypes.h.in b/arch/microblaze/bits/alltypes.h.in index eb842aaf..6bd79429 100644 --- a/arch/microblaze/bits/alltypes.h.in +++ b/arch/microblaze/bits/alltypes.h.in @@ -1,5 +1,6 @@ #define _Addr int #define _Int64 long long +#define _Reg int TYPEDEF __builtin_va_list va_list; TYPEDEF __builtin_va_list __isoc_va_list; diff --git a/arch/mips/bits/alltypes.h.in b/arch/mips/bits/alltypes.h.in index eb842aaf..6bd79429 100644 --- a/arch/mips/bits/alltypes.h.in +++ b/arch/mips/bits/alltypes.h.in @@ -1,5 +1,6 @@ #define _Addr int #define _Int64 long long +#define _Reg int TYPEDEF __builtin_va_list va_list; TYPEDEF __builtin_va_list __isoc_va_list; diff --git a/arch/powerpc/bits/alltypes.h.in b/arch/powerpc/bits/alltypes.h.in index 1c3fe283..e9d8dd8a 100644 --- a/arch/powerpc/bits/alltypes.h.in +++ b/arch/powerpc/bits/alltypes.h.in @@ -1,5 +1,6 @@ #define _Addr int #define _Int64 long long +#define _Reg int TYPEDEF __builtin_va_list va_list; TYPEDEF __builtin_va_list __isoc_va_list; diff --git a/arch/x86_64/bits/alltypes.h.in b/arch/x86_64/bits/alltypes.h.in index b9bff866..277e9448 100644 --- a/arch/x86_64/bits/alltypes.h.in +++ b/arch/x86_64/bits/alltypes.h.in @@ -1,5 +1,6 @@ #define _Addr long #define _Int64 long +#define _Reg long TYPEDEF __builtin_va_list va_list; TYPEDEF __builtin_va_list __isoc_va_list; diff --git a/include/alltypes.h.in b/include/alltypes.h.in index f3481fc2..644c61de 100644 --- a/include/alltypes.h.in +++ b/include/alltypes.h.in @@ -17,7 +17,7 @@ TYPEDEF unsigned _Int64 uint64_t; TYPEDEF unsigned _Int64 uintmax_t; TYPEDEF unsigned mode_t; -TYPEDEF unsigned nlink_t; +TYPEDEF unsigned _Reg nlink_t; TYPEDEF _Int64 off_t; TYPEDEF unsigned _Int64 ino_t; TYPEDEF unsigned _Int64 dev_t; |