X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fcompiler.h;h=47c296e202d1e97388d3207e4f0c2321831a2f87;hb=f5c18e190e3cecede1a413a889c84aec9cc6d34f;hp=9afc11be1942d6b9e2c4ba19ed059fd288447685;hpb=740f41d3cbefe2068247852220226c2c3b287249;p=karo-tx-uboot.git diff --git a/include/compiler.h b/include/compiler.h index 9afc11be19..47c296e202 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -48,6 +48,10 @@ # include typedef unsigned long ulong; #endif +#ifdef __FreeBSD__ +# include /* htole32 and friends */ +#endif + #include typedef uint8_t __u8; @@ -108,6 +112,14 @@ typedef unsigned int uint; #else /* !USE_HOSTCC */ +#ifdef CONFIG_USE_STDINT +/* Provided by gcc. */ +#include +#else +/* Type for `void *' pointers. */ +typedef unsigned long int uintptr_t; +#endif + #include #include #include @@ -124,14 +136,8 @@ typedef unsigned int uint; #define __WORDSIZE 32 #endif -/* Type for `void *' pointers. */ -typedef unsigned long int uintptr_t; - #endif /* USE_HOSTCC */ -/* compiler options */ -#define uninitialized_var(x) x = x - #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0)