1 /* 2 * If linux/types.h is already been included, assume it has defined 3 * everything we need. (cross fingers) Other header files may have 4 * also defined the types that we need. 5 */ 6 #if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ 7 !defined(_EXT2_TYPES_H)) 8 #define _EXT2_TYPES_H 9 10 @ASM_TYPES_HEADER@ 11 12 #ifdef __U8_TYPEDEF 13 typedef __U8_TYPEDEF __u8; 14 #else 15 typedef unsigned char __u8; 16 #endif 17 18 #ifdef __S8_TYPEDEF 19 typedef __S8_TYPEDEF __s8; 20 #else 21 typedef signed char __s8; 22 #endif 23 24 #ifdef __U16_TYPEDEF 25 typedef __U16_TYPEDEF __u16; 26 #else 27 #if (@SIZEOF_INT@ == 2) 28 typedef unsigned int __u16; 29 #else 30 #if (@SIZEOF_SHORT@ == 2) 31 typedef unsigned short __u16; 32 #else 33 ?==error: undefined 16 bit type 34 #endif /* SIZEOF_SHORT == 2 */ 35 #endif /* SIZEOF_INT == 2 */ 36 #endif /* __U16_TYPEDEF */ 37 38 #ifdef __S16_TYPEDEF 39 typedef __S16_TYPEDEF __s16; 40 #else 41 #if (@SIZEOF_INT@ == 2) 42 typedef int __s16; 43 #else 44 #if (@SIZEOF_SHORT@ == 2) 45 typedef short __s16; 46 #else 47 ?==error: undefined 16 bit type 48 #endif /* SIZEOF_SHORT == 2 */ 49 #endif /* SIZEOF_INT == 2 */ 50 #endif /* __S16_TYPEDEF */ 51 52 53 #ifdef __U32_TYPEDEF 54 typedef __U32_TYPEDEF __u32; 55 #else 56 #if (@SIZEOF_INT@ == 4) 57 typedef unsigned int __u32; 58 #else 59 #if (@SIZEOF_LONG@ == 4) 60 typedef unsigned long __u32; 61 #else 62 #if (@SIZEOF_SHORT@ == 4) 63 typedef unsigned short __u32; 64 #else 65 ?== error: undefined 32 bit type 66 #endif /* SIZEOF_SHORT == 4 */ 67 #endif /* SIZEOF_LONG == 4 */ 68 #endif /* SIZEOF_INT == 4 */ 69 #endif /* __U32_TYPEDEF */ 70 71 #ifdef __S32_TYPEDEF 72 typedef __S32_TYPEDEF __s32; 73 #else 74 #if (@SIZEOF_INT@ == 4) 75 typedef int __s32; 76 #else 77 #if (@SIZEOF_LONG@ == 4) 78 typedef long __s32; 79 #else 80 #if (@SIZEOF_SHORT@ == 4) 81 typedef short __s32; 82 #else 83 ?== error: undefined 32 bit type 84 #endif /* SIZEOF_SHORT == 4 */ 85 #endif /* SIZEOF_LONG == 4 */ 86 #endif /* SIZEOF_INT == 4 */ 87 #endif /* __S32_TYPEDEF */ 88 89 #ifdef __U64_TYPEDEF 90 typedef __U64_TYPEDEF __u64; 91 #else 92 #if (@SIZEOF_INT@ == 8) 93 typedef unsigned int __u64; 94 #else 95 #if (@SIZEOF_LONG@ == 8) 96 typedef unsigned long __u64; 97 #else 98 #if (@SIZEOF_LONG_LONG@ == 8) 99 typedef unsigned long long __u64; 100 #endif /* SIZEOF_LONG_LONG == 8 */ 101 #endif /* SIZEOF_LONG == 8 */ 102 #endif /* SIZEOF_INT == 8 */ 103 #endif /* __U64_TYPEDEF */ 104 105 #ifdef __S64_TYPEDEF 106 typedef __S64_TYPEDEF __s64; 107 #else 108 #if (@SIZEOF_INT@ == 8) 109 typedef int __s64; 110 #else 111 #if (@SIZEOF_LONG@ == 8) 112 typedef long __s64; 113 #else 114 #if (@SIZEOF_LONG_LONG@ == 8) 115 #if defined(__GNUC__) 116 typedef __signed__ long long __s64; 117 #else 118 typedef signed long long __s64; 119 #endif /* __GNUC__ */ 120 #endif /* SIZEOF_LONG_LONG == 8 */ 121 #endif /* SIZEOF_LONG == 8 */ 122 #endif /* SIZEOF_INT == 8 */ 123 #endif /* __S64_TYPEDEF */ 124 125 #undef __S8_TYPEDEF 126 #undef __U8_TYPEDEF 127 #undef __S16_TYPEDEF 128 #undef __U16_TYPEDEF 129 #undef __S32_TYPEDEF 130 #undef __U32_TYPEDEF 131 #undef __S64_TYPEDEF 132 #undef __U64_TYPEDEF 133 134 #endif /* _*_TYPES_H */ 135 136 @PUBLIC_CONFIG_HEADER@ 137