]> wimlib.net Git - wimlib/blob - include/wimlib/types.h
Delete useless 1-byte explicit endian types
[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 uint16_t _bitwise_attr le16;
26 typedef uint32_t _bitwise_attr le32;
27 typedef uint64_t _bitwise_attr le64;
28
29 /* Signed little endian types of exact size (declare as unsigned to avoid sign
30  * extension on big-endian architectures) */
31 typedef uint16_t _bitwise_attr sle16;
32 typedef uint32_t _bitwise_attr sle32;
33 typedef uint64_t _bitwise_attr sle64;
34
35 /* Unsigned big endian types of exact size */
36 typedef uint16_t _bitwise_attr be16;
37 typedef uint32_t _bitwise_attr be32;
38 typedef uint64_t _bitwise_attr be64;
39
40 #endif
41
42 /* A pointer to 'utf16lechar' indicates a UTF-16LE encoded string */
43 typedef le16 utf16lechar;
44
45 #ifndef WIMLIB_WIMSTRUCT_DECLARED
46 typedef struct WIMStruct WIMStruct;
47 #  define WIMLIB_WIMSTRUCT_DECLARED
48 #endif
49
50 #endif