summaryrefslogtreecommitdiff
path: root/src/fl_font.cxx
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2011-05-23 16:06:13 +0000
committerIan MacArthur <imacarthur@gmail.com>2011-05-23 16:06:13 +0000
commit4614fffc296a3dd54928f745fff002e8efed1a61 (patch)
treecb6ec8290e7b5b5e0e46e05da9bfbf6935fdc1fb /src/fl_font.cxx
parentfa731c806c2c85dc8ee470dc8ca858a7e90a3395 (diff)
Rework the ifdefs for defining the appropriate value of WINVER in our builds.
In particular, ensure that if we redefine WINVER we undef it first (if it is already set) and also ensure that it is set before we include windows.h (by any hidden nested path!) in Fl.cxx. Previously, we were hitting issues with WINVER being redefined in some build cases, e.g. with --enable-cairo set on a win32 build. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8722 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_font.cxx')
-rw-r--r--src/fl_font.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fl_font.cxx b/src/fl_font.cxx
index 53a639efd..6e2bf3495 100644
--- a/src/fl_font.cxx
+++ b/src/fl_font.cxx
@@ -26,14 +26,20 @@
//
#ifdef WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
/* We require Windows 2000 features such as GetGlyphIndices */
# if !defined(WINVER) || (WINVER < 0x0500)
+# ifdef WINVER
+# undef WINVER
+# endif
# define WINVER 0x0500
# endif
# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
+# ifdef _WIN32_WINNT
+# undef _WIN32_WINNT
+# endif
# define _WIN32_WINNT 0x0500
# endif
#endif