]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/compiler.h
mtd: denali: add Denali controller configs to Kconfig
[karo-tx-uboot.git] / include / compiler.h
index 91dbe56994c240c42be04b9d9e848e0e7a1f33c5..14519163a32bfa13d2df16a22d66735b28b52138 100644 (file)
 #ifdef __linux__
 # include <endian.h>
 # include <byteswap.h>
-#elif defined(__MACH__)
+#elif defined(__MACH__) || defined(__FreeBSD__)
 # include <machine/endian.h>
 typedef unsigned long ulong;
 #endif
+#include <time.h>
 
 typedef uint8_t __u8;
 typedef uint16_t __u16;
@@ -111,17 +112,22 @@ typedef unsigned int uint;
 #include <linux/types.h>
 #include <asm/byteorder.h>
 
-/* Types for `void *' pointers. */
-#if __WORDSIZE == 64
-typedef unsigned long int       uintptr_t;
+#if __SIZEOF_LONG__ == 8
+# define __WORDSIZE    64
+#elif __SIZEOF_LONG__ == 4
+# define __WORDSIZE    32
 #else
-typedef unsigned int            uintptr_t;
+/*
+ * Assume 32-bit for now - only newer toolchains support this feature and
+ * this is only required for sandbox support at present.
+ */
+#define __WORDSIZE     32
 #endif
 
-#endif
+/* Type for `void *' pointers. */
+typedef unsigned long int uintptr_t;
 
-/* compiler options */
-#define uninitialized_var(x)           x = x
+#endif /* USE_HOSTCC */
 
 #define likely(x)      __builtin_expect(!!(x), 1)
 #define unlikely(x)    __builtin_expect(!!(x), 0)