summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-01-06 21:59:03 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-01-06 22:03:15 -0800
commit8acb88c5026cb11cbff466f53bef9d3e864879e7 (patch)
treea2ea6b19ce316e988143655fb5eb06cfb8655fb5 /src/lread.c
parent202bd7bff2710b98cde4ae4b6e1f6de9818591f8 (diff)
downloademacs-8acb88c5026cb11cbff466f53bef9d3e864879e7.tar.gz
Minor INFINITY/NAN cleanup
* src/lread.c (INFINITY): Use a more-portable way to specify this macro on non-C99 platforms that lack it. (NAN): Remove; unused.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lread.c b/src/lread.c
index 788e57b707f..02f7caadeda 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -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.