From: Simon Josefsson Date: Fri, 26 May 2006 10:13:59 +0000 (+0000) Subject: 2006-05-26 Martin Lambers X-Git-Tag: cvs-readonly~2379 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=0a2c2d3bdc0d6661e52559c775ac3165f1bcee5e;p=gnulib.git 2006-05-26 Martin Lambers * getpass.c: Updates the test for the native W32 API, and adds missing includes, thus fixing compilation warnings. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index a015d11e9..9e687aec6 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Martin Lambers + + * getpass.c: Updates the test for the native W32 API, and adds + missing includes, thus fixing compilation warnings. + 2006-05-25 Paul Eggert * tempname.c (small_open, large_open): New macros. diff --git a/lib/getpass.c b/lib/getpass.c index f0b3184ee..4e3339659 100644 --- a/lib/getpass.c +++ b/lib/getpass.c @@ -23,7 +23,7 @@ #include -#if !defined _WIN32 +#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) #include @@ -170,13 +170,17 @@ getpass (const char *prompt) return buf; } -#else /* WIN32 */ +#else /* W32 native */ /* Windows implementation by Martin Lambers , improved by Simon Josefsson. */ /* For PASS_MAX. */ #include +/* For _getch(). */ +#include +/* For strdup(). */ +#include #ifndef PASS_MAX # define PASS_MAX 512