Merge branch 'master' of /home/wd/git/u-boot/master
[platform/kernel/u-boot.git] / include / compiler.h
index e602cce..23f4b83 100644 (file)
@@ -25,8 +25,6 @@
 #include <stdio.h>
 #include <string.h>
 
-extern int errno;
-
 #if !defined(__WIN32__) && !defined(__MINGW32__)
 # include <sys/mman.h>
 #endif
@@ -55,6 +53,7 @@ typedef unsigned int  uint;
 typedef uint8_t __u8;
 typedef uint16_t __u16;
 typedef uint32_t __u32;
+typedef unsigned int uint;
 
 #define uswap_16(x) \
        ((((x) & 0xff00) >> 8) | \
@@ -125,4 +124,7 @@ typedef unsigned int            uintptr_t;
 /* compiler options */
 #define uninitialized_var(x)           x = x
 
+#define likely(x)      __builtin_expect(!!(x), 1)
+#define unlikely(x)    __builtin_expect(!!(x), 0)
+
 #endif