Whamcloud - gitweb
Wholesale changes to blkid library to simplify the implementation
[tools/e2fsprogs.git] / lib / blkid / blkid_types.h.in
1 #ifndef _EXT2_TYPES_H
2 #define _EXT2_TYPES_H
3
4 /* 
5  * If linux/types.h is already been included, assume it has defined
6  * everything we need.  (cross fingers)
7  */
8 #ifndef _LINUX_TYPES_H
9
10 typedef unsigned char __u8;
11 typedef signed char __s8;
12
13 #if (@SIZEOF_INT@ == 8)
14 typedef int             __s64;
15 typedef unsigned int    __u64;
16 #elif (@SIZEOF_LONG@ == 8)
17 typedef long            __s64;
18 typedef unsigned long   __u64;
19 #elif (@SIZEOF_LONG_LONG@ == 8)
20 #if defined(__GNUC__)
21 typedef __signed__ long long    __s64;
22 #else
23 typedef signed long long        __s64;
24 #endif
25 typedef unsigned long long      __u64;
26 #endif
27
28 #if (@SIZEOF_INT@ == 2)
29 typedef int             __s16;
30 typedef unsigned int    __u16;
31 #elif (@SIZEOF_SHORT@ == 2)
32 typedef short           __s16;
33 typedef unsigned short  __u16;
34 #else
35   ?==error: undefined 16 bit type
36 #endif
37
38 #if (@SIZEOF_INT@ == 4)
39 typedef int             __s32;
40 typedef unsigned int    __u32;
41 #elif (@SIZEOF_LONG@ == 4)
42 typedef long            __s32;
43 typedef unsigned long   __u32;
44 #elif (@SIZEOF_SHORT@ == 4)
45 typedef short           __s32;
46 typedef unsigned short  __u32;
47 #else
48  ?== error: undefined 32 bit type
49 #endif
50
51 #endif /* LINUX_TYPES_H */
52
53 #endif /* EXT2_TYPES_H */