bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes to the W32 part of the getpass module


From: Simon Josefsson
Subject: Re: Changes to the W32 part of the getpass module
Date: Fri, 26 May 2006 11:00:31 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Martin Lambers <address@hidden> 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  <address@hidden>

        * 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 <address@hidden>,
>     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

[Prev in Thread] Current Thread [Next in Thread]