]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Add a new COMPAT option for environments lacking SecureZeroMemory(),
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 18 Sep 2012 23:05:29 +0000 (23:05 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 18 Sep 2012 23:05:29 +0000 (23:05 +0000)
rather than explicitly checking for Winelib.  It seems that w32api is
lacking it as well.

[originally from svn r9669]

Recipe
mkfiles.pl
windows/winmisc.c
windows/winstuff.h

diff --git a/Recipe b/Recipe
index e42593b2aa1d8464fd7d5ee41fcc59ab5724f716..3b65c83bd0a643c839107d49f92f91225efb636d 100644 (file)
--- a/Recipe
+++ b/Recipe
 #      Cygnus/mingw32, whose resource compiler may have less of a
 #      problem with it.
 #
+#  - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
+#      Disables PuTTY's use of SecureZeroMemory(), which is missing
+#      from some environments' header files.  This is enabled by
+#      default in the Cygwin Makefile.
+#
 #  - XFLAGS=/DTELNET_DEFAULT
 #      Causes PuTTY to default to the Telnet protocol (in the absence
 #      of Default Settings and so on to the contrary). Normally PuTTY
index c87ae4e673e695db921a9fd40eccb4a4f0a7da12..3786d3119316d53f4cd6f3062f3b6cf0cf075a14 100755 (executable)
@@ -453,7 +453,7 @@ if (defined $makefiles{'cygwin'}) {
     "# RCINC = --include-dir c:\\cygwin\\include\\\n".
     "\n".
     &splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
-      " -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP " .
+      " -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -DNO_SECUREZEROMEMORY " .
               (join " ", map {"-I$dirpfx$_"} @srcdirs)) .
               "\n".
     "LDFLAGS = -mno-cygwin -s\n".
index e3321b5366f41f25d1abc11733d1541823c1e314..c74f1e7a6b90164eb3ab39f0c418073554a5a5da 100644 (file)
@@ -68,7 +68,7 @@ Filename *filename_deserialise(void *vdata, int maxsize, int *used)
     return filename_from_str(data);
 }
 
-#ifndef __WINE__ /* No SecureZeroMemory in Winelib 1.4 */
+#ifndef NO_SECUREZEROMEMORY
 /*
  * Windows implementation of smemclr (see misc.c) using SecureZeroMemory.
  */
index 985e01a7a845188d36120c184833293d54a4d848..cfed04846adb6d4d64b205b2b684db120e406333 100644 (file)
@@ -75,7 +75,7 @@ struct FontSpec *fontspec_new(const char *name,
 #define BOXRESULT (DLGWINDOWEXTRA + sizeof(LONG_PTR))
 #define DF_END 0x0001
 
-#ifndef __WINE__ /* No SecureZeroMemory in Winelib 1.4 */
+#ifndef NO_SECUREZEROMEMORY
 #define PLATFORM_HAS_SMEMCLR /* inhibit cross-platform one in misc.c */
 #endif