mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-09-01 02:34:55 +00:00
Resolve conflicts for functions introduced in Android API level 23.
* lib/wchar.in.h (wmempcpy): Consider REPLACE_WMEMPCPY. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMPCPY. * modules/wchar (Makefile.am): Substitute REPLACE_WMEMPCPY. * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Conditionally set REPLACE_WMEMPCPY. * modules/wmempcpy (configure.ac): Consider REPLACE_WMEMPCPY.
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
|
||||
Resolve conflicts for functions introduced in Android API level 23.
|
||||
|
||||
* lib/wchar.in.h (wmempcpy): Consider REPLACE_WMEMPCPY.
|
||||
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMPCPY.
|
||||
* modules/wchar (Makefile.am): Substitute REPLACE_WMEMPCPY.
|
||||
* m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Conditionally set
|
||||
REPLACE_WMEMPCPY.
|
||||
* modules/wmempcpy (configure.ac): Consider REPLACE_WMEMPCPY.
|
||||
|
||||
* lib/unistd.in.h (sethostname): Consider REPLACE_SETHOSTNAME. Disable
|
||||
_GL_CXXALIASWARN invocation on non-glibc systems.
|
||||
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_SETHOSTNAME.
|
||||
|
||||
+15
-2
@@ -696,14 +696,27 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
|
||||
/* Copy N wide characters of SRC to DEST.
|
||||
Return pointer to wide characters after the last written wide character. */
|
||||
#if @GNULIB_WMEMPCPY@
|
||||
# if !@HAVE_WMEMPCPY@
|
||||
# if @REPLACE_WMEMPCPY@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef wmempcpy
|
||||
# define wmempcpy rpl_wmempcpy
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (wmempcpy, wchar_t *,
|
||||
(wchar_t *restrict dest,
|
||||
const wchar_t *restrict src, size_t n));
|
||||
_GL_CXXALIAS_RPL (wmempcpy, wchar_t *,
|
||||
(wchar_t *restrict dest,
|
||||
const wchar_t *restrict src, size_t n));
|
||||
# else
|
||||
# if !@HAVE_WMEMPCPY@
|
||||
_GL_FUNCDECL_SYS (wmempcpy, wchar_t *,
|
||||
(wchar_t *restrict dest,
|
||||
const wchar_t *restrict src, size_t n));
|
||||
# endif
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (wmempcpy, wchar_t *,
|
||||
(wchar_t *restrict dest,
|
||||
const wchar_t *restrict src, size_t n));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (wmempcpy);
|
||||
# endif
|
||||
|
||||
+2
-1
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Written by Eric Blake.
|
||||
|
||||
# wchar_h.m4 serial 55
|
||||
# wchar_h.m4 serial 56
|
||||
|
||||
AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
[
|
||||
@@ -254,4 +254,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
|
||||
REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH])
|
||||
REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME])
|
||||
REPLACE_WCSTOK=0; AC_SUBST([REPLACE_WCSTOK])
|
||||
REPLACE_WMEMPCPY=0; AC_SUBST([REPLACE_WMEMPCPY])
|
||||
])
|
||||
|
||||
+4
-1
@@ -1,4 +1,4 @@
|
||||
# wmempcpy.m4 serial 2
|
||||
# wmempcpy.m4 serial 3
|
||||
dnl Copyright (C) 2020-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,
|
||||
@@ -17,5 +17,8 @@ AC_DEFUN([gl_FUNC_WMEMPCPY],
|
||||
gl_CHECK_FUNCS_ANDROID([wmempcpy], [[#include <wchar.h>]])
|
||||
if test $ac_cv_func_wmempcpy = no; then
|
||||
HAVE_WMEMPCPY=0
|
||||
case "$gl_cv_onwards_func_wmempcpy" in
|
||||
future*) REPLACE_WMEMPCPY=1 ;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -143,6 +143,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
|
||||
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
|
||||
-e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
|
||||
-e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
|
||||
-e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
|
||||
+2
-1
@@ -10,7 +10,8 @@ wchar
|
||||
|
||||
configure.ac:
|
||||
gl_FUNC_WMEMPCPY
|
||||
gl_CONDITIONAL([GL_COND_OBJ_WMEMPCPY], [test $HAVE_WMEMPCPY = 0])
|
||||
gl_CONDITIONAL([GL_COND_OBJ_WMEMPCPY],
|
||||
[test $HAVE_WMEMPCPY = 0 || test $REPLACE_WMEMPCPY = 1])
|
||||
gl_WCHAR_MODULE_INDICATOR([wmempcpy])
|
||||
|
||||
Makefile.am:
|
||||
|
||||
Reference in New Issue
Block a user