aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-02-14 16:11:31 -0500
committerH. Peter Anvin <hpa@zytor.com>2012-02-20 15:48:47 -0500
commitafead38d011ab2f333d12ebb6752ed9baa53b667 (patch)
tree2812951df334a1bf6f21c82797090651d8044ce7 /include/asm-generic
parentd8e5ddef21df05bc2a14d8c0e287cbf083da60a3 (diff)
posix_types: Introduce __kernel_[u]long_t
Introduce __kernel_[u]long_t, which allows an ABI to override all defaults of type [unsigned] long. This enables x32 and potentially other 32-bit userspace on 64-bit kernel ABIs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/posix_types.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/asm-generic/posix_types.h b/include/asm-generic/posix_types.h
index e294fe66125b..91d44bd4dde3 100644
--- a/include/asm-generic/posix_types.h
+++ b/include/asm-generic/posix_types.h
@@ -10,8 +10,13 @@
10 * architectures, so that you can override them. 10 * architectures, so that you can override them.
11 */ 11 */
12 12
13#ifndef __kernel_long_t
14typedef long __kernel_long_t;
15typedef unsigned long __kernel_ulong_t;
16#endif
17
13#ifndef __kernel_ino_t 18#ifndef __kernel_ino_t
14typedef unsigned long __kernel_ino_t; 19typedef __kernel_ulong_t __kernel_ino_t;
15#endif 20#endif
16 21
17#ifndef __kernel_mode_t 22#ifndef __kernel_mode_t
@@ -19,7 +24,7 @@ typedef unsigned int __kernel_mode_t;
19#endif 24#endif
20 25
21#ifndef __kernel_nlink_t 26#ifndef __kernel_nlink_t
22typedef unsigned long __kernel_nlink_t; 27typedef __kernel_ulong_t __kernel_nlink_t;
23#endif 28#endif
24 29
25#ifndef __kernel_pid_t 30#ifndef __kernel_pid_t
@@ -36,7 +41,7 @@ typedef unsigned int __kernel_gid_t;
36#endif 41#endif
37 42
38#ifndef __kernel_suseconds_t 43#ifndef __kernel_suseconds_t
39typedef long __kernel_suseconds_t; 44typedef __kernel_long_t __kernel_suseconds_t;
40#endif 45#endif
41 46
42#ifndef __kernel_daddr_t 47#ifndef __kernel_daddr_t
@@ -67,9 +72,9 @@ typedef unsigned int __kernel_size_t;
67typedef int __kernel_ssize_t; 72typedef int __kernel_ssize_t;
68typedef int __kernel_ptrdiff_t; 73typedef int __kernel_ptrdiff_t;
69#else 74#else
70typedef unsigned long __kernel_size_t; 75typedef __kernel_ulong_t __kernel_size_t;
71typedef long __kernel_ssize_t; 76typedef __kernel_long_t __kernel_ssize_t;
72typedef long __kernel_ptrdiff_t; 77typedef __kernel_long_t __kernel_ptrdiff_t;
73#endif 78#endif
74#endif 79#endif
75 80
@@ -82,10 +87,10 @@ typedef struct {
82/* 87/*
83 * anything below here should be completely generic 88 * anything below here should be completely generic
84 */ 89 */
85typedef long __kernel_off_t; 90typedef __kernel_long_t __kernel_off_t;
86typedef long long __kernel_loff_t; 91typedef long long __kernel_loff_t;
87typedef long __kernel_time_t; 92typedef __kernel_long_t __kernel_time_t;
88typedef long __kernel_clock_t; 93typedef __kernel_long_t __kernel_clock_t;
89typedef int __kernel_timer_t; 94typedef int __kernel_timer_t;
90typedef int __kernel_clockid_t; 95typedef int __kernel_clockid_t;
91typedef char * __kernel_caddr_t; 96typedef char * __kernel_caddr_t;