diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2008-11-19 12:34:25 +0000 |
---|---|---|
committer | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2008-11-19 12:34:25 +0000 |
commit | 2cced20a74b0fd22fd34254e5d92ce06e2cfb60d (patch) | |
tree | da2f8738480c5f962c1c5a869017b9d5947c580f | |
parent | 1f88703025372ee74ce78cc59fa16e4534ff96ae (diff) |
Make sure __hot and __cold are always defined.
-rw-r--r-- | include/libc-symbols.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 64dcf2c07..3f29b9463 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -63,12 +63,19 @@ #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 |