···11+Applies the following incremental gnulib commits:
22+33+- 55a366a06fbd98bf13adc531579e3513cee97a32
44+- 65ed9d3b24ad09fd61d326c83e7f1b05f6e9d65f
55+- ce8e9de0bf34bc63dffc67ab384334c509175f64
66+- 6164b4cb0887b5331a4e64449107decd37d32735
77+88+With adjustments specific to the structure & differences in diffutils:
99+1010+- gnulib code is completely contained in gnulib-tests (flat, no separate lib directory)
1111+- A Makefile.in is used for the test flags instead of the fancy automake modules
1212+ in the upstream gnulib project, so we add -lm to the float test there.
1313+ Surrounding texts in this file are slightly different in every project.
1414+---
1515+diff '--color=auto' -ruN a/gnulib-tests/float.c b/gnulib-tests/float.c
1616+--- a/gnulib-tests/float.c 2025-01-02 03:33:12.000000000 +0100
1717++++ b/gnulib-tests/float.c 2025-07-09 21:20:34.116794411 +0200
1818+@@ -23,7 +23,7 @@
1919+ #if GNULIB_defined_long_double_union
2020+ # if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
2121+ const union gl_long_double_union gl_LDBL_MAX =
2222+- { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } };
2323++ { { DBL_MAX, DBL_MAX / 0x1p53 } };
2424+ # elif defined __i386__
2525+ const union gl_long_double_union gl_LDBL_MAX =
2626+ { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } };
2727+diff '--color=auto' -ruN a/gnulib-tests/float.in.h b/gnulib-tests/float.in.h
2828+--- a/gnulib-tests/float.in.h 2025-01-02 03:33:12.000000000 +0100
2929++++ b/gnulib-tests/float.in.h 2025-07-09 21:20:34.117010190 +0200
3030+@@ -113,44 +113,38 @@
3131+ # define LDBL_MAX_10_EXP 4932
3232+ #endif
3333+3434+-/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are
3535+- wrong.
3636+- On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */
3737+-#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
3838++/* On PowerPC with gcc 15 when using __ibm128 long double, the value of
3939++ LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX, and LDBL_NORM_MAX are wrong. */
4040++#if ((defined _ARCH_PPC || defined _POWER) && LDBL_MANT_DIG == 106 \
4141++ && defined __GNUC__)
4242+ # undef LDBL_MIN_EXP
4343+ # define LDBL_MIN_EXP DBL_MIN_EXP
4444+ # undef LDBL_MIN_10_EXP
4545+ # define LDBL_MIN_10_EXP DBL_MIN_10_EXP
4646+ # undef LDBL_MIN
4747+ # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
4848+-#endif
4949+-#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
5050+ # undef LDBL_MAX
5151+-/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }.
5252+- It is not easy to define:
5353+- #define LDBL_MAX 1.79769313486231580793728971405302307166e308L
5454+- is too small, whereas
5555+- #define LDBL_MAX 1.79769313486231580793728971405302307167e308L
5656+- is too large. Apparently a bug in GCC decimal-to-binary conversion.
5757+- Also, I can't get values larger than
5858+- #define LDBL63 ((long double) (1ULL << 63))
5959+- #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
6060+- #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
6161+- #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
6262+- #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL)
6363+- which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }.
6464+- So, define it like this through a reference to an external variable
6565++/* LDBL_MAX is 2**1024 - 2**918, represented as: { 0x7FEFFFFF, 0xFFFFFFFF,
6666++ 0x7C9FFFFF, 0xFFFFFFFF }.
6767++
6868++ Do not write it as a constant expression, as GCC would likely treat
6969++ that as infinity due to the vagaries of this platform's funky arithmetic.
7070++ Instead, define it through a reference to an external variable.
7171++ Like the following, but using a union to avoid type mismatches:
7272+7373+- const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL };
7474++ const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / 0x1p53 };
7575+ extern const long double LDBL_MAX;
7676+7777+- or through a pointer cast
7878++ The following alternative would not work as well when GCC is optimizing:
7979++
8080++ #define LDBL_MAX (*(long double const *) (double[])
8181++ { DBL_MAX, DBL_MAX / 0x1p53 })
8282+8383+- #define LDBL_MAX \
8484+- (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL })
8585++ The following alternative would require GCC 6 or later:
8686+8787+- Unfortunately, this is not a constant expression, and the latter expression
8888+- does not work well when GCC is optimizing.. */
8989++ #define LDBL_MAX __builtin_pack_longdouble (DBL_MAX, DBL_MAX / 0x1p53)
9090++
9191++ Unfortunately none of the alternatives are constant expressions. */
9292+ # if !GNULIB_defined_long_double_union
9393+ union gl_long_double_union
9494+ {
9595+@@ -161,6 +155,8 @@
9696+ # endif
9797+ extern const union gl_long_double_union gl_LDBL_MAX;
9898+ # define LDBL_MAX (gl_LDBL_MAX.ld)
9999++# undef LDBL_NORM_MAX
100100++# define LDBL_NORM_MAX LDBL_MAX
101101+ #endif
102102+103103+ /* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong.
104104+@@ -181,6 +177,21 @@
105105+ # endif
106106+ #endif
107107+108108++/* On PowerPC platforms, 'long double' has a double-double representation.
109109++ Up to ISO C 17, this was outside the scope of ISO C because it can represent
110110++ numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits>, such as
111111++ 1.0L + 4.94065645841246544176568792868221e-324L = 1 + 2^-1074; see
112112++ ISO C 17 § 5.2.4.2.2.(3).
113113++ In ISO C 23, wording has been included that makes this 'long double'
114114++ representation compliant; see ISO C 23 § 5.2.5.3.3.(8)-(9). In this setting,
115115++ numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits> are
116116++ called "unnormalized". And since LDBL_EPSILON must be normalized (per
117117++ ISO C 23 § 5.2.5.3.3.(33)), it must be 2^-105. */
118118++#if defined __powerpc__ && LDBL_MANT_DIG == 106
119119++# undef LDBL_EPSILON
120120++# define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */
121121++#endif
122122++
123123+ /* ============================ ISO C11 support ============================ */
124124+125125+ /* 'float' properties */
126126+@@ -309,7 +320,11 @@
127127+ # endif
128128+ #endif
129129+ #ifndef LDBL_NORM_MAX
130130+-# define LDBL_NORM_MAX LDBL_MAX
131131++# ifdef __LDBL_NORM_MAX__
132132++# define LDBL_NORM_MAX __LDBL_NORM_MAX__
133133++# else
134134++# define LDBL_NORM_MAX LDBL_MAX
135135++# endif
136136+ #endif
137137+ #ifndef LDBL_SNAN
138138+ /* For sh, beware of <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814>. */
139139+diff '--color=auto' -ruN a/gnulib-tests/Makefile.in b/gnulib-tests/Makefile.in
140140+--- a/gnulib-tests/Makefile.in 2025-04-09 04:36:30.000000000 +0200
141141++++ b/gnulib-tests/Makefile.in 2025-07-09 21:20:45.260378342 +0200
142142+@@ -1059,7 +1059,7 @@
143143+ test_filenamecat_DEPENDENCIES = $(am__DEPENDENCIES_2)
144144+ test_float_h_SOURCES = test-float-h.c
145145+ test_float_h_OBJECTS = test-float-h.$(OBJEXT)
146146+-test_float_h_LDADD = $(LDADD)
147147++test_float_h_LDADD = $(LDADD) -lm
148148+ test_float_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
149149+ libtests.a ../lib/libdiffutils.a libtests.a \
150150+ $(am__DEPENDENCIES_1)
151151+diff '--color=auto' -ruN a/gnulib-tests/test-float-h.c b/gnulib-tests/test-float-h.c
152152+--- a/gnulib-tests/test-float-h.c 2025-01-02 03:33:12.000000000 +0100
153153++++ b/gnulib-tests/test-float-h.c 2025-07-09 21:20:34.117248712 +0200
154154+@@ -101,6 +101,8 @@
155155+156156+ /* ------------------------------------------------------------------------- */
157157+158158++#include <math.h>
159159++
160160+ #include "fpucw.h"
161161+ #include "isnanf-nolibm.h"
162162+ #include "isnand-nolibm.h"
163163+@@ -396,6 +398,44 @@
164164+165165+ /* -------------------- Check macros for 'long double' -------------------- */
166166+167167++static int
168168++test_isfinitel (long double volatile x)
169169++{
170170++ if (x != x)
171171++ return 0;
172172++ long double volatile zero = x * 0;
173173++ return zero == 0;
174174++}
175175++
176176++/* Return X after normalization. This makes a difference on platforms
177177++ where long double can represent unnormalized values. For example,
178178++ suppose x = 1 + 2**-106 on PowerPC with IBM long double where
179179++ FLT_RADIX = 2, LDBL_MANT_DIG = 106, and LDBL_EPSILON = 2**-105.
180180++ Then 1 < x < 1 + LDBL_EPSILON, and normalize_long_double (x) returns 1. */
181181++static long double
182182++normalize_long_double (long double volatile x)
183183++{
184184++ if (FLT_RADIX == 2 && test_isfinitel (x))
185185++ {
186186++ int xexp;
187187++ long double volatile
188188++ frac = frexpl (x, &xexp),
189189++ significand = frac * pow2l (LDBL_MANT_DIG),
190190++ normalized_significand = truncl (significand),
191191++ normalized_x = normalized_significand * pow2l (xexp - LDBL_MANT_DIG);
192192++
193193++ /* The test_isfinitel defends against PowerPC with IBM long double,
194194++ which fritzes out near LDBL_MAX. */
195195++ if (test_isfinitel (normalized_x))
196196++ x = normalized_x;
197197++ }
198198++ else
199199++ {
200200++ /* Hope that X is already normalized. */
201201++ }
202202++ return x;
203203++}
204204++
205205+ static void
206206+ test_long_double (void)
207207+ {
208208+@@ -455,7 +495,7 @@
209209+ for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
210210+ {
211211+ volatile long double half_n = pow2l (- n); /* 2^-n */
212212+- volatile long double x = me - half_n;
213213++ volatile long double x = normalize_long_double (me - half_n);
214214+ if (x < me)
215215+ ASSERT (x <= 1.0L);
216216+ }
217217+@@ -483,8 +523,12 @@
218218+ ASSERT (!LDBL_IS_IEC_60559);
219219+ #endif
220220+221221++ printf("LDBL_NORM_MAX: %LF\n", LDBL_NORM_MAX);
222222++ printf("LDBL_MAX: %LF\n", LDBL_MAX);
223223++ printf("normalize_long_double(LDBL_MAX): %LF\n", normalize_long_double(LDBL_MAX));
224224++
225225+ /* Check the value of LDBL_NORM_MAX. */
226226+- ASSERT (LDBL_NORM_MAX == LDBL_MAX);
227227++ ASSERT (LDBL_NORM_MAX == normalize_long_double (LDBL_MAX));
228228+229229+ /* Check the value of LDBL_SNAN. */
230230+ ASSERT (isnanl (LDBL_SNAN));