diff options
| author | Paul Eggert | 2018-08-01 18:53:31 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-08-01 19:01:51 -0700 |
| commit | d216d7d248199aa6c99cd642116717c5b301ae6d (patch) | |
| tree | 687b9efadbb87fa1095fb0a2e0569e625856e15a /m4 | |
| parent | 2f37ecaefcc61b0bf389f1c1eb3ac1b15105f056 (diff) | |
| download | emacs-d216d7d248199aa6c99cd642116717c5b301ae6d.tar.gz 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 'm4')
| -rw-r--r-- | m4/gnulib-comp.m4 | 4 | ||||
| -rw-r--r-- | m4/ieee754-h.m4 | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index a6e3be3815d..494c77c7c4e 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 | |||
| @@ -101,6 +101,7 @@ AC_DEFUN([gl_EARLY], | |||
| 101 | # Code from module gettimeofday: | 101 | # Code from module gettimeofday: |
| 102 | # Code from module gitlog-to-changelog: | 102 | # Code from module gitlog-to-changelog: |
| 103 | # Code from module group-member: | 103 | # Code from module group-member: |
| 104 | # Code from module ieee754-h: | ||
| 104 | # Code from module ignore-value: | 105 | # Code from module ignore-value: |
| 105 | # Code from module include_next: | 106 | # Code from module include_next: |
| 106 | # Code from module intprops: | 107 | # Code from module intprops: |
| @@ -295,6 +296,7 @@ AC_DEFUN([gl_INIT], | |||
| 295 | gl_PREREQ_GETTIMEOFDAY | 296 | gl_PREREQ_GETTIMEOFDAY |
| 296 | fi | 297 | fi |
| 297 | gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) | 298 | gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) |
| 299 | gl_IEEE754_H | ||
| 298 | gl_INTTYPES_INCOMPLETE | 300 | gl_INTTYPES_INCOMPLETE |
| 299 | AC_REQUIRE([gl_LARGEFILE]) | 301 | AC_REQUIRE([gl_LARGEFILE]) |
| 300 | gl_LIMITS_H | 302 | gl_LIMITS_H |
| @@ -895,6 +897,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 895 | lib/gettimeofday.c | 897 | lib/gettimeofday.c |
| 896 | lib/gl_openssl.h | 898 | lib/gl_openssl.h |
| 897 | lib/group-member.c | 899 | lib/group-member.c |
| 900 | lib/ieee754.in.h | ||
| 898 | lib/ignore-value.h | 901 | lib/ignore-value.h |
| 899 | lib/intprops.h | 902 | lib/intprops.h |
| 900 | lib/inttypes.in.h | 903 | lib/inttypes.in.h |
| @@ -1017,6 +1020,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 1017 | m4/gl-openssl.m4 | 1020 | m4/gl-openssl.m4 |
| 1018 | m4/gnulib-common.m4 | 1021 | m4/gnulib-common.m4 |
| 1019 | m4/group-member.m4 | 1022 | m4/group-member.m4 |
| 1023 | m4/ieee754-h.m4 | ||
| 1020 | m4/include_next.m4 | 1024 | m4/include_next.m4 |
| 1021 | m4/inttypes.m4 | 1025 | m4/inttypes.m4 |
| 1022 | m4/largefile.m4 | 1026 | m4/largefile.m4 |
diff --git a/m4/ieee754-h.m4 b/m4/ieee754-h.m4 new file mode 100644 index 00000000000..bf7c332e48e --- /dev/null +++ b/m4/ieee754-h.m4 | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # Configure ieee754-h module | ||
| 2 | |||
| 3 | dnl Copyright 2018 Free Software Foundation, Inc. | ||
| 4 | dnl This file is free software; the Free Software Foundation | ||
| 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 6 | dnl with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | AC_DEFUN([gl_IEEE754_H], | ||
| 9 | [ | ||
| 10 | AC_REQUIRE([AC_C_BIGENDIAN]) | ||
| 11 | AC_CHECK_HEADERS_ONCE([ieee754.h]) | ||
| 12 | if test $ac_cv_header_ieee754_h = yes; then | ||
| 13 | IEEE754_H= | ||
| 14 | else | ||
| 15 | IEEE754_H=ieee754.h | ||
| 16 | AC_DEFINE([_GL_REPLACE_IEEE754_H], 1, | ||
| 17 | [Define to 1 if <ieee754.h> is missing.]) | ||
| 18 | fi | ||
| 19 | AC_SUBST([IEEE754_H]) | ||
| 20 | AM_CONDITIONAL([GL_GENERATE_IEEE754_H], [test -n "$IEEE754_H"]) | ||
| 21 | ]) | ||