# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1601959300 0 # Node ID 81c50388851d1ada8086e7e8f713ec95ea719ba8 # Parent 6533fc42c95148c77fd3ff8caec31daec6756bd6 Win: Cleaner way to disable common function deprecation warnings. diff -r 6533fc42c951 -r 81c50388851d makefile.vc --- a/makefile.vc Mon Oct 05 00:49:20 2020 +0000 +++ b/makefile.vc Tue Oct 06 04:41:40 2020 +0000 @@ -62,8 +62,6 @@ # Settings for either debug or release # !if "$(DEBUG)" == "Y" -# -D_CRT_SECURE_NO_WARNINGS disables unsafe string function warnings -# These can be perfectly safe if used properly but get enabled by -W3 CFLAGS_DEBUG = -DDEBUG -Z7 -W3 -Od -MTd # was -Zi LINK_DEBUG = -debug !else @@ -112,9 +110,9 @@ WINTOASTOBJ=wintoast.obj wintoastlib.obj !endif -# Visual C CRT deprecates a lot of common functions, these lines -# will hide the deprecation warnings, remove these options to see them -CRT_FLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNING +# The Visual C CRT and other Windows components have deprecated lots of common functions +# These options will hide the deprecation warnings; Comment the next line to see them +CRT_FLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNING -D_WINSOCK_DEPRECATED_NO_WARNINGS CFLAGS = -c $(PLATFORM_DEF) -D__WIN32__ -DMSVC -DTOOLBAR -DGDIPLUS -DAEROGLASS -D_UNICODE -DUNICODE -DBUILD_DLL -DISOLATION_AWARE_ENABLED=1 -I$(SRCDIR)\platform -I$(SRCDIR) $(WEBVIEW2INC) $(WINTOASTINC) $(SVNVERSION) $(CRT_FLAGS) LIBS = wsock32.lib kernel32.lib user32.lib comctl32.lib gdi32.lib advapi32.lib shell32.lib comdlg32.lib ole32.lib oleaut32.lib userenv.lib msimg32.lib gdiplus.lib $(WEBVIEW2LIB)