X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fcompiler.h;h=47c296e202d1e97388d3207e4f0c2321831a2f87;hb=99d969612f6e46192b4a963a7e5f8466a884f920;hp=54999a7e82d056c656d24259d9aa7e6ba167180e;hpb=a7551a3f790eca96be14ef3276326cdd63b5d2f4;p=u-boot diff --git a/include/compiler.h b/include/compiler.h index 54999a7e82..47c296e202 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -48,6 +48,11 @@ # include typedef unsigned long ulong; #endif +#ifdef __FreeBSD__ +# include /* htole32 and friends */ +#endif + +#include typedef uint8_t __u8; typedef uint16_t __u16; @@ -107,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 @@ -123,19 +136,7 @@ typedef unsigned int uint; #define __WORDSIZE 32 #endif -/* Types for `void *' pointers. */ -#if __WORDSIZE == 64 -typedef unsigned long int uintptr_t; -#elif __WORDSIZE == 32 -typedef unsigned int uintptr_t; -#else -#error "__WORDSIZE has unexpected value" -#endif - -#endif - -/* 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)