X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fcompiler.h;h=29507f9840e0dcbc72ea4c6961b65971f1149bb5;hb=4862830b696a6d0750e19d32a82553cdb41a85f8;hp=9afc11be1942d6b9e2c4ba19ed059fd288447685;hpb=740f41d3cbefe2068247852220226c2c3b287249;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/compiler.h b/include/compiler.h index 9afc11b..29507f9 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -15,7 +15,7 @@ defined(__sun__) || \ defined(__APPLE__) # include -#elif defined(__linux__) || defined(__WIN32__) || defined(__MINGW32__) +#elif defined(__linux__) || defined(__WIN32__) || defined(__MINGW32__) || defined(__OpenBSD__) # include #endif @@ -48,6 +48,18 @@ # include typedef unsigned long ulong; #endif +#ifdef __FreeBSD__ +# include /* htole32 and friends */ +# define __BYTE_ORDER BYTE_ORDER +# define __LITTLE_ENDIAN LITTLE_ENDIAN +# define __BIG_ENDIAN BIG_ENDIAN +#elif defined(__OpenBSD__) +# include +# define __BYTE_ORDER BYTE_ORDER +# define __LITTLE_ENDIAN LITTLE_ENDIAN +# define __BIG_ENDIAN BIG_ENDIAN +#endif + #include typedef uint8_t __u8; @@ -108,6 +120,9 @@ typedef unsigned int uint; #else /* !USE_HOSTCC */ +/* Type for `void *' pointers. */ +typedef unsigned long int uintptr_t; + #include #include #include @@ -124,14 +139,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)