summaryrefslogtreecommitdiff
path: root/cord
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-06-20 10:10:17 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-06-20 10:10:17 +0300
commit0d41e2f1e09014b9c0bb3f4cf68732e09558f0eb (patch)
treecfea60f47fa76c14b0f218a190b6278544a2b98b /cord
parentab8086362d46b86987b65a59583e8ab37c7f4a30 (diff)
downloadbdwgc-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 'cord')
-rw-r--r--cord/tests/de.c4
-rw-r--r--cord/tests/de_win.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/cord/tests/de.c b/cord/tests/de.c
index c543cce4..adfd0e38 100644
--- a/cord/tests/de.c
+++ b/cord/tests/de.c
@@ -44,6 +44,10 @@
#endif
#if defined(WIN32)
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN 1
+# endif
+# define NOSERVICE
# include <windows.h>
# include "de_win.h"
#elif defined(MACINTOSH)
diff --git a/cord/tests/de_win.c b/cord/tests/de_win.c
index 4a43801d..62cff652 100644
--- a/cord/tests/de_win.c
+++ b/cord/tests/de_win.c
@@ -19,7 +19,12 @@
* This was written by a nonexpert windows programmer.
*/
-#include "windows.h"
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN 1
+#endif
+#define NOSERVICE
+#include <windows.h>
+
#include "gc.h"
#include "cord.h"
#include "de_cmds.h"