-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtypes.h
More file actions
46 lines (38 loc) · 913 Bytes
/
types.h
File metadata and controls
46 lines (38 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef __TYPES_H__
#define __TYPES_H__
#if __SIZEOF_LONG__ == 8
# define BITS 64
#elif __SIZEOF_LONG__ == 4
# define BITS 32
#else
# error unexpected word size
#endif
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# define BIGENDIAN
#elif __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
# error unexpected byte order
#endif
typedef unsigned char byte;
typedef unsigned short ushort;
typedef unsigned uint;
typedef unsigned long ulong;
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
#if BITS == 64
typedef signed long int64_t;
typedef unsigned long uint64_t;
#else
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#endif
typedef int uid_t;
typedef int gid_t;
typedef int pid_t;
typedef long time_t;
typedef unsigned long size_t;
typedef int64_t off_t;
#endif