浏览代码

Arm needs this to compile with gcc 2.95

Eric Andersen 21 年之前
父节点
当前提交
48c0f2f304
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 12 0
      ldso/ldso/arm/dl-syscalls.h
  2. 12 0
      ldso/ldso/arm/ld_syscalls.h

+ 12 - 0
ldso/ldso/arm/dl-syscalls.h

@@ -3,5 +3,17 @@
  * before the errno symbol is dynamicly linked. */
 
 #define __set_errno(X) {(void)(X);}
+
+/* Prepare for the case that `__builtin_expect' is not available.  */
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+#ifndef likely
+# define likely(x)	__builtin_expect((!!(x)),1)
+#endif
+#ifndef unlikely
+# define unlikely(x)	__builtin_expect((!!(x)),0)
+#endif
+
 #include "sys/syscall.h"
 

+ 12 - 0
ldso/ldso/arm/ld_syscalls.h

@@ -3,5 +3,17 @@
  * before the errno symbol is dynamicly linked. */
 
 #define __set_errno(X) {(void)(X);}
+
+/* Prepare for the case that `__builtin_expect' is not available.  */
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+#ifndef likely
+# define likely(x)	__builtin_expect((!!(x)),1)
+#endif
+#ifndef unlikely
+# define unlikely(x)	__builtin_expect((!!(x)),0)
+#endif
+
 #include "sys/syscall.h"