Mercurial > dwindows
changeset 2171:6533fc42c951
Fix building on Windows 2000 and changes to avoid CRT warnings.
Was using __has_extension() to check for clang, use __clang__ instead.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 05 Oct 2020 00:49:20 +0000 |
parents | d871f636b46e |
children | 81c50388851d |
files | dw.h makefile.vc |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <limits.h> /* 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 <stdint.h> /* 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.
--- 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)