diff options
-rw-r--r-- | odb/details/win32/condition.cxx | 4 | ||||
-rw-r--r-- | odb/details/win32/condition.hxx | 8 | ||||
-rw-r--r-- | odb/details/win32/dll.cxx | 4 | ||||
-rw-r--r-- | odb/details/win32/exceptions.hxx | 8 | ||||
-rw-r--r-- | odb/details/win32/lock.hxx | 8 | ||||
-rw-r--r-- | odb/details/win32/mutex.hxx | 8 | ||||
-rw-r--r-- | odb/details/win32/once.cxx | 4 | ||||
-rw-r--r-- | odb/details/win32/once.hxx | 8 | ||||
-rw-r--r-- | odb/details/win32/thread.cxx | 4 | ||||
-rw-r--r-- | odb/details/win32/thread.hxx | 8 | ||||
-rw-r--r-- | odb/details/win32/tls.cxx | 4 |
11 files changed, 62 insertions, 6 deletions
diff --git a/odb/details/win32/condition.cxx b/odb/details/win32/condition.cxx index 93c396b..5ea0c7b 100644 --- a/odb/details/win32/condition.cxx +++ b/odb/details/win32/condition.cxx @@ -3,6 +3,10 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include <windows.h> #include <odb/details/win32/condition.hxx> diff --git a/odb/details/win32/condition.hxx b/odb/details/win32/condition.hxx index 3c40f3a..a66e722 100644 --- a/odb/details/win32/condition.hxx +++ b/odb/details/win32/condition.hxx @@ -8,7 +8,13 @@ #include <odb/pre.hxx> -#include <windows.h> +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# undef WIN32_LEAN_AND_MEAN +#else +# include <windows.h> +#endif #include <cstddef> // std::size_t diff --git a/odb/details/win32/dll.cxx b/odb/details/win32/dll.cxx index 843be8d..c802380 100644 --- a/odb/details/win32/dll.cxx +++ b/odb/details/win32/dll.cxx @@ -8,6 +8,10 @@ // #if defined(LIBODB_STATIC_LIB) || !defined (_MSC_VER) && !defined(DLL_EXPORT) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include <windows.h> #include <odb/details/win32/init.hxx> diff --git a/odb/details/win32/exceptions.hxx b/odb/details/win32/exceptions.hxx index b9ccf50..47243cd 100644 --- a/odb/details/win32/exceptions.hxx +++ b/odb/details/win32/exceptions.hxx @@ -8,7 +8,13 @@ #include <odb/pre.hxx> -#include <windows.h> +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# undef WIN32_LEAN_AND_MEAN +#else +# include <windows.h> +#endif #include <odb/details/export.hxx> #include <odb/details/exception.hxx> diff --git a/odb/details/win32/lock.hxx b/odb/details/win32/lock.hxx index 50611e0..ce869d5 100644 --- a/odb/details/win32/lock.hxx +++ b/odb/details/win32/lock.hxx @@ -8,7 +8,13 @@ #include <odb/pre.hxx> -#include <windows.h> +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# undef WIN32_LEAN_AND_MEAN +#else +# include <windows.h> +#endif namespace odb { diff --git a/odb/details/win32/mutex.hxx b/odb/details/win32/mutex.hxx index 9dbe3a8..7791f6c 100644 --- a/odb/details/win32/mutex.hxx +++ b/odb/details/win32/mutex.hxx @@ -8,7 +8,13 @@ #include <odb/pre.hxx> -#include <windows.h> +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# undef WIN32_LEAN_AND_MEAN +#else +# include <windows.h> +#endif #include <odb/details/export.hxx> diff --git a/odb/details/win32/once.cxx b/odb/details/win32/once.cxx index 9201ea6..0125d23 100644 --- a/odb/details/win32/once.cxx +++ b/odb/details/win32/once.cxx @@ -3,6 +3,10 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include <windows.h> #include <odb/details/win32/once.hxx> diff --git a/odb/details/win32/once.hxx b/odb/details/win32/once.hxx index 258d5e0..05bdca2 100644 --- a/odb/details/win32/once.hxx +++ b/odb/details/win32/once.hxx @@ -8,7 +8,13 @@ #include <odb/pre.hxx> -#include <windows.h> +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# undef WIN32_LEAN_AND_MEAN +#else +# include <windows.h> +#endif #include <odb/details/export.hxx> diff --git a/odb/details/win32/thread.cxx b/odb/details/win32/thread.cxx index 610980d..904723f 100644 --- a/odb/details/win32/thread.cxx +++ b/odb/details/win32/thread.cxx @@ -3,6 +3,10 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include <windows.h> #include <process.h> // _beginthreadex, _endthreadex diff --git a/odb/details/win32/thread.hxx b/odb/details/win32/thread.hxx index d52de48..42170fb 100644 --- a/odb/details/win32/thread.hxx +++ b/odb/details/win32/thread.hxx @@ -8,7 +8,13 @@ #include <odb/pre.hxx> -#include <windows.h> +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# undef WIN32_LEAN_AND_MEAN +#else +# include <windows.h> +#endif #include <odb/details/export.hxx> #include <odb/details/win32/mutex.hxx> diff --git a/odb/details/win32/tls.cxx b/odb/details/win32/tls.cxx index 48c2f00..d6dc2d8 100644 --- a/odb/details/win32/tls.cxx +++ b/odb/details/win32/tls.cxx @@ -3,6 +3,10 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include <windows.h> #include <winerror.h> // ERROR_INVALID_INDEX |