diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-12-28 12:13:40 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-12-28 12:13:40 +0100 |
| commit | b0afb8fe0ff1d87165af9df61501197a06240dda (patch) | |
| tree | 274ac6a96c53ef4c19ab4974ce24a06a233128c5 /gl/m4/float_h.m4 | |
| parent | 68fc05381ee5fa0aee1413118fbb3d81ca888b09 (diff) | |
| download | monitoring-plugins-b0afb8fe0ff1d87165af9df61501197a06240dda.tar.gz | |
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
Diffstat (limited to 'gl/m4/float_h.m4')
| -rw-r--r-- | gl/m4/float_h.m4 | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4 index c95d4171..8580c9c9 100644 --- a/gl/m4/float_h.m4 +++ b/gl/m4/float_h.m4 | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | # float_h.m4 | 1 | # float_h.m4 |
| 2 | # serial 14 | 2 | # serial 15 |
| 3 | dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| 7 | dnl This file is offered as-is, without any warranty. | ||
| 7 | 8 | ||
| 8 | AC_DEFUN([gl_FLOAT_H], | 9 | AC_DEFUN([gl_FLOAT_H], |
| 9 | [ | 10 | [ |
| @@ -54,6 +55,31 @@ changequote([,])dnl | |||
| 54 | ;; | 55 | ;; |
| 55 | esac | 56 | esac |
| 56 | 57 | ||
| 58 | dnl Test for completeness w.r.t. ISO C 23. | ||
| 59 | REPLACE_FLOAT_SNAN=0 | ||
| 60 | AC_CACHE_CHECK([whether float.h conforms to ISO C23], | ||
| 61 | [gl_cv_header_float_h_isoc23], | ||
| 62 | [AC_COMPILE_IFELSE( | ||
| 63 | [AC_LANG_PROGRAM( | ||
| 64 | [[#include <float.h> | ||
| 65 | int x[] = { FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG }; | ||
| 66 | float maxf = FLT_NORM_MAX; | ||
| 67 | double maxd = DBL_NORM_MAX; | ||
| 68 | long double maxl = LDBL_NORM_MAX; | ||
| 69 | ]], | ||
| 70 | [[float sf = FLT_SNAN; | ||
| 71 | double sd = DBL_SNAN; | ||
| 72 | long double sl = LDBL_SNAN; | ||
| 73 | return (sf != 0) + (sd != 0) + (sl != 0); | ||
| 74 | ]])], | ||
| 75 | [gl_cv_header_float_h_isoc23=yes], | ||
| 76 | [gl_cv_header_float_h_isoc23=no]) | ||
| 77 | ]) | ||
| 78 | if test $gl_cv_header_float_h_isoc23 != yes; then | ||
| 79 | GL_GENERATE_FLOAT_H=true | ||
| 80 | REPLACE_FLOAT_SNAN=1 | ||
| 81 | fi | ||
| 82 | |||
| 57 | dnl Test against glibc-2.7 Linux/SPARC64 bug. | 83 | dnl Test against glibc-2.7 Linux/SPARC64 bug. |
| 58 | REPLACE_ITOLD=0 | 84 | REPLACE_ITOLD=0 |
| 59 | AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works], | 85 | AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works], |
