]> wimlib.net Git - wimlib/blobdiff - include/wimlib/types.h
Delete useless 1-byte explicit endian types
[wimlib] / include / wimlib / types.h
index faf290c96f04c20d2937dbbe64cf6ca4e4039d40..ac67cf4a9a810b0fd7b0a34bc7e1f2c7340c4de9 100644 (file)
@@ -2,6 +2,7 @@
 #define _WIMLIB_TYPES_H
 
 #include "wimlib_tchar.h"
+#include "wimlib/compiler.h"
 
 #include <inttypes.h>
 #include <stdbool.h>
@@ -19,10 +20,27 @@ typedef int8_t  s8;
 typedef int16_t s16;
 typedef int32_t s32;
 typedef int64_t s64;
+
+/* Unsigned little endian types of exact size */
+typedef uint16_t _bitwise_attr le16;
+typedef uint32_t _bitwise_attr le32;
+typedef uint64_t _bitwise_attr le64;
+
+/* Signed little endian types of exact size (declare as unsigned to avoid sign
+ * extension on big-endian architectures) */
+typedef uint16_t _bitwise_attr sle16;
+typedef uint32_t _bitwise_attr sle32;
+typedef uint64_t _bitwise_attr sle64;
+
+/* Unsigned big endian types of exact size */
+typedef uint16_t _bitwise_attr be16;
+typedef uint32_t _bitwise_attr be32;
+typedef uint64_t _bitwise_attr be64;
+
 #endif
 
 /* A pointer to 'utf16lechar' indicates a UTF-16LE encoded string */
-typedef u16 utf16lechar;
+typedef le16 utf16lechar;
 
 #ifndef WIMLIB_WIMSTRUCT_DECLARED
 typedef struct WIMStruct WIMStruct;