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