From: Vadim Zeitlin Date: Sat, 8 Apr 2006 22:58:54 +0000 (+0000) Subject: don't redefine _CRT_SECURE_NO_DEPRECATE and _CRT_NON_CONFORMING_SWPRINTFS if already... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4c82058341a64795e819d43abf912813ab813211 don't redefine _CRT_SECURE_NO_DEPRECATE and _CRT_NON_CONFORMING_SWPRINTFS if already defined (patch 1463364) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index deb2a98a5c..ea4f1efbdc 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -79,12 +79,18 @@ # pragma warning(disable:4702) /* unreachable code */ # endif -/* Deprecated functions such as sprintf, localtime */ -#if __VISUALC__ >= 1400 -#define _CRT_SECURE_NO_DEPRECATE 1 -#define _CRT_NON_CONFORMING_SWPRINTFS 1 -#endif - + /* + VC++ 8 gives a warning when using standard functions such as sprintf, + localtime, ... -- stop this madness, unless the user had already done it + */ + #if __VISUALC__ >= 1400 + #ifndef _CRT_SECURE_NO_DEPRECATE + #define _CRT_SECURE_NO_DEPRECATE 1 + #endif + #ifndef _CRT_NON_CONFORMING_SWPRINTFS + #define _CRT_NON_CONFORMING_SWPRINTFS 1 + #endif + #endif /* VC++ 8 */ #endif /* __VISUALC__ */ /* suppress some Salford C++ warnings */