浏览代码

Avoid gratuitous conflicts when used with kernel headers

Eric Andersen 21 年之前
父节点
当前提交
113471cb0b
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      include/features.h

+ 6 - 2
include/features.h

@@ -421,8 +421,12 @@ uClibc was built without large file support enabled.
 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
 #define __builtin_expect(x, expected_value) (x)
 #endif
-#define likely(x)	__builtin_expect((!!(x)),1)
-#define unlikely(x)	__builtin_expect((!!(x)),0)
+#ifndef likely
+# define likely(x)	__builtin_expect((!!(x)),1)
+#endif
+#ifndef unlikely
+# define unlikely(x)	__builtin_expect((!!(x)),0)
+#endif
 
 /* --- this is added to integrate linuxthreads */
 #define __USE_UNIX98            1