changeset 17003:13795cd8c0ba

getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4. * lib/getpass.h: Assume HAVE_DECL_GETPASS is defined. * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests): Remove exemption for getpass.h. Suggested by Eric Blake.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 Jul 2012 21:31:42 +0200
parents 0103491fe167
children 1a403c75d360
files ChangeLog cfg.mk lib/getpass.h
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-22  Bruno Haible  <bruno@clisp.org>
+
+	getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.
+	* lib/getpass.h: Assume HAVE_DECL_GETPASS is defined.
+	* cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
+	Remove exemption for getpass.h.
+	Suggested by Eric Blake.
+
 2012-07-20  Eric Blake  <eblake@redhat.com>
 
 	verify: document conflict with -Wnested-externs
--- a/cfg.mk
+++ b/cfg.mk
@@ -79,4 +79,4 @@
   ^lib/($(if_before_free_basename_re_))\.c$$
 
 exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests = \
-  ^lib/((error|getopt|strtoimax)\.c|(argp-namefrob|getpass)\.h)$$
+  ^lib/((error|getopt|strtoimax)\.c|(argp-namefrob)\.h)$$
--- a/lib/getpass.h
+++ b/lib/getpass.h
@@ -21,7 +21,7 @@
 /* Get getpass declaration, if available.  */
 # include <unistd.h>
 
-# if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS
+# if !HAVE_DECL_GETPASS
 /* Read a password of arbitrary length from /dev/tty or stdin.  */
 char *getpass (const char *prompt);