]> Savannah Git Hosting - gnulib.git/commitdiff
getpass: Fix compilation error on Android.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Jan 2023 16:16:09 +0000 (17:16 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Jan 2023 16:16:09 +0000 (17:16 +0100)
* m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS.
* doc/glibc-functions/getpass.texi: Mention the Android problem.

ChangeLog
doc/glibc-functions/getpass.texi
m4/getpass.m4

index 7327d57a4c3b69d9f20f9ba783bdfd86675bf7c3..71a4dd1acf5fae76377ae6268468541ee7bafde5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-05  Bruno Haible  <bruno@clisp.org>
+
+       getpass: Fix compilation error on Android.
+       * m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS.
+       * doc/glibc-functions/getpass.texi: Mention the Android problem.
+
 2023-01-05  Bruno Haible  <bruno@clisp.org>
 
        Recognize functions added in future versions of Android.
index 17f1b2374b83472027ad31f507296d840f14f973..8d2ff847eec23f36b0cfef5e113715f998b83bcd 100644 (file)
@@ -22,6 +22,10 @@ Portability problems fixed by either Gnulib module @code{getpass} or @code{getpa
 @item
 This function is missing on some platforms:
 mingw, MSVC 14, Android 9.0.
+@item
+This function cannot be called from plain inline or extern inline functions
+on some platforms:
+Android 13.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{getpass-gnu}:
index 15882712d97abb51d520df5e87d1dd5056cfb23c..2dce1e0dfe991353084e5b45995c407f364cd83e 100644 (file)
@@ -1,4 +1,4 @@
-# getpass.m4 serial 17
+# getpass.m4 serial 18
 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -13,6 +13,9 @@ AC_DEFUN_ONCE([gl_FUNC_GETPASS],
   dnl Persuade Solaris <unistd.h> and <stdlib.h> to declare getpass().
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
+  dnl Persuade Android <unistd.h> to not define getpass() as an inline function.
+  AC_DEFINE([NO_INLINE_GETPASS], [1], [Define to 1 on Android.])
+
   AC_CHECK_FUNCS_ONCE([getpass])
   if test $ac_cv_func_getpass = no; then
     HAVE_GETPASS=0