chiark / gitweb /
klibc: update to version 1.1.1
[elogind.git] / klibc / include / klibc / compiler.h
index 823996e7773cf9a53e2f3c2560948a36787275a6..7ff6ff7d51bba208dc96bf3f1904e4fb6b977102 100644 (file)
@@ -22,7 +22,7 @@
 
 /* How to declare a function that *must* be inlined */
 #ifdef __GNUC__
-# if __GNUC_MAJOR__ >= 3
+# if __GNUC__ >= 3
 #  define __must_inline static __inline__ __attribute__((always_inline))
 # else
 #  define __must_inline extern __inline__
 #endif
 
 /* malloc() function (returns unaliased pointer) */
-#if defined(__GNUC__) && (__GNUC_MAJOR__ >= 3)
+#if defined(__GNUC__) && (__GNUC__ >= 3)
 # define __mallocfunc __attribute__((malloc))
 #else
 # define __mallocfunc
 #endif
 
 /* likely/unlikely */
-#if defined(__GNUC__) && (__GNUC_MAJOR__ > 2 || (__GNUC_MAJOR__ == 2 && __GNUC_MINOR__ >= 95))
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
 # define __likely(x)   __builtin_expect((x), 1)
 # define __unlikely(x) __builtin_expect((x), 0)
 #else
 # define __bitwise
 #endif
 
+/* Compiler pragma to make an alias symbol */
+#define __ALIAS(__t, __f, __p, __a) \
+  __t __f __p __attribute__((weak, alias(#__a)));
+
 #endif