diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-03-22 18:00:25 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-03-22 18:00:25 +0100 |
commit | 0737819efdd0bae112d16d874cac7e747e43cd08 (patch) | |
tree | 98a9ac84f7f347ae530c14852c68870682f3d04c /gnulib-m4/float_h.m4 | |
parent | 163a663518f33bab48b28431972e580b366b4d49 (diff) | |
parent | e670957a8693f860cf7d77fed4ce6b4b056a8083 (diff) |
Merge branch 'release/debian/1.3-1'debian/1.3-1
Diffstat (limited to 'gnulib-m4/float_h.m4')
-rw-r--r-- | gnulib-m4/float_h.m4 | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/gnulib-m4/float_h.m4 b/gnulib-m4/float_h.m4 index 60e81447..12c0eb67 100644 --- a/gnulib-m4/float_h.m4 +++ b/gnulib-m4/float_h.m4 @@ -1,4 +1,5 @@ -# float_h.m4 serial 14 +# float_h.m4 +# serial 15 dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -53,6 +54,31 @@ changequote([,])dnl ;; esac + dnl Test for completeness w.r.t. ISO C 23. + REPLACE_FLOAT_SNAN=0 + AC_CACHE_CHECK([whether float.h conforms to ISO C23], + [gl_cv_header_float_h_isoc23], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <float.h> + int x[] = { FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG }; + float maxf = FLT_NORM_MAX; + double maxd = DBL_NORM_MAX; + long double maxl = LDBL_NORM_MAX; + ]], + [[float sf = FLT_SNAN; + double sd = DBL_SNAN; + long double sl = LDBL_SNAN; + return (sf != 0) + (sd != 0) + (sl != 0); + ]])], + [gl_cv_header_float_h_isoc23=yes], + [gl_cv_header_float_h_isoc23=no]) + ]) + if test $gl_cv_header_float_h_isoc23 != yes; then + GL_GENERATE_FLOAT_H=true + REPLACE_FLOAT_SNAN=1 + fi + dnl Test against glibc-2.7 Linux/SPARC64 bug. REPLACE_ITOLD=0 AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works], |