# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1601858960 0 # Node ID 6533fc42c95148c77fd3ff8caec31daec6756bd6 # Parent d871f636b46eaa4e9bdf8283951892d1418631e1 Fix building on Windows 2000 and changes to avoid CRT warnings. Was using __has_extension() to check for clang, use __clang__ instead. diff -r d871f636b46e -r 6533fc42c951 dw.h --- a/dw.h Sun Oct 04 23:50:36 2020 +0000 +++ b/dw.h Mon Oct 05 00:49:20 2020 +0000 @@ -1549,7 +1549,7 @@ #include /* Macros for converting from INT/UINT to and from POINTER without compiler warnings */ -#if _MSC_VER > 1500 || (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 30100 || defined(__has_extension) +#if _MSC_VER > 1500 || __GNUC_PREREQ(3, 1) || defined(__clang__) #include /* There has got to be a better way to check for the intptr_t type.... * for now just include valid versions of Visual C and GCC plus clang. diff -r d871f636b46e -r 6533fc42c951 makefile.vc --- a/makefile.vc Sun Oct 04 23:50:36 2020 +0000 +++ b/makefile.vc Mon Oct 05 00:49:20 2020 +0000 @@ -112,7 +112,11 @@ WINTOASTOBJ=wintoast.obj wintoastlib.obj !endif -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) -D_CRT_SECURE_NO_WARNINGS +# 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 + +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) RES = LINKFLAGS = -machine:$(TARGET_CPU) -manifest $(LINK_DEBUG)