From bdb356fd270bd80223837bce6de5cdc3b67565ea Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 9 Sep 2010 09:43:37 +0200 Subject: Include lean windows.h --- odb/details/win32/condition.cxx | 4 ++++ odb/details/win32/condition.hxx | 8 +++++++- odb/details/win32/dll.cxx | 4 ++++ odb/details/win32/exceptions.hxx | 8 +++++++- odb/details/win32/lock.hxx | 8 +++++++- odb/details/win32/mutex.hxx | 8 +++++++- odb/details/win32/once.cxx | 4 ++++ odb/details/win32/once.hxx | 8 +++++++- odb/details/win32/thread.cxx | 4 ++++ odb/details/win32/thread.hxx | 8 +++++++- odb/details/win32/tls.cxx | 4 ++++ 11 files changed, 62 insertions(+), 6 deletions(-) (limited to 'odb/details') 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 #include 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 -#include +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +#else +# include +#endif #include // 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 #include 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 -#include +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +#else +# include +#endif #include #include 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 -#include +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +#else +# include +#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 -#include +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +#else +# include +#endif #include 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 #include 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 -#include +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +#else +# include +#endif #include 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 #include // _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 -#include +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +#else +# include +#endif #include #include 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 #include // ERROR_INVALID_INDEX -- cgit v1.1