From: Steve Hay Date: Tue, 21 Aug 2007 09:55:07 +0000 (+0000) Subject: Use -D_CRT_NONSTDC_NO_DEPRECATE rather than -wd4996 to suppress warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26a6faa8c051ae454ebc29802780673024f05cbd;p=p5sagit%2Fp5-mst-13.2.git Use -D_CRT_NONSTDC_NO_DEPRECATE rather than -wd4996 to suppress warnings about POSIX CRT function names being deprecated in VC8 (-wd4996 suppresses all deprecated function warnings, so is more wide-ranging than is required) p4raw-id: //depot/perl@31742 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index b58ad8f..d981521 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -383,7 +383,7 @@ warning suppressant and actually make use of the new secure CRT functions. There is also a similar issue with POSIX CRT function names like fileno having been deprecated in favour of ISO C++ conformant names like _fileno. These -warnings are also currently suppressed with the compiler option /wd4996. It +warnings are also currently suppressed by adding -D_CRT_NONSTDC_NO_DEPRECATE. It might be nice to do as Microsoft suggest here too, although, unlike the secure functions issue, there is presumably little or no benefit in this case. diff --git a/win32/Makefile b/win32/Makefile index 001c7f3..cbfae95 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -457,7 +457,7 @@ OPTIMIZE = $(OPTIMIZE) -Wp64 -fp:precise # For now, silence VC++ 8.x's warnings about "unsafe" CRT functions and POSIX # CRT function names being deprecated. !IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" -DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -wd4996 +DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE !ENDIF # Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using diff --git a/win32/makefile.mk b/win32/makefile.mk index f565f84..60688d9 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -568,7 +568,7 @@ OPTIMIZE += -Wp64 -fp:precise # For now, silence VC++ 8.x's warnings about "unsafe" CRT functions and POSIX # CRT function names being deprecated. .IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" -DEFINES += -D_CRT_SECURE_NO_DEPRECATE -wd4996 +DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE .ENDIF # Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using