From 6f6ca19e6cec9fec055258b1459108ef8822fe75 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 5 Jan 2023 17:35:34 +0100 Subject: string: Fix compilation errors in C++ mode on Android. * lib/string.in.h (memrchr, strchrnul, strcasestr): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 6 ++++++ lib/string.in.h | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71a4dd1acf..ba2ebc3c3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-01-05 Bruno Haible + + 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 getpass: Fix compilation error on Android. diff --git a/lib/string.in.h b/lib/string.in.h index b2683b6e4c..b227a17887 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -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 -- cgit v1.2.1