]> wimlib.net Git - wimlib/blobdiff - include/wimlib/types.h
Cleanup timestamp conversion code
[wimlib] / include / wimlib / types.h
index 0b53376771d1f6ddbd6c07a5e6096134edb8826d..84b55be31f0a1030dda7a44f89c00e6233d1960c 100644 (file)
@@ -22,20 +22,17 @@ typedef int32_t s32;
 typedef int64_t s64;
 
 /* Unsigned little endian types of exact size */
-typedef uint8_t  _bitwise_attr le8;
 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 uint8_t  _bitwise_attr sle8;
 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 uint8_t  _bitwise_attr be8;
 typedef uint16_t _bitwise_attr be16;
 typedef uint32_t _bitwise_attr be32;
 typedef uint64_t _bitwise_attr be64;
@@ -50,4 +47,13 @@ typedef struct WIMStruct WIMStruct;
 #  define WIMLIB_WIMSTRUCT_DECLARED
 #endif
 
-#endif
+/*
+ * Type of a machine word.  'unsigned long' would be logical, but that is only
+ * 32 bits on x86_64 Windows.  The same applies to 'uint_fast32_t'.  So the best
+ * we can do without a bunch of #ifdefs appears to be 'size_t'.
+ */
+typedef size_t machine_word_t;
+
+#define WORDSIZE       sizeof(machine_word_t)
+
+#endif /* _WIMLIB_TYPES_H */