X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fisnanf.h;h=774942c728e2499f9c63afd7ec67c55e1c9c0531;hb=6c38d72875ec56c4b2c250717d458e70b2cb97ef;hp=67bbfc6793fdbce19de06c20b9e625e4193bd376;hpb=57fdfd3f8ec62b105c53bcdf6f127c35c7fe7391;p=gnulib.git diff --git a/lib/isnanf.h b/lib/isnanf.h index 67bbfc679..774942c72 100644 --- a/lib/isnanf.h +++ b/lib/isnanf.h @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,11 @@ #if HAVE_ISNANF_IN_LIBC /* Get declaration of isnan macro or (older) isnanf function. */ # include -# ifdef isnan +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnanf +# define isnanf(x) __builtin_isnanf ((float)(x)) +# elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) # endif