diff options
-rw-r--r-- | dyn_load.c | 5 | ||||
-rw-r--r-- | include/private/gc_locks.h | 7 | ||||
-rw-r--r-- | include/private/gc_priv.h | 22 | ||||
-rw-r--r-- | include/private/thread_local_alloc.h | 7 | ||||
-rw-r--r-- | mallocx.c | 8 | ||||
-rw-r--r-- | misc.c | 9 | ||||
-rw-r--r-- | os_dep.c | 10 | ||||
-rw-r--r-- | tests/test.c | 8 | ||||
-rw-r--r-- | tools/setjmp_t.c | 7 | ||||
-rw-r--r-- | win32_threads.c | 6 |
10 files changed, 11 insertions, 78 deletions
@@ -921,11 +921,6 @@ GC_INNER void GC_register_dynamic_libraries(void) # if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE -# include <windows.h> # include <stdlib.h> /* We traverse the entire address space and register all segments */ diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h index 5b9ef4f3..4e2a920d 100644 --- a/include/private/gc_locks.h +++ b/include/private/gc_locks.h @@ -61,13 +61,6 @@ # endif # if defined(GC_WIN32_THREADS) && !defined(USE_PTHREAD_LOCKS) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE - EXTERN_C_END -# include <windows.h> - EXTERN_C_BEGIN # define NO_THREAD (DWORD)(-1) GC_EXTERN CRITICAL_SECTION GC_allocate_ml; # ifdef GC_ASSERTIONS diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 32f80fb6..ea4d2a8a 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -257,6 +257,15 @@ typedef int GC_bool; # endif #endif +#if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +# define NOSERVICE +# include <windows.h> +# include <winbase.h> +#endif + #include "gc_locks.h" #define GC_WORD_MAX (~(word)0) @@ -448,12 +457,6 @@ EXTERN_C_END /* The total time difference could be computed as */ /* MS_TIME_DIFF(a,b)*1000000+NS_FRAC_TIME_DIFF(a,b).*/ #elif defined(MSWIN32) || defined(MSWINCE) || defined(WINXP_USE_PERF_COUNTER) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE -# include <windows.h> -# include <winbase.h> # if defined(MSWINRT_FLAVOR) || defined(WINXP_USE_PERF_COUNTER) # define CLOCK_TYPE ULONGLONG # define GET_TIME(x) \ @@ -1565,13 +1568,6 @@ GC_EXTERN size_t GC_page_size; #endif #if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE - EXTERN_C_END -# include <windows.h> - EXTERN_C_BEGIN GC_EXTERN SYSTEM_INFO GC_sysinfo; GC_INNER GC_bool GC_is_heap_base(void *p); #endif diff --git a/include/private/thread_local_alloc.h b/include/private/thread_local_alloc.h index 1ffa28b0..39983e33 100644 --- a/include/private/thread_local_alloc.h +++ b/include/private/thread_local_alloc.h @@ -133,13 +133,6 @@ typedef struct thread_local_freelists { # define GC_remove_specific_after_fork(key, t) (void)0 typedef void * GC_key_t; #elif defined(USE_WIN32_SPECIFIC) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE - EXTERN_C_END -# include <windows.h> - EXTERN_C_BEGIN # define GC_getspecific TlsGetValue # define GC_setspecific(key, v) !TlsSetValue(key, v) /* We assume 0 == success, msft does the opposite. */ @@ -27,13 +27,7 @@ #include <stdio.h> #include <string.h> -#ifdef MSWINCE -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE -# include <windows.h> -#else +#ifndef MSWINCE # include <errno.h> #endif @@ -27,15 +27,6 @@ # include <sys/syscall.h> #endif -#if defined(MSWIN32) || defined(MSWINCE) \ - || (defined(CYGWIN32) && defined(GC_READ_ENV_FILE)) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE -# include <windows.h> -#endif - #if defined(UNIX_LIKE) || defined(CYGWIN32) || defined(SYMBIAN) \ || (defined(CONSOLE_LOG) && defined(MSWIN32)) # include <fcntl.h> @@ -50,16 +50,6 @@ # undef GC_AMIGA_DEF #endif -#if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE -# include <windows.h> - /* It's not clear this is completely kosher under Cygwin. But it */ - /* allows us to get a working GC_get_stack_base. */ -#endif - #ifdef MACOS # include <Processes.h> #endif diff --git a/tests/test.c b/tests/test.c index 3d861a14..69719362 100644 --- a/tests/test.c +++ b/tests/test.c @@ -65,14 +65,6 @@ #include "private/gc_priv.h" /* For output, locking, */ /* some statistics and gcconfig.h. */ -#if defined(MSWIN32) || defined(MSWINCE) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# define NOSERVICE -# include <windows.h> -#endif /* MSWIN32 || MSWINCE */ - #if defined(GC_PRINT_VERBOSE_STATS) || defined(GCTEST_PRINT_VERBOSE) # define print_stats VERBOSE # define INIT_PRINT_STATS /* empty */ diff --git a/tools/setjmp_t.c b/tools/setjmp_t.c index 302135c6..33f10603 100644 --- a/tools/setjmp_t.c +++ b/tools/setjmp_t.c @@ -45,13 +45,8 @@ 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> +#elif defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32) int getpagesize(void) { SYSTEM_INFO sysinfo; diff --git a/win32_threads.c b/win32_threads.c index 6bb99bb9..a9fe66bd 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -19,12 +19,6 @@ #if defined(GC_WIN32_THREADS) -#ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -#endif -#define NOSERVICE -#include <windows.h> - #ifdef THREAD_LOCAL_ALLOC # include "private/thread_local_alloc.h" #endif /* THREAD_LOCAL_ALLOC */ |