]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
float-h: Move private Gnulib data to _gl_* namespace.
authorBruno Haible <bruno@clisp.org>
Sun, 15 Mar 2026 18:42:36 +0000 (19:42 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 15 Mar 2026 22:08:29 +0000 (23:08 +0100)
* lib/float.in.h (_gl_LDBL_MAX): Renamed from gl_LDBL_MAX.
(_gl_LDBL_TRUE_MIN): Renamed from gl_LDBL_TRUE_MIN.
(_gl_FLT_SNAN): Renamed from gl_FLT_SNAN.
(_gl_DBL_SNAN): Renamed from gl_DBL_SNAN.
(_gl_LDBL_SNAN): Renamed from gl_LDBL_SNAN.
* lib/float.c: Update.

ChangeLog
lib/float.c
lib/float.in.h

index 1e64ba0a348d930d167666f59072dc68457d2591..04cf63a62ecf0709043ac7388a21e62296b02916 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2026-03-15  Bruno Haible  <bruno@clisp.org>
 
+       float-h: Move private Gnulib data to _gl_* namespace.
+       * lib/float.in.h (_gl_LDBL_MAX): Renamed from gl_LDBL_MAX.
+       (_gl_LDBL_TRUE_MIN): Renamed from gl_LDBL_TRUE_MIN.
+       (_gl_FLT_SNAN): Renamed from gl_FLT_SNAN.
+       (_gl_DBL_SNAN): Renamed from gl_DBL_SNAN.
+       (_gl_LDBL_SNAN): Renamed from gl_LDBL_SNAN.
+       * lib/float.c: Update.
+
        expl, exp2l: Move private Gnulib data to _gl_* namespace.
        * lib/expl-table.c (_gl_expl_table): Renamed from gl_expl_table.
        * lib/expl.c: Update.
index 2e95957ac493f4b993615c5f8bd68e643e1a8809..4efe812c2f877894719e7b4839ea90a55163fb79 100644 (file)
@@ -22,7 +22,7 @@
 
 #if GNULIB_defined_long_double_union
 # ifdef __i386__
-const union gl_long_double_union gl_LDBL_MAX =
+const union gl_long_double_union _gl_LDBL_MAX =
   { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } };
 # endif
 # if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
@@ -31,7 +31,7 @@ const union gl_long_double_union gl_LDBL_MAX =
    END_LONG_DOUBLE_ROUNDING invocations.  It simpler to just write down the
    representation of LDBL_TRUE_MIN, based on
    <https://en.wikipedia.org/wiki/Extended_precision#x86_extended_precision_format>.  */
-const union gl_long_double_union gl_LDBL_TRUE_MIN =
+const union gl_long_double_union _gl_LDBL_TRUE_MIN =
   { { 0x00000001, 0x00000000, 0 } };
 # endif
 #endif
@@ -39,7 +39,7 @@ const union gl_long_double_union gl_LDBL_TRUE_MIN =
 #if GNULIB_defined_FLT_SNAN
 /* Define like memory_positive_SNaNf(), see signed-snan.h and snan.h,
    or like setpayloadsigf() with an arbitrary payload.  */
-gl_FLT_SNAN_t gl_FLT_SNAN =
+gl_FLT_SNAN_t _gl_FLT_SNAN =
 # if FLT_MANT_DIG == 24
 #  if defined __hppa || (defined __mips__ && !MIPS_NAN2008_FLOAT) || defined __sh__
   /* sign bit: 0, 8 exponent bits: all 1, next bit: 1, payload: 0b10...0 */
@@ -55,7 +55,7 @@ gl_FLT_SNAN_t gl_FLT_SNAN =
 #if GNULIB_defined_DBL_SNAN
 /* Define like memory_positive_SNaNd(), see signed-snan.h and snan.h,
    or like setpayloadsig() with an arbitrary payload.  */
-gl_DBL_SNAN_t gl_DBL_SNAN =
+gl_DBL_SNAN_t _gl_DBL_SNAN =
 # if DBL_MANT_DIG == 53
 #  if defined __hppa || (defined __mips__ && !MIPS_NAN2008_FLOAT) || defined __sh__
   /* sign bit: 0, 11 exponent bits: all 1, next bit: 1, payload: 0b10...0 */
@@ -76,7 +76,7 @@ gl_DBL_SNAN_t gl_DBL_SNAN =
 # endif
 /* Define like memory_positive_SNaNl(), see signed-snan.h and snan.h,
    or like setpayloadsigl() with an arbitrary payload.  */
-gl_LDBL_SNAN_t gl_LDBL_SNAN =
+gl_LDBL_SNAN_t _gl_LDBL_SNAN =
 # if LDBL_MANT_DIG == 53 /* on arm, hppa, mips, sh, but also MSVC */
 #  if defined __hppa || (defined __mips__ && !MIPS_NAN2008_FLOAT) || defined __sh__
   /* sign bit: 0, 11 exponent bits: all 1, next bit: 1, payload: 0b10...0 */
index 9f735cb9280d366f8e6d1a357cd5727fd5d11089..15b8184303df972eb12128242d8e9874881bf2ec 100644 (file)
@@ -103,8 +103,8 @@ union gl_long_double_union
   };
 #  define GNULIB_defined_long_double_union 1
 # endif
-extern const union gl_long_double_union gl_LDBL_MAX;
-# define LDBL_MAX (gl_LDBL_MAX.ld)
+extern const union gl_long_double_union _gl_LDBL_MAX;
+# define LDBL_MAX (_gl_LDBL_MAX.ld)
 /* Minimum e such that 10^e is in the range of normalized numbers.  */
 # undef LDBL_MIN_10_EXP
 # define LDBL_MIN_10_EXP (-4931)
@@ -207,8 +207,8 @@ extern const union gl_long_double_union gl_LDBL_MAX;
 # elif LDBL_MANT_DIG == 64
 #  if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
 /* Work around FreeBSD/x86 problem mentioned above.  */
-extern const union gl_long_double_union gl_LDBL_TRUE_MIN;
-#   define LDBL_TRUE_MIN (gl_LDBL_TRUE_MIN.ld)
+extern const union gl_long_double_union _gl_LDBL_TRUE_MIN;
+#   define LDBL_TRUE_MIN (_gl_LDBL_TRUE_MIN.ld)
 #  else
 #   define LDBL_TRUE_MIN (LDBL_MIN / 9223372036854775808.0L)
 #  endif
@@ -239,8 +239,8 @@ extern const union gl_long_double_union gl_LDBL_TRUE_MIN;
 #  define FLT_SNAN __builtin_nansf ("")
 # else
 typedef union { unsigned int word[1]; float value; } gl_FLT_SNAN_t;
-extern gl_FLT_SNAN_t gl_FLT_SNAN;
-#  define FLT_SNAN (gl_FLT_SNAN.value)
+extern gl_FLT_SNAN_t _gl_FLT_SNAN;
+#  define FLT_SNAN (_gl_FLT_SNAN.value)
 #  define GNULIB_defined_FLT_SNAN 1
 # endif
 #endif
@@ -263,8 +263,8 @@ extern gl_FLT_SNAN_t gl_FLT_SNAN;
 #  define DBL_SNAN __builtin_nans ("")
 # else
 typedef union { unsigned long long word[1]; double value; } gl_DBL_SNAN_t;
-extern gl_DBL_SNAN_t gl_DBL_SNAN;
-#  define DBL_SNAN (gl_DBL_SNAN.value)
+extern gl_DBL_SNAN_t _gl_DBL_SNAN;
+#  define DBL_SNAN (_gl_DBL_SNAN.value)
 #  define GNULIB_defined_DBL_SNAN 1
 # endif
 #endif
@@ -301,8 +301,8 @@ typedef union { unsigned int word[3]; long double value; } gl_LDBL_SNAN_t;
 #  else
 typedef union { unsigned long long word[2]; long double value; } gl_LDBL_SNAN_t;
 #  endif
-extern gl_LDBL_SNAN_t gl_LDBL_SNAN;
-#  define LDBL_SNAN (gl_LDBL_SNAN.value)
+extern gl_LDBL_SNAN_t _gl_LDBL_SNAN;
+#  define LDBL_SNAN (_gl_LDBL_SNAN.value)
 #  define GNULIB_defined_LDBL_SNAN 1
 # endif
 #endif