Mercurial > hg > octave-kai > gnulib-hg
changeset 6807:db206fe9e82c
2006-05-26 Martin Lambers <marlam@marlam.de>
* getpass.c: Updates the test for the native W32 API, and adds
missing includes, thus fixing compilation warnings.
author | Simon Josefsson <simon@josefsson.org> |
---|---|
date | Fri, 26 May 2006 10:13:59 +0000 |
parents | de733e4fedea |
children | c0801910bd92 |
files | lib/ChangeLog lib/getpass.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Martin Lambers <marlam@marlam.de> + + * getpass.c: Updates the test for the native W32 API, and adds + missing includes, thus fixing compilation warnings. + 2006-05-25 Paul Eggert <eggert@cs.ucla.edu> * tempname.c (small_open, large_open): New macros.
--- a/lib/getpass.c +++ b/lib/getpass.c @@ -23,7 +23,7 @@ #include <stdio.h> -#if !defined _WIN32 +#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) #include <stdbool.h> @@ -170,13 +170,17 @@ return buf; } -#else /* WIN32 */ +#else /* W32 native */ /* Windows implementation by Martin Lambers <marlam@marlam.de>, improved by Simon Josefsson. */ /* For PASS_MAX. */ #include <limits.h> +/* For _getch(). */ +#include <conio.h> +/* For strdup(). */ +#include <string.h> #ifndef PASS_MAX # define PASS_MAX 512