emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 8acb88c: Minor INFINITY/NAN cleanup


From: Paul Eggert
Subject: [Emacs-diffs] master 8acb88c: Minor INFINITY/NAN cleanup
Date: Mon, 7 Jan 2019 01:03:19 -0500 (EST)

branch: master
commit 8acb88c5026cb11cbff466f53bef9d3e864879e7
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 src/lread.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/lread.c b/src/lread.c
index 788e57b..02f7caa 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]