diff options
author | Bruno Haible <bruno@clisp.org> | 2018-08-19 14:14:17 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-08-19 14:14:17 +0200 |
commit | 3d8634f17142fd4b12440c79ed4226ba6199f7dc (patch) | |
tree | 796815780465fbc4e7f5ff8f82fd8574f856dc11 /tests | |
parent | 4021aac50de4c0c9a997f4ec60075fe9831af33c (diff) | |
download | gnulib-3d8634f17142fd4b12440c79ed4226ba6199f7dc.tar.gz |
getpass: Move declaration to <unistd.h>.
* lib/unistd.in.h (getpass): New declaration.
* lib/getpass.h: Replace with a stub that just includes <unistd.h>.
* m4/getpass.m4 (gl_FUNC_GETPASS): Declare through AC_DEFUN_ONCE.
Require gl_UNISTD_H_DEFAULTS. Don't test whether getpass is declared.
(gl_FUNC_GETPASS_GNU): Require gl_UNISTD_H_DEFAULTS and gl_FUNC_GETPASS.
On glibc systems, don't set REPLACE_GETPASS to 1.
* modules/getpass (Depends-on): Add 'unistd'.
(configure.ac): Test also REPLACE_GETPASS. Define a module indicator.
(Include): Specify <unistd.h> instead of "getpass.h".
* modules/getpass-gnu (Depends-on): Merely depend on 'getpass'.
(configure.ac): Sync with the configure.ac section of modules/getpass.
(Include): Specify <unistd.h> instead of "getpass.h".
* m4/unistd_h.m4 (gl_UNISTD_H): Test whether getpass is declared.
(gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPASS, HAVE_GETPASS,
REPLACE_GETPASS.
* modules/unistd (Makefile.am): Substitute GNULIB_GETPASS, HAVE_GETPASS,
REPLACE_GETPASS.
* tests/test-unistd-c++.cc: Test also the declaration of 'getpass'.
* doc/glibc-functions/getpass.texi: A length limit exists also on uClibc
and musl.
* NEWS: Mention the change.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-unistd-c++.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-unistd-c++.cc b/tests/test-unistd-c++.cc index d7fee3a47f..e4461588c4 100644 --- a/tests/test-unistd-c++.cc +++ b/tests/test-unistd-c++.cc @@ -110,6 +110,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::getlogin_r, int, (char *, size_t)); SIGNATURE_CHECK (GNULIB_NAMESPACE::getpagesize, int, (void)); #endif +#if GNULIB_TEST_GETPASS +SIGNATURE_CHECK (GNULIB_NAMESPACE::getpass, char *, (const char *)); +#endif + #if GNULIB_TEST_GETUSERSHELL SIGNATURE_CHECK (GNULIB_NAMESPACE::getusershell, char *, (void)); #endif |