From 3f9561f2d5617d0721bee1e67c97d73d44f98877 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 18 Nov 2014 14:44:57 -0800 Subject: [PATCH] Define _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_DEPRECATE There's probably some value in using the "secure" versions of the various string functions, but I don't want to deal with it right now. We won't use them for the stuff that builds under Linux anyway (diskimg, nufxlib). This largely eliminates warnings from VC++. --- app/app.vcxproj | 4 ++-- diskimg/StdAfx.h | 2 -- diskimg/diskimg.vcxproj | 4 ++-- diskimg/libhfs/libhfs.vcxproj | 4 ++-- mdc/mdc.vcxproj | 4 ++-- nufxlib/nufxlib.vcxproj | 4 ++-- reformat/StdAfx.h | 3 --- reformat/reformat.vcxproj | 4 ++-- util/util.vcxproj | 4 ++-- zlib/zlib.vcxproj | 4 ++-- 10 files changed, 16 insertions(+), 21 deletions(-) diff --git a/app/app.vcxproj b/app/app.vcxproj index 1be1e1a..7bd4b85 100644 --- a/app/app.vcxproj +++ b/app/app.vcxproj @@ -56,7 +56,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUGX;_WINDOWS;%(PreprocessorDefinitions) + WIN32;NDEBUGX;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -104,7 +104,7 @@ copy Help\CiderPress.cnt Release\ Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL diff --git a/diskimg/StdAfx.h b/diskimg/StdAfx.h index f133226..e83eb39 100644 --- a/diskimg/StdAfx.h +++ b/diskimg/StdAfx.h @@ -43,8 +43,6 @@ // Insert your headers here # define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#define _CRT_SECURE_NO_WARNINGS // disable VC++ libc complaints here - #include "../app/targetver.h" #include diff --git a/diskimg/diskimg.vcxproj b/diskimg/diskimg.vcxproj index 49a6579..b5c3dbe 100644 --- a/diskimg/diskimg.vcxproj +++ b/diskimg/diskimg.vcxproj @@ -57,7 +57,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUGX;_WINDOWS;_USRDLL;DISKIMG_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUGX;_WINDOWS;_USRDLL;DISKIMG_EXPORTS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -102,7 +102,7 @@ Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;DISKIMG_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;DISKIMG_EXPORTS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Use diff --git a/diskimg/libhfs/libhfs.vcxproj b/diskimg/libhfs/libhfs.vcxproj index 2a53e78..08d2d34 100644 --- a/diskimg/libhfs/libhfs.vcxproj +++ b/diskimg/libhfs/libhfs.vcxproj @@ -52,7 +52,7 @@ Disabled - WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -78,7 +78,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreadedDLL true diff --git a/mdc/mdc.vcxproj b/mdc/mdc.vcxproj index 3591193..b7a2e02 100644 --- a/mdc/mdc.vcxproj +++ b/mdc/mdc.vcxproj @@ -56,7 +56,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUGX;_WINDOWS;%(PreprocessorDefinitions) + WIN32;NDEBUGX;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -102,7 +102,7 @@ Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Use diff --git a/nufxlib/nufxlib.vcxproj b/nufxlib/nufxlib.vcxproj index d6ac04c..e860ad4 100644 --- a/nufxlib/nufxlib.vcxproj +++ b/nufxlib/nufxlib.vcxproj @@ -51,7 +51,7 @@ Level3 Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;NUFXLIB_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;NUFXLIB_EXPORTS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) Windows @@ -66,7 +66,7 @@ MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;_USRDLL;NUFXLIB_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;NUFXLIB_EXPORTS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) Windows diff --git a/reformat/StdAfx.h b/reformat/StdAfx.h index 198deea..239fe09 100644 --- a/reformat/StdAfx.h +++ b/reformat/StdAfx.h @@ -21,9 +21,6 @@ #include "../app/targetver.h" -// TODO: use the "secure" versions? -#define _CRT_SECURE_NO_WARNINGS - #include #include #include diff --git a/reformat/reformat.vcxproj b/reformat/reformat.vcxproj index 17e32bc..ca316e1 100644 --- a/reformat/reformat.vcxproj +++ b/reformat/reformat.vcxproj @@ -54,7 +54,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -80,7 +80,7 @@ Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Use diff --git a/util/util.vcxproj b/util/util.vcxproj index 3b74cc3..cf7ef9c 100644 --- a/util/util.vcxproj +++ b/util/util.vcxproj @@ -54,7 +54,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUGX;_WINDOWS;%(PreprocessorDefinitions) + WIN32;NDEBUGX;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -79,7 +79,7 @@ Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Use diff --git a/zlib/zlib.vcxproj b/zlib/zlib.vcxproj index 93edd86..b081830 100644 --- a/zlib/zlib.vcxproj +++ b/zlib/zlib.vcxproj @@ -51,7 +51,7 @@ Level3 Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;ZLIB_EXPORTS;ZLIB_DLL;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;ZLIB_EXPORTS;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) Windows @@ -67,7 +67,7 @@ MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;_USRDLL;ZLIB_EXPORTS;ZLIB_DLL;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;ZLIB_EXPORTS;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) Windows