diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-01 18:53:31 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-01 19:01:51 -0700 |
commit | d216d7d248199aa6c99cd642116717c5b301ae6d (patch) | |
tree | 687b9efadbb87fa1095fb0a2e0569e625856e15a /src/lisp.h | |
parent | 2f37ecaefcc61b0bf389f1c1eb3ac1b15105f056 (diff) | |
download | emacs-d216d7d248199aa6c99cd642116717c5b301ae6d.tar.gz emacs-d216d7d248199aa6c99cd642116717c5b301ae6d.tar.bz2 emacs-d216d7d248199aa6c99cd642116717c5b301ae6d.zip |
Substitute a <ieee754.h> on hosts lacking it
* .gitignore: Add lib/ieee754.h.
* admin/merge-gnulib (GNULIB_MODULES): Add ieee754-h.
* configure.ac: Remove ieee754.h check, as Gnulib now does that.
* etc/NEWS: Mention this.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/ieee754.in.h, m4/ieee754-h.m4: New files, from Gnulib.
* src/lisp.h (IEEE_FLOATING_POINT): Now a macro so that it
can be used in #if.
* src/lread.c, src/print.c: Include <ieee754.h> if
IEEE_FLOATING_POINT, not if HAVE_IEEE754_H.
* src/lread.c (string_to_number):
* src/print.c (float_to_string):
Process NaNs only on IEEE hosts, and assume <ieee754.h>
in that case.
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lisp.h b/src/lisp.h index 96de60e4670..bdece817bd6 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2670,17 +2670,14 @@ XFLOAT_DATA (Lisp_Object f) /* Most hosts nowadays use IEEE floating point, so they use IEC 60559 representations, have infinities and NaNs, and do not trap on - exceptions. Define IEEE_FLOATING_POINT if this host is one of the + exceptions. Define IEEE_FLOATING_POINT to 1 if this host is one of the typical ones. The C11 macro __STDC_IEC_559__ is close to what is wanted here, but is not quite right because Emacs does not require all the features of C11 Annex F (and does not require C11 at all, for that matter). */ -enum - { - IEEE_FLOATING_POINT - = (FLT_RADIX == 2 && FLT_MANT_DIG == 24 - && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) - }; + +#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ + && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) /* A character, declared with the following typedef, is a member of some character set associated with the current buffer. */ |