X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fisnanl-nolibm.h;h=fa29f54af7aff825d6c76801b5368925b275779c;hb=2464bbfa7a6b82eca7bf3f7d517515ed462f1b23;hp=77284331d715f30babe59c655c4d385ee67b6414;hpb=57fdfd3f8ec62b105c53bcdf6f127c35c7fe7391;p=gnulib.git diff --git a/lib/isnanl-nolibm.h b/lib/isnanl-nolibm.h index 77284331d..fa29f54af 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-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_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