]> wimlib.net Git - wimlib/blob - include/wimlib/types.h
0b53376771d1f6ddbd6c07a5e6096134edb8826d
[wimlib] / include / wimlib / types.h
1 #ifndef _WIMLIB_TYPES_H
2 #define _WIMLIB_TYPES_H
3
4 #include "wimlib_tchar.h"
5 #include "wimlib/compiler.h"
6
7 #include <inttypes.h>
8 #include <stdbool.h>
9 #include <stddef.h>
10
11 #ifndef _NTFS_TYPES_H
12 /* Unsigned integer types of exact size in bits */
13 typedef uint8_t  u8;
14 typedef uint16_t u16;
15 typedef uint32_t u32;
16 typedef uint64_t u64;
17
18 /* Signed integer types of exact size in bits */
19 typedef int8_t  s8;
20 typedef int16_t s16;
21 typedef int32_t s32;
22 typedef int64_t s64;
23
24 /* Unsigned little endian types of exact size */
25 typedef uint8_t  _bitwise_attr le8;
26 typedef uint16_t _bitwise_attr le16;
27 typedef uint32_t _bitwise_attr le32;
28 typedef uint64_t _bitwise_attr le64;
29
30 /* Signed little endian types of exact size (declare as unsigned to avoid sign
31  * extension on big-endian architectures) */
32 typedef uint8_t  _bitwise_attr sle8;
33 typedef uint16_t _bitwise_attr sle16;
34 typedef uint32_t _bitwise_attr sle32;
35 typedef uint64_t _bitwise_attr sle64;
36
37 /* Unsigned big endian types of exact size */
38 typedef uint8_t  _bitwise_attr be8;
39 typedef uint16_t _bitwise_attr be16;
40 typedef uint32_t _bitwise_attr be32;
41 typedef uint64_t _bitwise_attr be64;
42
43 #endif
44
45 /* A pointer to 'utf16lechar' indicates a UTF-16LE encoded string */
46 typedef le16 utf16lechar;
47
48 #ifndef WIMLIB_WIMSTRUCT_DECLARED
49 typedef struct WIMStruct WIMStruct;
50 #  define WIMLIB_WIMSTRUCT_DECLARED
51 #endif
52
53 #endif