string: Fix compilation errors in C++ mode on Android.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Jan 2023 16:35:34 +0000 (17:35 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Jan 2023 16:35:34 +0000 (17:35 +0100)
* lib/string.in.h (memrchr, strchrnul, strcasestr): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.

ChangeLog
lib/string.in.h

index 71a4dd1acf5fae76377ae6268468541ee7bafde5..ba2ebc3c3e1c10039c17bafaf50c2aa7bf123842 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-05  Bruno Haible  <bruno@clisp.org>
+
+       string: Fix compilation errors in C++ mode on Android.
+       * lib/string.in.h (memrchr, strchrnul, strcasestr): Disable
+       _GL_CXXALIASWARN invocation on non-glibc systems.
+
 2023-01-05  Bruno Haible  <bruno@clisp.org>
 
        getpass: Fix compilation error on Android.
index b2683b6e4c0e277181426c6bc914f28086158903..b227a1788734f81ec342c2cf13c3db0fe16bb5a6 100644 (file)
@@ -344,7 +344,7 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr,
          || defined __clang__)
 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ());
 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (memrchr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -499,7 +499,7 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul,
 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ());
 _GL_CXXALIASWARN1 (strchrnul, char const *,
                    (char const *__s, int __c_in) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strchrnul);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -864,7 +864,7 @@ _GL_CXXALIASWARN1 (strcasestr, char *,
                    (char *haystack, const char *needle) throw ());
 _GL_CXXALIASWARN1 (strcasestr, const char *,
                    (const char *haystack, const char *needle) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strcasestr);
 # endif
 #elif defined GNULIB_POSIXCHECK