From 634e7ef19b547721119e963c51e4af16d6b88f46 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 16 Jul 2012 20:18:31 +1000 Subject: Reenable building for Windows NT 4 on NT 4. --- win32/PlatWin.cxx | 6 +++++- win32/ScintillaWin.cxx | 6 +++++- win32/makefile | 9 +++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index d791ff45b..aad7bcf24 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -18,7 +18,11 @@ #include #undef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 +#ifdef WIN_TARGET +#define _WIN32_WINNT WIN_TARGET +#else +#define _WIN32_WINNT 0x0500 +#endif #include #include #include diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 80abc69d9..e92bd7b13 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -18,7 +18,11 @@ #include #undef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 +#ifdef WIN_TARGET +#define _WIN32_WINNT WIN_TARGET +#else +#define _WIN32_WINNT 0x0500 +#endif #include #include #include diff --git a/win32/makefile b/win32/makefile index c71997c65..6d2846feb 100644 --- a/win32/makefile +++ b/win32/makefile @@ -8,6 +8,15 @@ CC = g++ DEL = del /q +# Discover Windows version by running 'VER' command and parsing output +# For Windows 2000 looks like:Microsoft Windows 2000 [Version 5.00.2195] +WINVERWORDS:=$(wordlist 1,2,$(subst ., ,$(lastword $(shell ver)))) +WINVER:=$(firstword $(WINVERWORDS)).$(lastword $(WINVERWORDS)) +# Windows NT 4 does not support GetMonitorInfo +ifeq '$(WINVER)' '4.0' + VERSION_DEFINES:=-DWIN_TARGET=0x0400 +endif + COMPONENT = ../bin/Scintilla.dll LEXCOMPONENT = ../bin/SciLexer.dll LEXLIB = Lexers.a -- cgit v1.2.3