Martin Lambers <[EMAIL PROTECTED]> writes:

> Hi!
>
> I'd like to propose the following changes to the getpass module. They
> only affect the W32 part of that module. 
> The first change updates the test for the native W32 API.
> The second change adds missing includes, thus fixing compilation
> warnings.

I'm not the official maintainer of getpass, but I think the patch is
OK and suggest this ChangeLog entry:

2006-05-26  Martin Lambers  <[EMAIL PROTECTED]>

        * getpass.c: Updates the test for the native W32 API, and adds
        missing includes, thus fixing compilation warnings.

Of course, in general, it would be better to avoid having a
win32-specific implementation of the function, but pending work
towards that goal, we shouldn't stall any improvements to the current
approach...

> Martin
>
>
> Index: lib/getpass.c
> ===================================================================
> RCS file: /sources/gnulib/gnulib/lib/getpass.c,v
> retrieving revision 1.15
> diff -u -r1.15 getpass.c
> --- lib/getpass.c     19 Sep 2005 17:28:14 -0000      1.15
> +++ lib/getpass.c     24 May 2006 19:40:35 -0000
> @@ -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 <[EMAIL PROTECTED]>,
>     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


Reply via email to