summaryrefslogtreecommitdiffstats
path: root/gl/float.in.h
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-08-23 19:42:51 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-09-14 11:08:55 +0200
commit868beb15ae02c352005a2df8857f4ebb9bd758fd (patch)
tree0dc6e6a91c4ef0f131ca82a777e6ac2ad193c399 /gl/float.in.h
parentb89aee56964f7d933f2da5f371e32b4d7db9410b (diff)
downloadmonitoring-plugins-868beb1.tar.gz
Sync with the latest Gnulib code (d27c820595)
Diffstat (limited to 'gl/float.in.h')
-rw-r--r--gl/float.in.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/gl/float.in.h b/gl/float.in.h
index 84e1950f..a4183765 100644
--- a/gl/float.in.h
+++ b/gl/float.in.h
@@ -1,19 +1,19 @@
1/* A correct <float.h>. 1/* A correct <float.h>.
2 2
3 Copyright (C) 2007-2013 Free Software Foundation, Inc. 3 Copyright (C) 2007-2022 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU Lesser General Public License as
7 the Free Software Foundation; either version 3 of the License, or 7 published by the Free Software Foundation; either version 2.1 of the
8 (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU Lesser General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 17
18#ifndef _@GUARD_PREFIX@_FLOAT_H 18#ifndef _@GUARD_PREFIX@_FLOAT_H
19 19
@@ -62,8 +62,8 @@
62 62
63/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of 63/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
64 precision in the compiler but 64 bits of precision at runtime. See 64 precision in the compiler but 64 bits of precision at runtime. See
65 <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>. */ 65 <https://lists.gnu.org/r/bug-gnulib/2008-07/msg00063.html>. */
66#if defined __i386__ && defined __FreeBSD__ 66#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
67/* Number of mantissa units, in base FLT_RADIX. */ 67/* Number of mantissa units, in base FLT_RADIX. */
68# undef LDBL_MANT_DIG 68# undef LDBL_MANT_DIG
69# define LDBL_MANT_DIG 64 69# define LDBL_MANT_DIG 64
@@ -81,7 +81,7 @@
81# define LDBL_MAX_EXP 16384 81# define LDBL_MAX_EXP 16384
82/* Minimum positive normalized number. */ 82/* Minimum positive normalized number. */
83# undef LDBL_MIN 83# undef LDBL_MIN
84# define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ 84# define LDBL_MIN 3.362103143112093506262677817321752E-4932L /* = 0x1p-16382L */
85/* Maximum representable finite number. */ 85/* Maximum representable finite number. */
86# undef LDBL_MAX 86# undef LDBL_MAX
87/* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. 87/* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }.
@@ -93,11 +93,14 @@
93 extern const long double LDBL_MAX; 93 extern const long double LDBL_MAX;
94 94
95 Unfortunately, this is not a constant expression. */ 95 Unfortunately, this is not a constant expression. */
96# if !GNULIB_defined_long_double_union
96union gl_long_double_union 97union gl_long_double_union
97 { 98 {
98 struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd; 99 struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd;
99 long double ld; 100 long double ld;
100 }; 101 };
102# define GNULIB_defined_long_double_union 1
103# endif
101extern const union gl_long_double_union gl_LDBL_MAX; 104extern const union gl_long_double_union gl_LDBL_MAX;
102# define LDBL_MAX (gl_LDBL_MAX.ld) 105# define LDBL_MAX (gl_LDBL_MAX.ld)
103/* Minimum e such that 10^e is in the range of normalized numbers. */ 106/* Minimum e such that 10^e is in the range of normalized numbers. */
@@ -146,11 +149,14 @@ extern const union gl_long_double_union gl_LDBL_MAX;
146 149
147 Unfortunately, this is not a constant expression, and the latter expression 150 Unfortunately, this is not a constant expression, and the latter expression
148 does not work well when GCC is optimizing.. */ 151 does not work well when GCC is optimizing.. */
152# if !GNULIB_defined_long_double_union
149union gl_long_double_union 153union gl_long_double_union
150 { 154 {
151 struct { double hi; double lo; } dd; 155 struct { double hi; double lo; } dd;
152 long double ld; 156 long double ld;
153 }; 157 };
158# define GNULIB_defined_long_double_union 1
159# endif
154extern const union gl_long_double_union gl_LDBL_MAX; 160extern const union gl_long_double_union gl_LDBL_MAX;
155# define LDBL_MAX (gl_LDBL_MAX.ld) 161# define LDBL_MAX (gl_LDBL_MAX.ld)
156#endif 162#endif