summaryrefslogtreecommitdiff
path: root/m4/getpass.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-01-19 21:55:27 +0100
committerBruno Haible <bruno@clisp.org>2023-01-19 21:55:27 +0100
commit4e763315017dfffcde655329d3343fef35fb0537 (patch)
tree3ee66e1e3c35bb14a50f61870cd6556d4f6f427f /m4/getpass.m4
parent64044f7934922d347c578fa8b2c5b2305aed5ca5 (diff)
downloadgnulib-4e763315017dfffcde655329d3343fef35fb0537.tar.gz
Fix warnings for functions introduced in Android API level 21.
* m4/_Exit.m4 (gl_FUNC__EXIT): Test for _Exit using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/c-strtod.m4 (gl_C_STRTOLD): Test for strtold_l using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb like gl_CHECK_FUNCS_ANDROID does. * m4/dprintf.m4 (gl_FUNC_DPRINTF): Test for dprintf using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise. * m4/dup3.m4 (gl_FUNC_DUP3): Test for dup3 using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for duplocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/execvpe.m4 (gl_FUNC_EXECVPE): Test for execvpe using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/fts.m4 (gl_FUNC_FTS_CORE): Test for fts_open using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC. * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Test for getprogname using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Test for uselocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Test for iswblank using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Test for tcdrain using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/linkat.m4 (gl_FUNC_LINKAT): Test for linkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/localename.m4 (gl_LOCALENAME): Test for newlocale, duplocale, freelocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): Test for mbrtoc32 like gl_CHECK_FUNCS_ANDROID does. * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Test for mbsnrtowcs using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test for mbtowc using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mountlist.m4 (gl_MOUNTLIST): Test for setmntent, endmntent using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Test for posix_openpt using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/pty.m4 (gl_FUNC_OPENPTY): Test for posix_openpt using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/random.m4 (gl_FUNC_RANDOM): Test for initstate, setstate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/stpcpy.m4 (gl_FUNC_STPCPY): Test for stpcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Test for stpncpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Test for symlinkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test for truncate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for twalk using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/vdprintf.m4 (gl_FUNC_VDPRINTF): Test for vdprintf using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise. * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Test for wcsnrtombs using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Test for readlinkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Likewise. * modules/careadlinkat (configure.ac): Likewise. * modules/ftoastr (configure.ac): Test for strtof using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/duplocale-tests (configure.ac): Test for duplocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/hard-locale-tests (configure.ac): Likewise. * modules/locale-tests (configure.ac): Test for newlocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/localename-tests (configure.ac): Likewise. * modules/tsearch-tests (configure.ac): Test for initstate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/unistr/u8-stpcpy (configure.ac): Test for stpcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/tcgetattr.m4: New file, extracted from m4/getpass.m4. * m4/getpass.m4 (gl_PREREQ_GETPASS): Remove code that tests for tcgetattr. Invoke gl_HAVE_TCGETATTR instead. * modules/getpass (Files): Add tcgetattr.m4. * modules/getpass-gnu (Files): Add tcgetattr.m4. * modules/term-style-control (Files): Add tcgetattr.m4. (configure.ac): Remove code that tests for tcgetattr. Invoke gl_HAVE_TCGETATTR instead.
Diffstat (limited to 'm4/getpass.m4')
-rw-r--r--m4/getpass.m424
1 files changed, 2 insertions, 22 deletions
diff --git a/m4/getpass.m4 b/m4/getpass.m4
index 2dce1e0dfe..0e46edf64b 100644
--- a/m4/getpass.m4
+++ b/m4/getpass.m4
@@ -1,4 +1,4 @@
-# getpass.m4 serial 18
+# getpass.m4 serial 19
dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -64,27 +64,7 @@ AC_DEFUN([gl_PREREQ_GETPASS], [
AC_CHECK_DECLS_ONCE([fputs_unlocked])
AC_CHECK_DECLS_ONCE([funlockfile])
AC_CHECK_DECLS_ONCE([putc_unlocked])
-
- dnl We can't use AC_CHECK_FUNC here, because tcgetattr() is defined as a
- dnl static inline function when compiling for Android 4.4 or older.
- AC_CACHE_CHECK([for tcgetattr], [gl_cv_func_tcgetattr],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <termios.h>
- struct termios x;
- ]],
- [[return tcgetattr(0,&x);]])
- ],
- [gl_cv_func_tcgetattr=yes],
- [gl_cv_func_tcgetattr=no])
- ])
- if test $gl_cv_func_tcgetattr = yes; then
- HAVE_TCGETATTR=1
- else
- HAVE_TCGETATTR=0
- fi
- AC_DEFINE_UNQUOTED([HAVE_TCGETATTR], [$HAVE_TCGETATTR],
- [Define to 1 if the system has the 'tcgetattr' function.])
+ gl_HAVE_TCGETATTR
dnl We can't use AC_CHECK_FUNC here, because tcsetattr() is defined as a
dnl static inline function when compiling for Android 4.4 or older.