svn commit: trunk/uClibc: include libc/sysdeps/linux/common

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Nov 19 09:27:12 UTC 2008


On Wed, Nov 19, 2008 at 10:11:27AM +0100, Peter Kjellerstedt wrote:

>The above will not work for any compiler older than 4.3. For compilers
>with version 4.0 and 4.1 it will not work because __cold and __hot are
>never defined, and for compilers older than 4.0 (yes, some of us are
>limited to use such old compilers) it will not work because __cold and
>__hot _are_ defined (but the attributes do not exist).
>
>Please consider using the following code instead:

right, sorry. Please install.
>
>#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
># ifndef __cold
>#   define __cold __attribute__ ((__cold__))
># endif
># ifndef __hot
>#   define __hot __attribute__ ((__hot__))
># endif
>#else
># ifndef __cold
>#   define __cold
># endif
># ifndef __hot
>#   define __hot
># endif
>#endif



More information about the uClibc mailing list