From 4682deeb62247d34de87f8e777f99e2d337fd377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 20 Oct 2024 15:21:43 +0200 Subject: New upstream version 1.3 --- gnulib-m4/float_h.m4 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'gnulib-m4/float_h.m4') 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 + 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], -- cgit v1.2.3