diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-04-24 15:56:52 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-02 19:18:19 -0400 |
commit | d13ff31cfeedbf2fefc7ba13cb753775648eac0c (patch) | |
tree | 94bbe8498b3fc281265367f5dac94374a065255f /include/asm-generic | |
parent | b66e1f11ebc429569a3784aaf64123633d9e3ed1 (diff) |
types: create <asm-generic/int-*.h>
This creates two generic files with common integer definitions; one
where 64 bits is "long" (most 64-bit architectures) and one where 64
bits is "long long" (all 32-bit architectures and x86-64.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: William L. Irwin <wli@holomorphy.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/Kbuild | 2 | ||||
-rw-r--r-- | include/asm-generic/int-l64.h | 51 | ||||
-rw-r--r-- | include/asm-generic/int-ll64.h | 56 |
3 files changed, 109 insertions, 0 deletions
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index c18110ee30f1..4c9932a2503f 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild | |||
@@ -7,5 +7,7 @@ header-y += poll.h | |||
7 | header-y += signal.h | 7 | header-y += signal.h |
8 | header-y += statfs.h | 8 | header-y += statfs.h |
9 | 9 | ||
10 | unifdef-y += int-l64.h | ||
11 | unifdef-y += int-ll64.h | ||
10 | unifdef-y += resource.h | 12 | unifdef-y += resource.h |
11 | unifdef-y += siginfo.h | 13 | unifdef-y += siginfo.h |
diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h new file mode 100644 index 000000000000..629b5a43f0b0 --- /dev/null +++ b/include/asm-generic/int-l64.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * asm-generic/int-l64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_GENERIC_INT_L64_H | ||
9 | #define _ASM_GENERIC_INT_L64_H | ||
10 | |||
11 | #ifndef __ASSEMBLY__ | ||
12 | /* | ||
13 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
14 | * header files exported to user space | ||
15 | */ | ||
16 | |||
17 | typedef __signed__ char __s8; | ||
18 | typedef unsigned char __u8; | ||
19 | |||
20 | typedef __signed__ short __s16; | ||
21 | typedef unsigned short __u16; | ||
22 | |||
23 | typedef __signed__ int __s32; | ||
24 | typedef unsigned int __u32; | ||
25 | |||
26 | typedef __signed__ long __s64; | ||
27 | typedef unsigned long __u64; | ||
28 | |||
29 | #endif /* __ASSEMBLY__ */ | ||
30 | |||
31 | #ifdef __KERNEL__ | ||
32 | |||
33 | #ifndef __ASSEMBLY__ | ||
34 | |||
35 | typedef signed char s8; | ||
36 | typedef unsigned char u8; | ||
37 | |||
38 | typedef signed short s16; | ||
39 | typedef unsigned short u16; | ||
40 | |||
41 | typedef signed int s32; | ||
42 | typedef unsigned int u32; | ||
43 | |||
44 | typedef signed long s64; | ||
45 | typedef unsigned long u64; | ||
46 | |||
47 | #endif /* __ASSEMBLY__ */ | ||
48 | |||
49 | #endif /* __KERNEL__ */ | ||
50 | |||
51 | #endif /* _ASM_GENERIC_INT_L64_H */ | ||
diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h new file mode 100644 index 000000000000..1e5ffec05759 --- /dev/null +++ b/include/asm-generic/int-ll64.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * asm-generic/int-ll64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_GENERIC_INT_LL64_H | ||
9 | #define _ASM_GENERIC_INT_LL64_H | ||
10 | |||
11 | #ifndef __ASSEMBLY__ | ||
12 | /* | ||
13 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
14 | * header files exported to user space | ||
15 | */ | ||
16 | |||
17 | typedef __signed__ char __s8; | ||
18 | typedef unsigned char __u8; | ||
19 | |||
20 | typedef __signed__ short __s16; | ||
21 | typedef unsigned short __u16; | ||
22 | |||
23 | typedef __signed__ int __s32; | ||
24 | typedef unsigned int __u32; | ||
25 | |||
26 | #ifdef __GNUC__ | ||
27 | __extension__ typedef __signed__ long long __s64; | ||
28 | __extension__ typedef unsigned long long __u64; | ||
29 | #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | ||
30 | typedef __signed__ long long __s64; | ||
31 | typedef unsigned long long __u64; | ||
32 | #endif | ||
33 | |||
34 | #endif /* __ASSEMBLY__ */ | ||
35 | |||
36 | #ifdef __KERNEL__ | ||
37 | |||
38 | #ifndef __ASSEMBLY__ | ||
39 | |||
40 | typedef signed char s8; | ||
41 | typedef unsigned char u8; | ||
42 | |||
43 | typedef signed short s16; | ||
44 | typedef unsigned short u16; | ||
45 | |||
46 | typedef signed int s32; | ||
47 | typedef unsigned int u32; | ||
48 | |||
49 | typedef signed long long s64; | ||
50 | typedef unsigned long long u64; | ||
51 | |||
52 | #endif /* __ASSEMBLY__ */ | ||
53 | |||
54 | #endif /* __KERNEL__ */ | ||
55 | |||
56 | #endif /* _ASM_GENERIC_INT_LL64_H */ | ||