diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/types.h | 36 | ||||
-rw-r--r-- | include/asm-arm/types.h | 33 | ||||
-rw-r--r-- | include/asm-avr32/types.h | 32 | ||||
-rw-r--r-- | include/asm-blackfin/types.h | 34 | ||||
-rw-r--r-- | include/asm-cris/types.h | 33 | ||||
-rw-r--r-- | include/asm-frv/types.h | 34 | ||||
-rw-r--r-- | include/asm-generic/Kbuild | 2 | ||||
-rw-r--r-- | include/asm-generic/int-l64.h | 71 | ||||
-rw-r--r-- | include/asm-generic/int-ll64.h | 76 | ||||
-rw-r--r-- | include/asm-h8300/types.h | 33 | ||||
-rw-r--r-- | include/asm-ia64/types.h | 31 | ||||
-rw-r--r-- | include/asm-m32r/types.h | 32 | ||||
-rw-r--r-- | include/asm-m68k/types.h | 32 | ||||
-rw-r--r-- | include/asm-mips/types.h | 56 | ||||
-rw-r--r-- | include/asm-mn10300/types.h | 33 | ||||
-rw-r--r-- | include/asm-parisc/types.h | 33 | ||||
-rw-r--r-- | include/asm-powerpc/types.h | 48 | ||||
-rw-r--r-- | include/asm-s390/types.h | 48 | ||||
-rw-r--r-- | include/asm-sh/types.h | 34 | ||||
-rw-r--r-- | include/asm-sparc/types.h | 30 | ||||
-rw-r--r-- | include/asm-sparc64/types.h | 30 | ||||
-rw-r--r-- | include/asm-v850/types.h | 32 | ||||
-rw-r--r-- | include/asm-x86/types.h | 38 | ||||
-rw-r--r-- | include/asm-xtensa/types.h | 33 |
24 files changed, 197 insertions, 697 deletions
diff --git a/include/asm-alpha/types.h b/include/asm-alpha/types.h index f5716139ec8..a9e34ca4d46 100644 --- a/include/asm-alpha/types.h +++ b/include/asm-alpha/types.h @@ -8,28 +8,12 @@ * not a major issue. However, for interoperability, libraries still * need to be careful to avoid a name clashes. */ +#include <asm-generic/int-l64.h> #ifndef __ASSEMBLY__ typedef unsigned int umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -typedef __signed__ long __s64; -typedef unsigned long __u64; - #endif /* __ASSEMBLY__ */ /* @@ -39,23 +23,5 @@ typedef unsigned long __u64; #define BITS_PER_LONG 64 -#ifndef __ASSEMBLY__ - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long s64; -typedef unsigned long u64; - -typedef u64 dma_addr_t; -typedef u64 dma64_addr_t; - -#endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _ALPHA_TYPES_H */ diff --git a/include/asm-arm/types.h b/include/asm-arm/types.h index 3141451a9bd..345df01534a 100644 --- a/include/asm-arm/types.h +++ b/include/asm-arm/types.h @@ -1,29 +1,12 @@ #ifndef __ASM_ARM_TYPES_H #define __ASM_ARM_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -35,18 +18,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-avr32/types.h b/include/asm-avr32/types.h index 8999a381940..9cefda6f534 100644 --- a/include/asm-avr32/types.h +++ b/include/asm-avr32/types.h @@ -8,28 +8,12 @@ #ifndef __ASM_AVR32_TYPES_H #define __ASM_AVR32_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -41,18 +25,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-blackfin/types.h b/include/asm-blackfin/types.h index 9785a6d531c..8441cbc2bf9 100644 --- a/include/asm-blackfin/types.h +++ b/include/asm-blackfin/types.h @@ -8,30 +8,12 @@ * not a major issue. However, for interoperability, libraries still * need to be careful to avoid a name clashes. */ +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -/* HK0617 -- Changes to unsigned long temporarily */ -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* * These aren't exported outside the kernel to avoid name space clashes @@ -42,18 +24,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h index 5a21c42bc6c..5790262cbe8 100644 --- a/include/asm-cris/types.h +++ b/include/asm-cris/types.h @@ -1,29 +1,12 @@ #ifndef _ETRAX_TYPES_H #define _ETRAX_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -35,18 +18,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide, just like our other addresses. */ typedef u32 dma_addr_t; diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 767e5ed71c4..613bf1e962f 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h @@ -12,29 +12,12 @@ #ifndef _ASM_TYPES_H #define _ASM_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -46,19 +29,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index c18110ee30f..4c9932a2503 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild @@ -7,5 +7,7 @@ header-y += poll.h header-y += signal.h header-y += statfs.h +unifdef-y += int-l64.h +unifdef-y += int-ll64.h unifdef-y += resource.h 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 00000000000..2af9b75d77d --- /dev/null +++ b/include/asm-generic/int-l64.h @@ -0,0 +1,71 @@ +/* + * asm-generic/int-l64.h + * + * Integer declarations for architectures which use "long" + * for 64-bit types. + */ + +#ifndef _ASM_GENERIC_INT_L64_H +#define _ASM_GENERIC_INT_L64_H + +#ifndef __ASSEMBLY__ +/* + * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the + * header files exported to user space + */ + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + +typedef __signed__ long __s64; +typedef unsigned long __u64; + +#endif /* __ASSEMBLY__ */ + +#ifdef __KERNEL__ + +#ifndef __ASSEMBLY__ + +typedef signed char s8; +typedef unsigned char u8; + +typedef signed short s16; +typedef unsigned short u16; + +typedef signed int s32; +typedef unsigned int u32; + +typedef signed long s64; +typedef unsigned long u64; + +#define S8_C(x) x +#define U8_C(x) x ## U +#define S16_C(x) x +#define U16_C(x) x ## U +#define S32_C(x) x +#define U32_C(x) x ## U +#define S64_C(x) x ## L +#define U64_C(x) x ## UL + +#else /* __ASSEMBLY__ */ + +#define S8_C(x) x +#define U8_C(x) x +#define S16_C(x) x +#define U16_C(x) x +#define S32_C(x) x +#define U32_C(x) x +#define S64_C(x) x +#define U64_C(x) x + +#endif /* __ASSEMBLY__ */ + +#endif /* __KERNEL__ */ + +#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 00000000000..260948905e4 --- /dev/null +++ b/include/asm-generic/int-ll64.h @@ -0,0 +1,76 @@ +/* + * asm-generic/int-ll64.h + * + * Integer declarations for architectures which use "long long" + * for 64-bit types. + */ + +#ifndef _ASM_GENERIC_INT_LL64_H +#define _ASM_GENERIC_INT_LL64_H + +#ifndef __ASSEMBLY__ +/* + * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the + * header files exported to user space + */ + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + +#ifdef __GNUC__ +__extension__ typedef __signed__ long long __s64; +__extension__ typedef unsigned long long __u64; +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +typedef __signed__ long long __s64; +typedef unsigned long long __u64; +#endif + +#endif /* __ASSEMBLY__ */ + +#ifdef __KERNEL__ + +#ifndef __ASSEMBLY__ + +typedef signed char s8; +typedef unsigned char u8; + +typedef signed short s16; +typedef unsigned short u16; + +typedef signed int s32; +typedef unsigned int u32; + +typedef signed long long s64; +typedef unsigned long long u64; + +#define S8_C(x) x +#define U8_C(x) x ## U +#define S16_C(x) x +#define U16_C(x) x ## U +#define S32_C(x) x +#define U32_C(x) x ## U +#define S64_C(x) x ## LL +#define U64_C(x) x ## ULL + +#else /* __ASSEMBLY__ */ + +#define S8_C(x) x +#define U8_C(x) x +#define S16_C(x) x +#define U16_C(x) x +#define S32_C(x) x +#define U32_C(x) x +#define S64_C(x) x +#define U64_C(x) x + +#endif /* __ASSEMBLY__ */ + +#endif /* __KERNEL__ */ + +#endif /* _ASM_GENERIC_INT_LL64_H */ diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h index 56566e2a09f..12875190b15 100644 --- a/include/asm-h8300/types.h +++ b/include/asm-h8300/types.h @@ -1,6 +1,8 @@ #ifndef _H8300_TYPES_H #define _H8300_TYPES_H +#include <asm-generic/int-ll64.h> + #if !defined(__ASSEMBLY__) /* @@ -14,41 +16,10 @@ typedef unsigned short umode_t; /* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - -/* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - #define BITS_PER_LONG 32 /* Dma addresses are 32-bits wide. */ diff --git a/include/asm-ia64/types.h b/include/asm-ia64/types.h index 902850d1242..e36b3716e71 100644 --- a/include/asm-ia64/types.h +++ b/include/asm-ia64/types.h @@ -13,6 +13,8 @@ * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co */ +#include <asm-generic/int-l64.h> + #ifdef __ASSEMBLY__ # define __IA64_UL(x) (x) # define __IA64_UL_CONST(x) x @@ -28,39 +30,10 @@ typedef unsigned int umode_t; /* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -typedef __signed__ long __s64; -typedef unsigned long __u64; - -/* * These aren't exported outside the kernel to avoid name space clashes */ # ifdef __KERNEL__ -typedef __s8 s8; -typedef __u8 u8; - -typedef __s16 s16; -typedef __u16 u16; - -typedef __s32 s32; -typedef __u32 u32; - -typedef __s64 s64; -typedef __u64 u64; - #define BITS_PER_LONG 64 /* DMA addresses are 64-bits wide, in general. */ diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index b64c16639a7..bc9f7fff0ac 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h @@ -1,28 +1,12 @@ #ifndef _ASM_M32R_TYPES_H #define _ASM_M32R_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif #endif /* __ASSEMBLY__ */ /* @@ -34,18 +18,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* DMA addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-m68k/types.h b/include/asm-m68k/types.h index c35c09d93b6..6441cb5f8e7 100644 --- a/include/asm-m68k/types.h +++ b/include/asm-m68k/types.h @@ -8,30 +8,12 @@ * not a major issue. However, for interoperability, libraries still * need to be careful to avoid a name clashes. */ +#include <asm-generic/int-ll64.h> #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -43,18 +25,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* DMA addresses are always 32-bits wide */ typedef u32 dma_addr_t; diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index 2dd147f519d..7a2ee4f4013 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h @@ -9,36 +9,16 @@ #ifndef _ASM_TYPES_H #define _ASM_TYPES_H +#if _MIPS_SZLONG == 64 +# include <asm-generic/int-l64.h> +#else +# include <asm-generic/int-ll64.h> +#endif + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if (_MIPS_SZLONG == 64) - -typedef __signed__ long __s64; -typedef unsigned long __u64; - -#else - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif #endif /* __ASSEMBLY__ */ @@ -52,30 +32,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ - -typedef __signed char s8; -typedef unsigned char u8; - -typedef __signed short s16; -typedef unsigned short u16; - -typedef __signed int s32; -typedef unsigned int u32; - -#if (_MIPS_SZLONG == 64) - -typedef __signed__ long s64; -typedef unsigned long u64; - -#else - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long s64; -typedef unsigned long long u64; -#endif - -#endif - #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ || defined(CONFIG_64BIT) typedef u64 dma_addr_t; diff --git a/include/asm-mn10300/types.h b/include/asm-mn10300/types.h index d40ea7628bf..7b9f01042fd 100644 --- a/include/asm-mn10300/types.h +++ b/include/asm-mn10300/types.h @@ -11,29 +11,12 @@ #ifndef _ASM_TYPES_H #define _ASM_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -45,18 +28,6 @@ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 56c84802da5..7f5a39bfb4c 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h @@ -1,29 +1,12 @@ #ifndef _PARISC_TYPES_H #define _PARISC_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -41,18 +24,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h index c243a6ac60e..d3374bc865b 100644 --- a/include/asm-powerpc/types.h +++ b/include/asm-powerpc/types.h @@ -1,6 +1,12 @@ #ifndef _ASM_POWERPC_TYPES_H #define _ASM_POWERPC_TYPES_H +#ifdef __powerpc64__ +# include <asm-generic/int-l64.h> +#else +# include <asm-generic/int-ll64.h> +#endif + #ifndef __ASSEMBLY__ /* @@ -22,30 +28,6 @@ typedef unsigned int umode_t; typedef unsigned short umode_t; #endif -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#ifdef __powerpc64__ -typedef __signed__ long __s64; -typedef unsigned long __u64; -#else -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif -#endif /* __powerpc64__ */ - typedef struct { __u32 u[4]; } __attribute__((aligned(16))) __vector128; @@ -64,24 +46,6 @@ typedef struct { #ifndef __ASSEMBLY__ - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -#ifdef __powerpc64__ -typedef signed long s64; -typedef unsigned long u64; -#else -typedef signed long long s64; -typedef unsigned long long u64; -#endif - typedef __vector128 vector128; /* Physical address used by some IO functions */ diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 2c5879ae90c..78dda038dd4 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h @@ -9,34 +9,16 @@ #ifndef _S390_TYPES_H #define _S390_TYPES_H +#ifndef __s390x__ +# include <asm-generic/int-l64.h> +#else +# include <asm-generic/int-ll64.h> +#endif + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#ifndef __s390x__ -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif -#else /* __s390x__ */ -typedef __signed__ long __s64; -typedef unsigned long __u64; -#endif - /* A address type so that arithmetic can be done on it & it can be upgraded to 64 bit when necessary */ @@ -58,24 +40,6 @@ typedef __signed__ long saddr_t; #ifndef __ASSEMBLY__ - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -#ifndef __s390x__ -typedef signed long long s64; -typedef unsigned long long u64; -#else /* __s390x__ */ -typedef signed long s64; -typedef unsigned long u64; -#endif /* __s390x__ */ - typedef u32 dma_addr_t; #ifndef __s390x__ diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index a6e1d4126e6..beea4e6f8df 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h @@ -1,29 +1,12 @@ #ifndef __ASM_SH_TYPES_H #define __ASM_SH_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -35,19 +18,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ - -typedef __signed__ char s8; -typedef unsigned char u8; - -typedef __signed__ short s16; -typedef unsigned short u16; - -typedef __signed__ int s32; -typedef unsigned int u32; - -typedef __signed__ long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h index 42fc6ed9815..1b08ef860a6 100644 --- a/include/asm-sparc/types.h +++ b/include/asm-sparc/types.h @@ -3,34 +3,18 @@ #define _SPARC_TYPES_H /* - * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space. - */ - -/* * This file is never included by application software unless * explicitly requested (e.g., via linux/types.h) in which case the * application is Linux specific so (user-) name space pollution is * not a major issue. However, for interoperability, libraries still * need to be careful to avoid a name clashes. */ +#include <asm-generic/int-ll64.h> #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -typedef __signed__ long long __s64; -typedef unsigned long long __u64; - #endif /* __ASSEMBLY__ */ #ifdef __KERNEL__ @@ -39,18 +23,6 @@ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef __signed__ char s8; -typedef unsigned char u8; - -typedef __signed__ short s16; -typedef unsigned short u16; - -typedef __signed__ int s32; -typedef unsigned int u32; - -typedef __signed__ long long s64; -typedef unsigned long long u64; - typedef u32 dma_addr_t; typedef u32 dma64_addr_t; diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h index d0ee7f10583..5dbe04f4044 100644 --- a/include/asm-sparc64/types.h +++ b/include/asm-sparc64/types.h @@ -9,28 +9,12 @@ * not a major issue. However, for interoperability, libraries still * need to be careful to avoid a name clashes. */ +#include <asm-generic/int-l64.h> #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space. - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -typedef __signed__ long __s64; -typedef unsigned long __u64; - #endif /* __ASSEMBLY__ */ #ifdef __KERNEL__ @@ -39,18 +23,6 @@ typedef unsigned long __u64; #ifndef __ASSEMBLY__ -typedef __signed__ char s8; -typedef unsigned char u8; - -typedef __signed__ short s16; -typedef unsigned short u16; - -typedef __signed__ int s32; -typedef unsigned int u32; - -typedef __signed__ long s64; -typedef unsigned long u64; - /* Dma addresses come in generic and 64-bit flavours. */ typedef u32 dma_addr_t; diff --git a/include/asm-v850/types.h b/include/asm-v850/types.h index 284bda88211..89f735ee41d 100644 --- a/include/asm-v850/types.h +++ b/include/asm-v850/types.h @@ -10,28 +10,10 @@ * not a major issue. However, for interoperability, libraries still * need to be careful to avoid a name clashes. */ +#include <asm-generic/int-ll64.h> typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - #endif /* !__ASSEMBLY__ */ /* @@ -43,18 +25,6 @@ __extension__ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h index 63733f31568..1ac80cd9acf 100644 --- a/include/asm-x86/types.h +++ b/include/asm-x86/types.h @@ -1,34 +1,12 @@ #ifndef _ASM_X86_TYPES_H #define _ASM_X86_TYPES_H +#include <asm-generic/int-ll64.h> + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#ifdef __i386__ -# ifdef __GNUC__ -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -# endif -#else -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -44,18 +22,6 @@ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - typedef u64 dma64_addr_t; #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G) /* DMA addresses come in 32-bit and 64-bit flavours. */ diff --git a/include/asm-xtensa/types.h b/include/asm-xtensa/types.h index b27d841a8eb..c89569a8da0 100644 --- a/include/asm-xtensa/types.h +++ b/include/asm-xtensa/types.h @@ -11,6 +11,7 @@ #ifndef _XTENSA_TYPES_H #define _XTENSA_TYPES_H +#include <asm-generic/int-ll64.h> #ifdef __ASSEMBLY__ # define __XTENSA_UL(x) (x) @@ -25,42 +26,10 @@ typedef unsigned short umode_t; /* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) -__extension__ typedef __signed__ long long __s64; -__extension__ typedef unsigned long long __u64; -#endif - -/* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ -typedef __signed__ char s8; -typedef unsigned char u8; - -typedef __signed__ short s16; -typedef unsigned short u16; - -typedef __signed__ int s32; -typedef unsigned int u32; - -typedef __signed__ long long s64; -typedef unsigned long long u64; - - #define BITS_PER_LONG 32 /* Dma addresses are 32-bits wide. */ |