diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:21:43 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:21:43 +0200 |
commit | 4682deeb62247d34de87f8e777f99e2d337fd377 (patch) | |
tree | 5bd5b5605b5f3a4b3c8ea7468c34c23094afdef4 /gnulib-m4/float_h.m4 | |
parent | 00893e79fc62966067af1a106567db96bd170338 (diff) |
New upstream version 1.3upstream/1.3upstream
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], |