]> Savannah Git Hosting - gnulib.git/commitdiff
getpass: don't assume struct termios
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Aug 2014 01:13:41 +0000 (18:13 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Aug 2014 01:14:00 +0000 (18:14 -0700)
Problem report and trivial fix by Jonas 'Sortie' Termansen in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00015.html
* lib/getpass.c (getpass): Port to systems lacking struct termios.

ChangeLog
lib/getpass.c

index b0ba90a8c1ed0e89856df4c1d1e181960a480cbf..f5fdea6b405df3f48084d6c775ec68c7e4f9b12b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-08-07  Paul Eggert  <eggert@cs.ucla.edu>
 
+       getpass: don't assume struct termios
+       Problem report and trivial fix by Jonas 'Sortie' Termansen in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00015.html
+       * lib/getpass.c (getpass): Port to systems lacking struct termios.
+
        getdtablesize: fall back on sysconf (_SC_OPEN_MAX)
        Problem reported by Jonas 'Sortie' Termansen in:
        http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00023.html
index 43d0d5947efd2f61dfaee273f96582f4fab475a2..18dc0b7ef83762d3b60a378e176d0f7377d87969 100644 (file)
@@ -85,7 +85,9 @@ getpass (const char *prompt)
 {
   FILE *tty;
   FILE *in, *out;
+# if HAVE_TCGETATTR
   struct termios s, t;
+# endif
   bool tty_changed = false;
   static char *buf;
   static size_t bufsize;