]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Windows: compile with /D_CRT_SECURE_NO_WARNINGS.
authorSimon Tatham <anakin@pobox.com>
Sat, 2 Apr 2016 08:21:55 +0000 (09:21 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 2 Apr 2016 13:21:54 +0000 (14:21 +0100)
With all due respect to Microsoft, a cross-platform program simply
cannot switch to using MS's assorted 'secure' versions of standard C
functions if it wants to continue compiling on platforms other than
Windows. So I might as well squash the warnings, so that any other
more interesting compiler warnings can avoid being swamped in the
mess.

mkfiles.pl

index 46ae3189985639de744429c174763db9a6203e88..a96aa9ae9b4cea88f06fe471a699b58cd6059dfb 100755 (executable)
@@ -636,7 +636,7 @@ if (defined $makefiles{'vc'}) {
       "# C compilation flags\n".
       "CFLAGS = /nologo /W3 /O1 " .
       (join " ", map {"-I$dirpfx$_"} @srcdirs) .
-      " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500\n".
+      " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 /D_CRT_SECURE_NO_WARNINGS\n".
       "LFLAGS = /incremental:no /fixed\n".
       "RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs).
       " -DWIN32 -D_WIN32 -DWINVER=0x0400\n".