diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-06-20 10:10:17 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-06-20 10:10:17 +0300 |
commit | 0d41e2f1e09014b9c0bb3f4cf68732e09558f0eb (patch) | |
tree | cfea60f47fa76c14b0f218a190b6278544a2b98b /tools | |
parent | ab8086362d46b86987b65a59583e8ab37c7f4a30 (diff) | |
download | bdwgc-0d41e2f1e09014b9c0bb3f4cf68732e09558f0eb.tar.gz |
Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
(code refactoring)
Note: these macros are not (and should not be) defined in the public
headers (gc.h).
* cord/tests/de.c [WIN32] (WIN32_LEAN_AND_MEAN, NOSERVICE): Define
macro before include windows.h.
* cord/tests/de_win.c (WIN32_LEAN_AND_MEAN, NOSERVICE): Likewise.
* extra/msvc_dbg.c (WIN32_LEAN_AND_MEAN, NOSERVICE): Likewise.
* tests/initsecondarythread.c [!GC_PTHREADS] (WIN32_LEAN_AND_MEAN,
NOSERVICE): Likewise.
* tests/subthread_create.c [!GC_PTHREADS] (WIN32_LEAN_AND_MEAN,
NOSERVICE): Likewise.
* tests/test.c [MSWIN32 || MSWINCE] (WIN32_LEAN_AND_MEAN,
NOSERVICE): Likewise.
* tests/test_cpp.cc [MSWIN32] (WIN32_LEAN_AND_MEAN, NOSERVICE):
Likewise.
* tests/thread_leak_test.c [!GC_PTHREADS] (WIN32_LEAN_AND_MEAN,
NOSERVICE): Likewise.
* tools/setjmp_t.c [MSWIN32 || MSWINCE || CYGWIN32]
(WIN32_LEAN_AND_MEAN, NOSERVICE): Likewise.
* cord/tests/de_win.c: Replace include "windows.h" to
include <windows.h>.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/setjmp_t.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/setjmp_t.c b/tools/setjmp_t.c index bef71f21..302135c6 100644 --- a/tools/setjmp_t.c +++ b/tools/setjmp_t.c @@ -46,7 +46,12 @@ int getpagesize(void) return((int)(result[0])); } #elif defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +# define NOSERVICE # include <windows.h> + int getpagesize(void) { SYSTEM_INFO sysinfo; |