]> wimlib.net Git - wimlib/blobdiff - include/wimlib/compiler.h
Delete useless 1-byte explicit endian types
[wimlib] / include / wimlib / compiler.h
index 21fabd995f01fa75a09f58e085f383495a6a339a..567f07d074007bdd11566f3508dc245feda19e2d 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * compiler.h
+ *
+ * The author dedicates this file to the public domain.
+ * You can do whatever you want with this file.
+ */
+
 #ifndef _WIMLIB_COMPILER_H
 #define _WIMLIB_COMPILER_H
 
@@ -23,6 +30,7 @@
 #      define unlikely(x) __builtin_expect(!!(x), 0)
 #      define inline inline __attribute__((always_inline))
 #      define prefetch(x) __builtin_prefetch(x)
+#      define is_constant(x) __builtin_constant_p(x)
 #else
 #      define WIMLIBAPI
 #      define _always_inline_attribute inline
 #      define likely(x) (x)
 #      define unlikely(x) (x)
 #      define prefetch(x)
+#      define is_constant(x) (0)
 #endif /* __GNUC__ */
 
+#ifdef __CHECKER__
+#  define _bitwise_attr        __attribute__((bitwise))
+#  define _force_attr  __attribute__((force))
+#else
+#  define _bitwise_attr
+#  define _force_attr
+#endif
+
 #endif /* _WIMLIB_COMPILER_H */