diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-02-14 16:13:21 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-02-20 15:48:47 -0500 |
commit | 1f5e27a90add2fe2a1c11508f68d377e3ddcf9ab (patch) | |
tree | 66172218a9ec03f7246714cc1fa08b49c816977c | |
parent | afead38d011ab2f333d12ebb6752ed9baa53b667 (diff) |
x32: Create posix_types_x32.h
This is the same as the 64-bit posix_types.h, except that
__kernel_[u]long_t is defined to be [unsigned] long long and therefore
64 bits.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | arch/x86/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/posix_types.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/posix_types_x32.h | 19 |
3 files changed, 23 insertions, 1 deletions
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index b57e6a43a37a..986954fb9513 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild | |||
@@ -14,6 +14,7 @@ header-y += msr.h | |||
14 | header-y += mtrr.h | 14 | header-y += mtrr.h |
15 | header-y += posix_types_32.h | 15 | header-y += posix_types_32.h |
16 | header-y += posix_types_64.h | 16 | header-y += posix_types_64.h |
17 | header-y += posix_types_x32.h | ||
17 | header-y += prctl.h | 18 | header-y += prctl.h |
18 | header-y += processor-flags.h | 19 | header-y += processor-flags.h |
19 | header-y += ptrace-abi.h | 20 | header-y += ptrace-abi.h |
diff --git a/arch/x86/include/asm/posix_types.h b/arch/x86/include/asm/posix_types.h index bb7133dc155d..3427b7798dbc 100644 --- a/arch/x86/include/asm/posix_types.h +++ b/arch/x86/include/asm/posix_types.h | |||
@@ -7,7 +7,9 @@ | |||
7 | #else | 7 | #else |
8 | # ifdef __i386__ | 8 | # ifdef __i386__ |
9 | # include "posix_types_32.h" | 9 | # include "posix_types_32.h" |
10 | # else | 10 | # elif defined(__LP64__) |
11 | # include "posix_types_64.h" | 11 | # include "posix_types_64.h" |
12 | # else | ||
13 | # include "posix_types_x32.h" | ||
12 | # endif | 14 | # endif |
13 | #endif | 15 | #endif |
diff --git a/arch/x86/include/asm/posix_types_x32.h b/arch/x86/include/asm/posix_types_x32.h new file mode 100644 index 000000000000..85f9bdafa93c --- /dev/null +++ b/arch/x86/include/asm/posix_types_x32.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _ASM_X86_POSIX_TYPES_X32_H | ||
2 | #define _ASM_X86_POSIX_TYPES_X32_H | ||
3 | |||
4 | /* | ||
5 | * This file is only used by user-level software, so you need to | ||
6 | * be a little careful about namespace pollution etc. Also, we cannot | ||
7 | * assume GCC is being used. | ||
8 | * | ||
9 | * These types should generally match the ones used by the 64-bit kernel, | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | typedef long long __kernel_long_t; | ||
14 | typedef unsigned long long __kernel_ulong_t; | ||
15 | #define __kernel_long_t __kernel_long_t | ||
16 | |||
17 | #include <asm/posix_types_64.h> | ||
18 | |||
19 | #endif /* _ASM_X86_POSIX_TYPES_X32_H */ | ||