# 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 */
# 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
# 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)
/* 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) \
#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
# 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. */
#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
# 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>
# 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
#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 */
}
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;
#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 */