]> Savannah Git Hosting - gnulib.git/commitdiff
random: Fix compilation errors in C++ mode on mingw 10.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Apr 2023 00:03:43 +0000 (02:03 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2023 15:24:44 +0000 (17:24 +0200)
* lib/stdlib.in.h (random, srandom): Disable _GL_CXXALIASWARN invocation
on non-glibc systems.

ChangeLog
lib/stdlib.in.h

index 8bbfb0978d2ef71309682fe5ba151706343dcd6b..87dd03628f45389692cc12c3f9ff8c1d7f139a54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-19  Bruno Haible  <bruno@clisp.org>
+
+       random: Fix compilation errors in C++ mode on mingw 10.
+       * lib/stdlib.in.h (random, srandom): Disable _GL_CXXALIASWARN invocation
+       on non-glibc systems.
+
 2023-04-18  Bruno Haible  <bruno@clisp.org>
 
        ilogbl: Work around a Cygwin 3.4.6 bug.
index 2291a7bbfb81c923aa380b4d09a8be856c5bef97..2ae216de62b0782dea37426fab9eb54ed8e554a8 100644 (file)
@@ -898,7 +898,9 @@ _GL_FUNCDECL_SYS (random, long, (void));
                                int.  */
 _GL_CXXALIAS_SYS_CAST (random, long, (void));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (random);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef random
 # if HAVE_RAW_DECL_RANDOM
@@ -923,7 +925,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
                                        unsigned long seed.  */
 _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (srandom);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef srandom
 # if HAVE_RAW_DECL_SRANDOM