-# define WIMLIBAPI
-# define _always_inline_attribute inline
-# define _no_inline_attribute
-# define _format_attribute(type, format_str, args_start)
-# define _cold_attribute
-# define _packed_attribute
-# define _malloc_attribute
-# define _warn_unused_result_attribute
-# define _aligned_attribute(size)
-# define likely(x) (x)
-# define unlikely(x) (x)
-# define prefetch(x)
-# define is_constant(x) (0)
-#endif /* __GNUC__ */
+# error "Unrecognized compiler. Please add a header file for your compiler."
+#endif
+
+#ifndef WIMLIBAPI
+# define WIMLIBAPI
+#endif
+
+#ifndef _packed_attribute
+# error "missing required definition of _packed_attribute"
+#endif
+
+#ifndef _aligned_attribute
+# error "missing required definition of _aligned_attribute"
+#endif
+
+#ifndef _may_alias_attribute
+# error "missing required definition of _may_alias_attribute"
+#endif
+
+#ifndef likely
+# define likely(expr) (expr)
+#endif
+
+#ifndef unlikely
+# define unlikely(expr) (expr)
+#endif
+
+#ifndef prefetch
+# define prefetch(addr)
+#endif
+
+#ifndef _cold_attribute
+# define _cold_attribute
+#endif
+
+#ifndef _malloc_attribute
+# define _malloc_attribute
+#endif
+
+#ifndef _format_attribute
+# define _format_attribute(type, format_str, format_start)
+#endif
+
+#ifndef CPU_IS_BIG_ENDIAN
+# error "missing required definition of CPU_IS_BIG_ENDIAN"
+#endif
+
+#define CPU_IS_LITTLE_ENDIAN (!CPU_IS_BIG_ENDIAN)
+
+#ifndef UNALIGNED_ACCESS_SPEED
+# define UNALIGNED_ACCESS_SPEED 0
+#endif
+
+#define UNALIGNED_ACCESS_IS_ALLOWED (UNALIGNED_ACCESS_SPEED >= 1)
+#define UNALIGNED_ACCESS_IS_FAST (UNALIGNED_ACCESS_SPEED >= 2)
+#define UNALIGNED_ACCESS_IS_VERY_FAST (UNALIGNED_ACCESS_SPEED >= 3)
+
+#ifndef typeof
+# error "missing required definition of typeof"
+#endif
+
+#if !defined(min) || !defined(max) || !defined(swap)
+# error "missing required definitions of min(), max(), and swap() macros"
+#endif