diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-05 17:16:09 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-05 17:16:09 +0100 |
commit | 7ca7d7d7d7553f9d6f3484e53f24d10433f8fdcd (patch) | |
tree | 4390ec945fb57ccb3b0d46118c1e3fd9d878a02d | |
parent | cf2937d427fd4fc5841b12f2da7ca38297738bf6 (diff) | |
download | gnulib-7ca7d7d7d7553f9d6f3484e53f24d10433f8fdcd.tar.gz |
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | doc/glibc-functions/getpass.texi | 4 | ||||
-rw-r--r-- | m4/getpass.m4 | 5 |
3 files changed, 14 insertions, 1 deletions
@@ -1,5 +1,11 @@ 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. * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro. * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use diff --git a/doc/glibc-functions/getpass.texi b/doc/glibc-functions/getpass.texi index 17f1b2374b..8d2ff847ee 100644 --- a/doc/glibc-functions/getpass.texi +++ b/doc/glibc-functions/getpass.texi @@ -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}: diff --git a/m4/getpass.m4 b/m4/getpass.m4 index 15882712d9..2dce1e0dfe 100644 --- a/m4/getpass.m4 +++ b/m4/getpass.m4 @@ -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 |