aboutsummaryrefslogtreecommitdiff
path: root/src/getpass.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-14 11:27:12 +0200
committerYang Tse <yangsita@gmail.com>2011-09-14 11:30:22 +0200
commit90080da5fefe943aec5aa0b9c08510dc1dd48be3 (patch)
tree56b7d4e90e481dbe7aff0bd5f72cb1f8b8e13925 /src/getpass.c
parent0216e517d07f6409534a222b69d550844aeeb4d8 (diff)
curl tool: re-enable MemoryTracking capability on 'src' subdirectory files.
Use same preprocessor logic for curl tool MemoryTracking activation in source files located in 'src' subdirectory as the one used for libcurl sources.
Diffstat (limited to 'src/getpass.c')
-rw-r--r--src/getpass.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/getpass.c b/src/getpass.c
index 438fc8d31..a154d107c 100644
--- a/src/getpass.c
+++ b/src/getpass.c
@@ -19,10 +19,6 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-/* This file is a reimplementation of the previous one, due to license
- problems. */
-
#include "setup.h"
#ifndef HAVE_GETPASS_R
@@ -32,8 +28,6 @@
#include <unistd.h>
#endif
-#include "getpass.h"
-
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -45,17 +39,30 @@
#endif
#endif
-/* The last #include file should be: */
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
+#ifdef __VMS
+# include descrip
+# include starlet
+# include iodef
+#endif
+
+#ifdef WIN32
+# include <conio.h>
+#endif
+
+#ifdef NETWARE
+# ifdef __NOVELL_LIBC__
+# include <screen.h>
+# else
+# include <nwconio.h>
+# endif
#endif
+#include "getpass.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
#ifdef __VMS
/* VMS implementation */
-#include descrip
-#include starlet
-#include iodef
-/* #include iosbdef */
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
long sts;
@@ -91,12 +98,6 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
#define DONE
#endif /* __VMS */
-
-#ifdef WIN32
-/* Windows implementation */
-#include <conio.h>
-#endif
-
#ifdef __SYMBIAN32__
#define getch() getchar()
#endif
@@ -136,13 +137,11 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
#ifdef NETWARE
/* NetWare implementation */
#ifdef __NOVELL_LIBC__
-#include <screen.h>
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
return getpassword(prompt, buffer, buflen);
}
#else
-#include <nwconio.h>
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
size_t i = 0;