]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 28.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 13:43:32 +0000 (14:43 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:57:24 +0000 (15:57 +0100)
* m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Conditionally set
REPLACE_GETLOGIN_R.
* lib/unistd.in.h (getlogin_r): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/unistd.in.h
m4/getlogin_r.m4

index 5d8512490456dd2609b07f7a762039dec9ab99c5..5d89546b44b0d76c8558acc88d110fd50a889a9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 
        Resolve conflicts for functions introduced in Android API level 28.
 
+       * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Conditionally set
+       REPLACE_GETLOGIN_R.
+       * lib/unistd.in.h (getlogin_r): Disable _GL_CXXALIASWARN invocation on
+       non-glibc systems.
+
        * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Conditionally set
        REPLACE_POSIX_SPAWN.
        * lib/spawn.in.h: Adapt logic for defining the POSIX_SPAWN_* constants.
index 8016f7345efdefab0ad61f0c85d61e9efdb952d3..bfc501e5a7da707a3fa18c9bb7b9aa5c52afd637 100644 (file)
@@ -1356,7 +1356,9 @@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
                                                      int size.  */
 _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getlogin_r);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getlogin_r
 # if HAVE_RAW_DECL_GETLOGIN_R
index cbfe255ee12fd5aab52051339dee1269dbbf1886..4383ea6a025dc39ce7bd4fea6d9d35124d162b6a 100644 (file)
@@ -1,4 +1,4 @@
-#serial 14
+#serial 15
 
 # Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
 #
@@ -28,6 +28,9 @@ AC_DEFUN([gl_FUNC_GETLOGIN_R],
   gl_CHECK_FUNCS_ANDROID([getlogin_r], [[#include <unistd.h>]])
   if test $ac_cv_func_getlogin_r = no; then
     HAVE_GETLOGIN_R=0
+    case "$gl_cv_onwards_func_getlogin_r" in
+      future*) REPLACE_GETLOGIN_R=1 ;;
+    esac
   else
     HAVE_GETLOGIN_R=1
     dnl On Mac OS X 10.13 and OSF/1 5.1, getlogin_r returns a truncated result