[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to the W32 part of the getpass module
From: |
Martin Lambers |
Subject: |
Changes to the W32 part of the getpass module |
Date: |
Wed, 24 May 2006 21:46:47 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
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.
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
- Changes to the W32 part of the getpass module,
Martin Lambers <=