>From 255607795d6a624cc040cbbe563e89a70acb81fe Mon Sep 17 00:00:00 2001
From: Bruno Haible
Subject: [PATCH 5/5] Disable many _GL_CXXALIASWARN on all platforms other than
glibc systems.
Reported by Christian Biesinger in
.
* lib/fnmatch.in.h (fnmatch): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.
* lib/locale.in.h (localeconv, setlocale): Likewise.
* lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
frexp, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder,
rint, round, trunc): Likewise.
* lib/monetary.in.h (strfmon_l): Likewise.
* lib/pthread.in.h (pthread_mutexattr_getrobust,
pthread_mutexattr_setrobust, pthread_mutex_lock, pthread_spin_init,
pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock,
pthread_spin_destroy): Likewise.
* lib/signal.in.h (raise, signal): Likewise.
* lib/stdio.in.h (fclose, fflush, fgetc, fgets, fopen, fprintf, fputc,
fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar,
perror, printf, putc, putchar, puts, remove, rename, scanf, sprintf,
tmpfile, vfprintf, vprintf, vsprintf): Likewise.
* lib/stdlib.in.h (calloc, malloc, mbtowc, realloc, strtod, wctomb):
Likewise.
* lib/string.in.h (memchr, strncat, strpbrk, strstr, strerror):
Likewise.
* lib/time.in.h (mktime, localtime, ctime, strftime): Likewise.
* lib/wchar.in.h (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs,
wcrtomb, wcsrtombs, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset,
wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcscoll,
wcsxfrm, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcstok,
wcsftime): Likewise.
* lib/wctype.in.h (iswblank, wctrans, towctrans): Likewise.
---
ChangeLog | 33 ++++++++++++++++++++++++++++++
lib/fnmatch.in.h | 2 +-
lib/locale.in.h | 4 ++++
lib/math.in.h | 42 ++++++++++++++++++++++++++++++++++++++
lib/monetary.in.h | 2 ++
lib/pthread.in.h | 16 +++++++++++++++
lib/signal.in.h | 4 ++++
lib/stdio.in.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/stdlib.in.h | 12 +++++++++++
lib/string.in.h | 10 +++++++---
lib/time.in.h | 8 ++++++++
lib/wchar.in.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
lib/wctype.in.h | 6 ++++++
13 files changed, 248 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6a84116..7ceea18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2019-11-21 Bruno Haible
+
+ Disable many _GL_CXXALIASWARN on all platforms other than glibc systems.
+ Reported by Christian Biesinger in
+ .
+ * lib/fnmatch.in.h (fnmatch): Disable _GL_CXXALIASWARN invocation on
+ non-glibc systems.
+ * lib/locale.in.h (localeconv, setlocale): Likewise.
+ * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
+ frexp, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder,
+ rint, round, trunc): Likewise.
+ * lib/monetary.in.h (strfmon_l): Likewise.
+ * lib/pthread.in.h (pthread_mutexattr_getrobust,
+ pthread_mutexattr_setrobust, pthread_mutex_lock, pthread_spin_init,
+ pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock,
+ pthread_spin_destroy): Likewise.
+ * lib/signal.in.h (raise, signal): Likewise.
+ * lib/stdio.in.h (fclose, fflush, fgetc, fgets, fopen, fprintf, fputc,
+ fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar,
+ perror, printf, putc, putchar, puts, remove, rename, scanf, sprintf,
+ tmpfile, vfprintf, vprintf, vsprintf): Likewise.
+ * lib/stdlib.in.h (calloc, malloc, mbtowc, realloc, strtod, wctomb):
+ Likewise.
+ * lib/string.in.h (memchr, strncat, strpbrk, strstr, strerror):
+ Likewise.
+ * lib/time.in.h (mktime, localtime, ctime, strftime): Likewise.
+ * lib/wchar.in.h (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs,
+ wcrtomb, wcsrtombs, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset,
+ wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcscoll,
+ wcsxfrm, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcstok,
+ wcsftime): Likewise.
+ * lib/wctype.in.h (iswblank, wctrans, towctrans): Likewise.
+
2019-11-21 Bruno Haible
Fix various errors in _GL_CXXALIAS_SYS invocations.
diff --git a/lib/fnmatch.in.h b/lib/fnmatch.in.h
index cf34009..31d2573 100644
--- a/lib/fnmatch.in.h
+++ b/lib/fnmatch.in.h
@@ -93,7 +93,7 @@ _GL_FUNCDECL_SYS (fnmatch, int,
_GL_CXXALIAS_SYS (fnmatch, int,
(const char *pattern, const char *name, int flags));
# endif
-# if !GNULIB_FNMATCH_GNU
+# if !GNULIB_FNMATCH_GNU && __GLIBC__ >= 2
_GL_CXXALIASWARN (fnmatch);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/lib/locale.in.h b/lib/locale.in.h
index efc29b4..918d4dd 100644
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -156,7 +156,9 @@ _GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
# else
_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (localeconv);
+# endif
#elif @REPLACE_STRUCT_LCONV@
# undef localeconv
# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
@@ -181,7 +183,9 @@ _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
# else
_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (setlocale);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef setlocale
# if HAVE_RAW_DECL_SETLOCALE
diff --git a/lib/math.in.h b/lib/math.in.h
index 538d332..3aa7f4e 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -398,7 +398,9 @@ _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
_GL_FUNCDECL_SYS (cbrt, double, (double x));
# endif
_GL_CXXALIAS_SYS (cbrt, double, (double x));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (cbrt);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef cbrt
# if HAVE_RAW_DECL_CBRT
@@ -466,7 +468,9 @@ _GL_CXXALIAS_RPL (ceil, double, (double x));
# else
_GL_CXXALIAS_SYS (ceil, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (ceil);
+# endif
#endif
#if @GNULIB_CEILL@
@@ -513,7 +517,9 @@ _GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
_GL_FUNCDECL_SYS (copysign, double, (double x, double y));
# endif
_GL_CXXALIAS_SYS (copysign, double, (double x, double y));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (copysign);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef copysign
# if HAVE_RAW_DECL_COPYSIGN
@@ -679,7 +685,9 @@ _GL_FUNCDECL_SYS (exp2, double, (double x));
# endif
_GL_CXXALIAS_SYS (exp2, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (exp2);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef exp2
# if HAVE_RAW_DECL_EXP2
@@ -750,7 +758,9 @@ _GL_FUNCDECL_SYS (expm1, double, (double x));
# endif
_GL_CXXALIAS_SYS (expm1, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (expm1);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef expm1
# if HAVE_RAW_DECL_EXPM1
@@ -859,7 +869,9 @@ _GL_CXXALIAS_RPL (floor, double, (double x));
# else
_GL_CXXALIAS_SYS (floor, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (floor);
+# endif
#endif
#if @GNULIB_FLOORL@
@@ -924,7 +936,9 @@ _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
# endif
_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fma);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef fma
# if HAVE_RAW_DECL_FMA
@@ -997,7 +1011,9 @@ _GL_CXXALIAS_RPL (fmod, double, (double x, double y));
# else
_GL_CXXALIAS_SYS (fmod, double, (double x, double y));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fmod);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef fmod
# if HAVE_RAW_DECL_FMOD
@@ -1080,7 +1096,9 @@ _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
# else
_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
+# endif
#elif defined GNULIB_POSIXCHECK
# undef frexp
/* Assume frexp is always declared. */
@@ -1160,7 +1178,9 @@ _GL_CXXALIAS_RPL (hypot, double, (double x, double y));
# else
_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (hypot);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef hypot
# if HAVE_RAW_DECL_HYPOT
@@ -1231,7 +1251,9 @@ _GL_FUNCDECL_SYS (ilogb, int, (double x));
# endif
_GL_CXXALIAS_SYS (ilogb, int, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (ilogb);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef ilogb
# if HAVE_RAW_DECL_ILOGB
@@ -1343,7 +1365,9 @@ _GL_CXXALIAS_RPL (log, double, (double x));
# else
_GL_CXXALIAS_SYS (log, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (log);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef log
# if HAVE_RAW_DECL_LOG
@@ -1412,7 +1436,9 @@ _GL_CXXALIAS_RPL (log10, double, (double x));
# else
_GL_CXXALIAS_SYS (log10, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (log10);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef log10
# if HAVE_RAW_DECL_LOG10
@@ -1483,7 +1509,9 @@ _GL_FUNCDECL_SYS (log1p, double, (double x));
# endif
_GL_CXXALIAS_SYS (log1p, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (log1p);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef log1p
# if HAVE_RAW_DECL_LOG1P
@@ -1555,7 +1583,9 @@ _GL_FUNCDECL_SYS (log2, double, (double x));
# endif
_GL_CXXALIAS_SYS (log2, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (log2);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef log2
# if HAVE_RAW_DECL_LOG2
@@ -1625,7 +1655,9 @@ _GL_FUNCDECL_SYS (logb, double, (double x));
# endif
_GL_CXXALIAS_SYS (logb, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (logb);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef logb
# if HAVE_RAW_DECL_LOGB
@@ -1693,7 +1725,9 @@ _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
# else
_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (modf);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef modf
# if HAVE_RAW_DECL_MODF
@@ -1782,7 +1816,9 @@ _GL_FUNCDECL_SYS (remainder, double, (double x, double y));
# endif
_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (remainder);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef remainder
# if HAVE_RAW_DECL_REMAINDER
@@ -1835,7 +1871,9 @@ _GL_WARN_ON_USE (rintf, "rintf is unportable - "
_GL_FUNCDECL_SYS (rint, double, (double x));
# endif
_GL_CXXALIAS_SYS (rint, double, (double x));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (rint);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef rint
# if HAVE_RAW_DECL_RINT
@@ -1905,7 +1943,9 @@ _GL_FUNCDECL_SYS (round, double, (double x));
# endif
_GL_CXXALIAS_SYS (round, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (round);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef round
# if HAVE_RAW_DECL_ROUND
@@ -2155,7 +2195,9 @@ _GL_FUNCDECL_SYS (trunc, double, (double x));
# endif
_GL_CXXALIAS_SYS (trunc, double, (double x));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (trunc);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef trunc
# if HAVE_RAW_DECL_TRUNC
diff --git a/lib/monetary.in.h b/lib/monetary.in.h
index d56b6cf..3157cd7 100644
--- a/lib/monetary.in.h
+++ b/lib/monetary.in.h
@@ -91,7 +91,9 @@ _GL_CXXALIAS_SYS (strfmon_l, ssize_t, (char *s, size_t maxsize, locale_t locale,
const char *format, ...));
# endif
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (strfmon_l);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef strfmon_l
# if HAVE_RAW_DECL_STRFMON_L
diff --git a/lib/pthread.in.h b/lib/pthread.in.h
index 3a379d0..e564140 100644
--- a/lib/pthread.in.h
+++ b/lib/pthread.in.h
@@ -867,7 +867,9 @@ _GL_FUNCDECL_SYS (pthread_mutexattr_getrobust, int,
_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_getrobust, int,
(const pthread_mutexattr_t *attr, int *robustp));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_mutexattr_getrobust);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_mutexattr_getrobust
# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST
@@ -896,7 +898,9 @@ _GL_FUNCDECL_SYS (pthread_mutexattr_setrobust, int,
_GL_CXXALIAS_SYS (pthread_mutexattr_setrobust, int,
(pthread_mutexattr_t *attr, int robust));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_mutexattr_setrobust);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_mutexattr_setrobust
# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST
@@ -946,7 +950,9 @@ _GL_FUNCDECL_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex)
# endif
_GL_CXXALIAS_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_mutex_lock);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_mutex_lock
# if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK
@@ -1694,7 +1700,9 @@ _GL_FUNCDECL_SYS (pthread_spin_init, int,
_GL_CXXALIAS_SYS (pthread_spin_init, int,
(pthread_spinlock_t *lock, int shared_across_processes));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_spin_init);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_spin_init
# if HAVE_RAW_DECL_PTHREAD_SPIN_INIT
@@ -1719,7 +1727,9 @@ _GL_FUNCDECL_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock)
# endif
_GL_CXXALIAS_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_spin_lock);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_spin_lock
# if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK
@@ -1744,7 +1754,9 @@ _GL_FUNCDECL_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock)
# endif
_GL_CXXALIAS_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_spin_trylock);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_spin_trylock
# if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK
@@ -1769,7 +1781,9 @@ _GL_FUNCDECL_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock)
# endif
_GL_CXXALIAS_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_spin_unlock);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_spin_unlock
# if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK
@@ -1794,7 +1808,9 @@ _GL_FUNCDECL_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock)
# endif
_GL_CXXALIAS_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_spin_destroy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_spin_destroy
# if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY
diff --git a/lib/signal.in.h b/lib/signal.in.h
index a6960a2..0f6486d 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -168,7 +168,9 @@ _GL_FUNCDECL_SYS (raise, int, (int sig));
# endif
_GL_CXXALIAS_SYS (raise, int, (int sig));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (raise);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef raise
/* Assume raise is always declared. */
@@ -321,7 +323,9 @@ _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t,
_GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
(int sig, _gl_function_taking_int_returning_void_t func));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (signal);
+# endif
# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE
/* Raise signal SIGPIPE. */
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index 98c8093..4aea52c 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -203,7 +203,9 @@ _GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
# else
_GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fclose);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef fclose
/* Assume fclose is always declared. */
@@ -247,7 +249,9 @@ _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
# else
_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fflush);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef fflush
/* Assume fflush is always declared. */
@@ -266,7 +270,9 @@ _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream));
# else
_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fgetc);
+# endif
#endif
#if @GNULIB_FGETS@
@@ -281,7 +287,9 @@ _GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream));
# else
_GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fgets);
+# endif
#endif
#if @GNULIB_FOPEN@
@@ -296,7 +304,9 @@ _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
# else
_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fopen);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef fopen
/* Assume fopen is always declared. */
@@ -324,7 +334,9 @@ _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
# else
_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fprintf);
+# endif
#endif
#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
# if !GNULIB_overrides_fprintf
@@ -375,7 +387,9 @@ _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
# else
_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fputc);
+# endif
#endif
#if @GNULIB_FPUTS@
@@ -390,7 +404,9 @@ _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
# else
_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fputs);
+# endif
#endif
#if @GNULIB_FREAD@
@@ -405,7 +421,9 @@ _GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
# else
_GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fread);
+# endif
#endif
#if @GNULIB_FREOPEN@
@@ -423,7 +441,9 @@ _GL_CXXALIAS_RPL (freopen, FILE *,
_GL_CXXALIAS_SYS (freopen, FILE *,
(const char *filename, const char *mode, FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (freopen);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef freopen
/* Assume freopen is always declared. */
@@ -445,7 +465,9 @@ _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...));
# else
_GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fscanf);
+# endif
#endif
@@ -496,7 +518,9 @@ _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
# else
_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fseek);
+# endif
#endif
#if @GNULIB_FSEEKO@
@@ -559,7 +583,9 @@ _GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
# else
_GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (ftell);
+# endif
#endif
#if @GNULIB_FTELLO@
@@ -639,7 +665,9 @@ extern size_t __REDIRECT (rpl_fwrite_unlocked,
# define fwrite_unlocked rpl_fwrite_unlocked
# endif
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fwrite);
+# endif
#endif
#if @GNULIB_GETC@
@@ -653,7 +681,9 @@ _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream));
# else
_GL_CXXALIAS_SYS (getc, int, (FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getc);
+# endif
#endif
#if @GNULIB_GETCHAR@
@@ -667,7 +697,9 @@ _GL_CXXALIAS_RPL (getchar, int, (void));
# else
_GL_CXXALIAS_SYS (getchar, int, (void));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getchar);
+# endif
#endif
#if @GNULIB_GETDELIM@
@@ -832,7 +864,9 @@ _GL_CXXALIAS_RPL (perror, void, (const char *string));
# else
_GL_CXXALIAS_SYS (perror, void, (const char *string));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (perror);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef perror
/* Assume perror is always declared. */
@@ -903,7 +937,9 @@ _GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
# else
_GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (printf);
+# endif
#endif
#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
# if !GNULIB_overrides_printf
@@ -926,7 +962,9 @@ _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
# else
_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (putc);
+# endif
#endif
#if @GNULIB_PUTCHAR@
@@ -940,7 +978,9 @@ _GL_CXXALIAS_RPL (putchar, int, (int c));
# else
_GL_CXXALIAS_SYS (putchar, int, (int c));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (putchar);
+# endif
#endif
#if @GNULIB_PUTS@
@@ -954,7 +994,9 @@ _GL_CXXALIAS_RPL (puts, int, (const char *string));
# else
_GL_CXXALIAS_SYS (puts, int, (const char *string));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (puts);
+# endif
#endif
#if @GNULIB_REMOVE@
@@ -968,7 +1010,9 @@ _GL_CXXALIAS_RPL (remove, int, (const char *name));
# else
_GL_CXXALIAS_SYS (remove, int, (const char *name));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (remove);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef remove
/* Assume remove is always declared. */
@@ -991,7 +1035,9 @@ _GL_CXXALIAS_RPL (rename, int,
_GL_CXXALIAS_SYS (rename, int,
(const char *old_filename, const char *new_filename));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (rename);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef rename
/* Assume rename is always declared. */
@@ -1056,7 +1102,9 @@ _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...));
# else
_GL_CXXALIAS_SYS (scanf, int, (const char *format, ...));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (scanf);
+# endif
#endif
#if @GNULIB_SNPRINTF@
@@ -1110,7 +1158,9 @@ _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
# else
_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (sprintf);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef sprintf
/* Assume sprintf is always declared. */
@@ -1129,7 +1179,9 @@ _GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
# else
_GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (tmpfile);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef tmpfile
# if HAVE_RAW_DECL_TMPFILE
@@ -1240,7 +1292,9 @@ _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
_GL_CXXALIAS_SYS_CAST (vfprintf, int,
(FILE *fp, const char *format, va_list args));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (vfprintf);
+# endif
#endif
#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
# if !GNULIB_overrides_vfprintf
@@ -1294,7 +1348,9 @@ _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
and GCC's fixincludes did not change this to __gnuc_va_list. */
_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (vprintf);
+# endif
#endif
#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
# if !GNULIB_overrides_vprintf
@@ -1370,7 +1426,9 @@ _GL_CXXALIAS_RPL (vsprintf, int,
_GL_CXXALIAS_SYS_CAST (vsprintf, int,
(char *str, const char *format, va_list args));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (vsprintf);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef vsprintf
/* Assume vsprintf is always declared. */
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 96c48fe..2d02b4b 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -176,7 +176,9 @@ _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
# else
_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (calloc);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef calloc
/* Assume calloc is always declared. */
@@ -288,7 +290,9 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
# else
_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (malloc);
+# endif
#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
# undef malloc
/* Assume malloc is always declared. */
@@ -311,7 +315,9 @@ _GL_FUNCDECL_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
# endif
_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mbtowc);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mbtowc
# if HAVE_RAW_DECL_MBTOWC
@@ -815,7 +821,9 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
# else
_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (realloc);
+# endif
#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
# undef realloc
/* Assume realloc is always declared. */
@@ -946,7 +954,9 @@ _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
# endif
_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (strtod);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef strtod
# if HAVE_RAW_DECL_STRTOD
@@ -1085,7 +1095,9 @@ _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
# else
_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wctomb);
+# endif
#endif
diff --git a/lib/string.in.h b/lib/string.in.h
index 14423b0..c6b99a4 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -149,7 +149,7 @@ _GL_CXXALIAS_SYS_CAST2 (memchr,
_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
_GL_CXXALIASWARN1 (memchr, void const *,
(void const *__s, int __c, size_t __n));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (memchr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -417,7 +417,9 @@ _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
# else
_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (strncat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef strncat
# if HAVE_RAW_DECL_STRNCAT
@@ -512,7 +514,7 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk,
_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
_GL_CXXALIASWARN1 (strpbrk, char const *,
(char const *__s, char const *__accept));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strpbrk);
# endif
# if defined GNULIB_POSIXCHECK
@@ -614,7 +616,7 @@ _GL_CXXALIAS_SYS_CAST2 (strstr,
_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
_GL_CXXALIASWARN1 (strstr, const char *,
(const char *haystack, const char *needle));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strstr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -980,7 +982,9 @@ _GL_CXXALIAS_RPL (strerror, char *, (int));
# else
_GL_CXXALIAS_SYS (strerror, char *, (int));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (strerror);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef strerror
/* Assume strerror is always declared. */
diff --git a/lib/time.in.h b/lib/time.in.h
index dc00503..6402d23 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -155,7 +155,9 @@ _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
# else
_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mktime);
+# endif
# endif
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
@@ -223,7 +225,9 @@ _GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
# else
_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (localtime);
+# endif
# endif
# if 0 || @REPLACE_GMTIME@
@@ -270,7 +274,9 @@ _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));
# else
_GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (ctime);
+# endif
# endif
/* Convert *TP to a date and time string. See
@@ -289,7 +295,9 @@ _GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize,
const char *__fmt, const struct tm *__tp));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (strftime);
+# endif
# endif
# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index a10b6f2..3ebcdba 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -163,7 +163,9 @@ _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (btowc);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef btowc
# if HAVE_RAW_DECL_BTOWC
@@ -189,7 +191,9 @@ _GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wctob);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wctob
# if HAVE_RAW_DECL_WCTOB
@@ -214,7 +218,9 @@ _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
# endif
_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mbsinit);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsinit
# if HAVE_RAW_DECL_MBSINIT
@@ -243,7 +249,9 @@ _GL_FUNCDECL_SYS (mbrtowc, size_t,
_GL_CXXALIAS_SYS (mbrtowc, size_t,
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mbrtowc);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mbrtowc
# if HAVE_RAW_DECL_MBRTOWC
@@ -268,7 +276,9 @@ _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
# endif
_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mbrlen);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mbrlen
# if HAVE_RAW_DECL_MBRLEN
@@ -301,7 +311,9 @@ _GL_CXXALIAS_SYS (mbsrtowcs, size_t,
(wchar_t *dest, const char **srcp, size_t len,
mbstate_t *ps));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mbsrtowcs);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsrtowcs
# if HAVE_RAW_DECL_MBSRTOWCS
@@ -361,7 +373,9 @@ _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
# endif
_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcrtomb);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcrtomb
# if HAVE_RAW_DECL_WCRTOMB
@@ -394,7 +408,9 @@ _GL_CXXALIAS_SYS (wcsrtombs, size_t,
(char *dest, const wchar_t **srcp, size_t len,
mbstate_t *ps));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsrtombs);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsrtombs
# if HAVE_RAW_DECL_WCSRTOMBS
@@ -484,7 +500,7 @@ _GL_CXXALIAS_SYS_CAST2 (wmemchr,
_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
_GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
(const wchar_t *s, wchar_t c, size_t n));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemchr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -505,7 +521,9 @@ _GL_FUNCDECL_SYS (wmemcmp, int,
# endif
_GL_CXXALIAS_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemcmp);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wmemcmp
# if HAVE_RAW_DECL_WMEMCMP
@@ -523,7 +541,9 @@ _GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
# endif
_GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
(wchar_t *dest, const wchar_t *src, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemcpy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wmemcpy
# if HAVE_RAW_DECL_WMEMCPY
@@ -542,7 +562,9 @@ _GL_FUNCDECL_SYS (wmemmove, wchar_t *,
# endif
_GL_CXXALIAS_SYS (wmemmove, wchar_t *,
(wchar_t *dest, const wchar_t *src, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemmove);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wmemmove
# if HAVE_RAW_DECL_WMEMMOVE
@@ -558,7 +580,9 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
# endif
_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemset);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wmemset
# if HAVE_RAW_DECL_WMEMSET
@@ -574,7 +598,9 @@ _GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcslen);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcslen
# if HAVE_RAW_DECL_WCSLEN
@@ -607,7 +633,9 @@ _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
# endif
_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcscpy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcscpy
# if HAVE_RAW_DECL_WCSCPY
@@ -641,7 +669,9 @@ _GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
# endif
_GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
(wchar_t *dest, const wchar_t *src, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsncpy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsncpy
# if HAVE_RAW_DECL_WCSNCPY
@@ -676,7 +706,9 @@ _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
# endif
_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcscat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcscat
# if HAVE_RAW_DECL_WCSCAT
@@ -694,7 +726,9 @@ _GL_FUNCDECL_SYS (wcsncat, wchar_t *,
# endif
_GL_CXXALIAS_SYS (wcsncat, wchar_t *,
(wchar_t *dest, const wchar_t *src, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsncat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsncat
# if HAVE_RAW_DECL_WCSNCAT
@@ -711,7 +745,9 @@ _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
_GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcscmp);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcscmp
# if HAVE_RAW_DECL_WCSCMP
@@ -730,7 +766,9 @@ _GL_FUNCDECL_SYS (wcsncmp, int,
# endif
_GL_CXXALIAS_SYS (wcsncmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsncmp);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsncmp
# if HAVE_RAW_DECL_WCSNCMP
@@ -783,7 +821,9 @@ _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
# endif
_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcscoll);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcscoll
# if HAVE_RAW_DECL_WCSCOLL
@@ -801,7 +841,9 @@ _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
# endif
_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsxfrm);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsxfrm
# if HAVE_RAW_DECL_WCSXFRM
@@ -845,7 +887,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcschr,
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (wcschr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -875,7 +917,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsrchr,
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsrchr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -895,7 +937,9 @@ _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
_GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcscspn);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcscspn
# if HAVE_RAW_DECL_WCSCSPN
@@ -913,7 +957,9 @@ _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
_GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsspn);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsspn
# if HAVE_RAW_DECL_WCSSPN
@@ -944,7 +990,7 @@ _GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
(wchar_t *wcs, const wchar_t *accept));
_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
(const wchar_t *wcs, const wchar_t *accept));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (wcspbrk);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -977,7 +1023,7 @@ _GL_CXXALIASWARN1 (wcsstr, wchar_t *,
(wchar_t *haystack, const wchar_t *needle));
_GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
(const wchar_t *haystack, const wchar_t *needle));
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsstr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -997,7 +1043,9 @@ _GL_FUNCDECL_SYS (wcstok, wchar_t *,
# endif
_GL_CXXALIAS_SYS (wcstok, wchar_t *,
(wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcstok);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcstok
# if HAVE_RAW_DECL_WCSTOK
@@ -1057,7 +1105,9 @@ _GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
_GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
const wchar_t *__fmt, const struct tm *__tp));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsftime);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsftime
# if HAVE_RAW_DECL_WCSFTIME
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
index 1a04742..4e57961 100644
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -558,7 +558,9 @@ _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
# else
_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (iswblank);
+# endif
#endif
#if !@HAVE_WCTYPE_T@
@@ -623,7 +625,9 @@ typedef void * wctrans_t;
_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
# endif
_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wctrans);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wctrans
# if HAVE_RAW_DECL_WCTRANS
@@ -640,7 +644,9 @@ _GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
# endif
_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (towctrans);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef towctrans
# if HAVE_RAW_DECL_TOWCTRANS
--
2.7.4