svn commit: trunk/uClibc/include
pkj at uclibc.org
pkj at uclibc.org
Wed Nov 19 12:34:26 UTC 2008
Author: pkj
Date: 2008-11-19 04:34:25 -0800 (Wed, 19 Nov 2008)
New Revision: 24100
Log:
Make sure __hot and __cold are always defined.
Modified:
trunk/uClibc/include/libc-symbols.h
Changeset:
Modified: trunk/uClibc/include/libc-symbols.h
===================================================================
--- trunk/uClibc/include/libc-symbols.h 2008-11-19 10:44:24 UTC (rev 24099)
+++ trunk/uClibc/include/libc-symbols.h 2008-11-19 12:34:25 UTC (rev 24100)
@@ -63,13 +63,20 @@
#ifndef unlikely
# define unlikely(x) __builtin_expect((!!(x)),0)
#endif
-#if defined __GNUC__ && !(__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# ifndef __cold
-# define __cold __attribute__ ((__cold__))
+# define __cold __attribute__ ((__cold__))
# endif
# ifndef __hot
-# define __hot __attribute__ ((__hot__))
+# define __hot __attribute__ ((__hot__))
# endif
+#else
+# ifndef __cold
+# define __cold
+# endif
+# ifndef __hot
+# define __hot
+# endif
#endif
#ifndef __LINUX_COMPILER_H
# define __LINUX_COMPILER_H
More information about the uClibc-cvs
mailing list