]> Savannah Git Hosting - gnulib.git/commitdiff
strtol, strtoul: Fix compilation error in C++ mode on Solaris 11.
authorBruno Haible <bruno@clisp.org>
Fri, 2 Sep 2022 18:34:44 +0000 (20:34 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Sep 2022 23:03:06 +0000 (01:03 +0200)
* lib/stdlib.in.h (strtol, strtoul): Enable the C++ alias warning only
on glibc systems.

ChangeLog
lib/stdlib.in.h

index 7896b9d31f9caae7953bfa8e29cf1e4f225771cd..27fce28d8dcc1182562f045b8c8395321a8ae31f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-02  Bruno Haible  <bruno@clisp.org>
+
+       strtol, strtoul: Fix compilation error in C++ mode on Solaris 11.
+       * lib/stdlib.in.h (strtol, strtoul): Enable the C++ alias warning only
+       on glibc systems.
+
 2022-09-02  Bruno Haible  <bruno@clisp.org>
 
        aligned_alloc: Fix compilation error in C++ mode on Solaris 11.
index 010875803cc260c6bd04190f1929b1332d75a6e7..8e0a609f1f7c933c060308e03c040967ae6d181f 100644 (file)
@@ -1363,7 +1363,9 @@ _GL_CXXALIAS_SYS (strtol, long,
                   (const char *restrict string, char **restrict endptr,
                    int base));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strtol);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strtol
 # if HAVE_RAW_DECL_STRTOL
@@ -1444,7 +1446,9 @@ _GL_CXXALIAS_SYS (strtoul, unsigned long,
                   (const char *restrict string, char **restrict endptr,
                    int base));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strtoul);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strtoul
 # if HAVE_RAW_DECL_STRTOUL