]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor INFINITY/NAN cleanup
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Jan 2019 05:59:03 +0000 (21:59 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Jan 2019 06:03:15 +0000 (22:03 -0800)
* src/lread.c (INFINITY): Use a more-portable way to specify
this macro on non-C99 platforms that lack it.
(NAN): Remove; unused.

src/lread.c

index 788e57b707f57a2660c3960132adc38f02b971ce..02f7caadeda002c69dd0798518b1d166eeb0b372 100644 (file)
@@ -46,10 +46,6 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifdef MSDOS
 #include "msdos.h"
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 5
-# define INFINITY  __builtin_inf()
-# define NAN       __builtin_nan("")
-#endif
 #endif
 
 #ifdef HAVE_NS
@@ -74,6 +70,9 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if IEEE_FLOATING_POINT
 # include <ieee754.h>
+# ifndef INFINITY
+#  define INFINITY ((union ieee754_double) {.ieee = {.exponent = -1}}.d)
+# endif
 #endif
 
 /* The objects or placeholders read with the #n=object form.