diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-10 10:43:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 10:43:20 (GMT) |
commit | c07206f2ccc2356aa74bc6813a94c2190017d44e (patch) | |
tree | 1677e5fdca5c3ce544e92c5484e16a0b68df1cc9 /gl/float.in.h | |
parent | e92046f810658016b7c373677efefda3b21400e4 (diff) | |
parent | d2fcf49ad4afc15f37d082d7bc96a808369ec2d4 (diff) | |
download | monitoring-plugins-c07206f.tar.gz |
Merge pull request #1832 from RincewindsHat/gnulib_update_2023
Gnulib update 2023 and attendant fixes
Diffstat (limited to 'gl/float.in.h')
-rw-r--r-- | gl/float.in.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gl/float.in.h b/gl/float.in.h index 84e1950..bf2c502 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-2023 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 | ||
96 | union gl_long_double_union | 97 | union 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 | ||
101 | extern const union gl_long_double_union gl_LDBL_MAX; | 104 | extern 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 | ||
149 | union gl_long_double_union | 153 | union 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 | ||
154 | extern const union gl_long_double_union gl_LDBL_MAX; | 160 | extern 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 |