apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r892909 - in /apr/apr/trunk: include/arch/netware/apr_private.h passwd/apr_getpass.c
Date Mon, 21 Dec 2009 18:10:43 GMT
Author: wrowe
Date: Mon Dec 21 18:10:42 2009
New Revision: 892909

URL: http://svn.apache.org/viewvc?rev=892909&view=rev
Log:
Restore getpassword == getpass_r hack for older Novell NDKs.

partial revert of r892141

Modified:
    apr/apr/trunk/include/arch/netware/apr_private.h
    apr/apr/trunk/passwd/apr_getpass.c

Modified: apr/apr/trunk/include/arch/netware/apr_private.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/netware/apr_private.h?rev=892909&r1=892908&r2=892909&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/netware/apr_private.h (original)
+++ apr/apr/trunk/include/arch/netware/apr_private.h Mon Dec 21 18:10:42 2009
@@ -56,6 +56,14 @@
 #define HAVE_WRITEV     1
 
 #define HAVE_GETPASS_R  1
+/*
+ * Hack around older NDKs which have only the getpassword() function,
+ * a threadsafe, API-equivilant of getpass_r().
+ */
+#include <ndkvers.h>
+#if (CURRENT_NDK_THRESHOLD < 709060000)
+#define getpass_r getpassword
+#endif
 
 /* 64-bit integer conversion function */
 #define APR_INT64_STRFN	      strtoll

Modified: apr/apr/trunk/passwd/apr_getpass.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/passwd/apr_getpass.c?rev=892909&r1=892908&r2=892909&view=diff
==============================================================================
--- apr/apr/trunk/passwd/apr_getpass.c (original)
+++ apr/apr/trunk/passwd/apr_getpass.c Mon Dec 21 18:10:42 2009
@@ -34,9 +34,13 @@
 #include <unistd.h>
 #endif
 #if APR_HAVE_CONIO_H
+#ifdef _MSC_VER
 #pragma warning(disable: 4032)
 #include <conio.h>
 #pragma warning(default: 4032)
+#else
+#include <conio.h>
+#endif
 #endif
 #if APR_HAVE_STDLIB_H
 #include <stdlib.h>
@@ -75,9 +79,9 @@
 
 #if !defined(HAVE_GETPASS) && !defined(HAVE_GETPASSPHRASE) && !defined(HAVE_GETPASS_R)
 
-/* MPE, Win32, NetWare and BeOS all lack a native getpass() */
+/* MPE, Win32, and BeOS all lack a native getpass() */
 
-#if !defined(HAVE_TERMIOS_H) && !defined(WIN32) && !defined(NETWARE)
+#if !defined(HAVE_TERMIOS_H) && !defined(WIN32)
 /*
  * MPE lacks getpass() and a way to suppress stdin echo.  So for now, just
  * issue the prompt and read the results with echo.  (Ugh).



Mime
View raw message