mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
Resolve conflicts for functions introduced in Android API level 21.
* lib/string.in.h (stpcpy): Consider REPLACE_STPCPY. Disable _GL_CXXALIASWARN invocation on non-glibc systems. * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STPCPY. * modules/string (Makefile.am): Substitute REPLACE_STPCPY. * m4/stpcpy.m4 (gl_FUNC_STPCPY): Conditionally set REPLACE_STPCPY. * modules/stpcpy (configure.ac): Consider REPLACE_STPCPY.
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
|
||||
Resolve conflicts for functions introduced in Android API level 21.
|
||||
|
||||
* lib/string.in.h (stpcpy): Consider REPLACE_STPCPY. Disable
|
||||
_GL_CXXALIASWARN invocation on non-glibc systems.
|
||||
* m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STPCPY.
|
||||
* modules/string (Makefile.am): Substitute REPLACE_STPCPY.
|
||||
* m4/stpcpy.m4 (gl_FUNC_STPCPY): Conditionally set REPLACE_STPCPY.
|
||||
* modules/stpcpy (configure.ac): Consider REPLACE_STPCPY.
|
||||
|
||||
* lib/stdlib.in.h (_Exit): Consider REPLACE__EXIT. Disable
|
||||
_GL_CXXALIASWARN invocation on non-glibc systems.
|
||||
(getprogname): Consider REPLACE_GETPROGNAME. Disable _GL_CXXALIASWARN
|
||||
|
@@ -406,6 +406,17 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
|
||||
|
||||
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
|
||||
#if @GNULIB_STPCPY@
|
||||
# if @REPLACE_STPCPY@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef stpcpy
|
||||
# define stpcpy rpl_stpcpy
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (stpcpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (stpcpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src));
|
||||
# else
|
||||
# if !@HAVE_STPCPY@
|
||||
_GL_FUNCDECL_SYS (stpcpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src)
|
||||
@@ -413,7 +424,10 @@ _GL_FUNCDECL_SYS (stpcpy, char *,
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (stpcpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (stpcpy);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef stpcpy
|
||||
# if HAVE_RAW_DECL_STPCPY
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# stpcpy.m4 serial 10
|
||||
# stpcpy.m4 serial 11
|
||||
dnl Copyright (C) 2002, 2007, 2009-2023 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_STPCPY],
|
||||
gl_CHECK_FUNCS_ANDROID([stpcpy], [[#include <string.h>]])
|
||||
if test $ac_cv_func_stpcpy = no; then
|
||||
HAVE_STPCPY=0
|
||||
case "$gl_cv_onwards_func_stpcpy" in
|
||||
future*) REPLACE_STPCPY=1 ;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 35
|
||||
# serial 36
|
||||
|
||||
# Written by Paul Eggert.
|
||||
|
||||
@@ -131,6 +131,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
|
||||
REPLACE_FFSLL=0; AC_SUBST([REPLACE_FFSLL])
|
||||
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
|
||||
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
|
||||
REPLACE_STPCPY=0; AC_SUBST([REPLACE_STPCPY])
|
||||
REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
|
||||
REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
|
||||
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
|
||||
|
@@ -11,7 +11,8 @@ string
|
||||
|
||||
configure.ac:
|
||||
gl_FUNC_STPCPY
|
||||
gl_CONDITIONAL([GL_COND_OBJ_STPCPY], [test $HAVE_STPCPY = 0])
|
||||
gl_CONDITIONAL([GL_COND_OBJ_STPCPY],
|
||||
[test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1])
|
||||
AM_COND_IF([GL_COND_OBJ_STPCPY], [
|
||||
gl_PREREQ_STPCPY
|
||||
])
|
||||
|
@@ -109,6 +109,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
|
||||
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
|
||||
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
|
||||
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
|
||||
-e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
|
||||
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
|
||||
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
|
||||
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
|
||||
|
Reference in New Issue
Block a user