]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 21.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 11:27:03 +0000 (12:27 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:40 +0000 (15:56 +0100)
* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Conditionally set REPLACE_STPNCPY.
* lib/string.in.h (stpncpy): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/string.in.h
m4/stpncpy.m4

index 3de67682f183fe7741d658c489011288e1b20886..092a3b50d5e36fbfa566050c5dd6619244ec919e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 
        Resolve conflicts for functions introduced in Android API level 21.
 
+       * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Conditionally set REPLACE_STPNCPY.
+       * lib/string.in.h (stpncpy): Disable _GL_CXXALIASWARN invocation on
+       non-glibc systems.
+
        * m4/random.m4 (gl_FUNC_RANDOM): Conditionally set REPLACE_INITSTATE,
        REPLACE_SETSTATE.
        * lib/stdlib.in.h (initstate, setstate): Disable _GL_CXXALIASWARN
index ffcc7e25c6be2cea64b00bbd9097a5770ad2cb31..7d0104ce556aad35e315a130656428ac9a1e4d30 100644 (file)
@@ -462,7 +462,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *,
                   (char *restrict __dst, char const *restrict __src,
                    size_t __n));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (stpncpy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef stpncpy
 # if HAVE_RAW_DECL_STPNCPY
index c321093b665a6343012f4cfac2b5e0d6693d9661..b9850364ed2e3dbcb49ffe444e99ff40a763487f 100644 (file)
@@ -1,4 +1,4 @@
-# stpncpy.m4 serial 20
+# stpncpy.m4 serial 21
 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -96,6 +96,9 @@ int main ()
     esac
   else
     HAVE_STPNCPY=0
+    case "$gl_cv_onwards_func_stpncpy" in
+      future*) REPLACE_STPNCPY=1 ;;
+    esac
   fi
 ])