X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fisnanl-nolibm.h;h=3dbba8bc67d559b234daff49bad879cf0f632cfa;hb=870daa58035b4bb39549f15d20ad1422dd649d63;hp=77284331d715f30babe59c655c4d385ee67b6414;hpb=57fdfd3f8ec62b105c53bcdf6f127c35c7fe7391;p=gnulib.git diff --git a/lib/isnanl-nolibm.h b/lib/isnanl-nolibm.h index 77284331d..3dbba8bc6 100644 --- a/lib/isnanl-nolibm.h +++ b/lib/isnanl-nolibm.h @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2010 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_ISNANL_IN_LIBC /* Get declaration of isnan macro or (older) isnanl function. */ # include -# ifdef isnan +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnanl +# define isnanl(x) __builtin_isnanl ((long double)(x)) +# elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) # endif