2 * This should never be included directly. It is included only from gc.h.
3 * We separate it only to make gc.h more suitable as documentation.
5 * Some tests for old macros. These violate our namespace rules and will
6 * disappear shortly. Use the GC_ names.
8 #if defined(SOLARIS_THREADS) || defined(_SOLARIS_THREADS)
9 # define GC_SOLARIS_THREADS
11 #if defined(_SOLARIS_PTHREADS)
12 # define GC_SOLARIS_PTHREADS
14 #if defined(IRIX_THREADS)
15 # define GC_IRIX_THREADS
17 #if defined(DGUX_THREADS)
18 # if !defined(GC_DGUX386_THREADS)
19 # define GC_DGUX386_THREADS
22 #if defined(AIX_THREADS)
23 # define GC_AIX_THREADS
25 #if defined(HPUX_THREADS)
26 # define GC_HPUX_THREADS
28 #if defined(OSF1_THREADS)
29 # define GC_OSF1_THREADS
31 #if defined(LINUX_THREADS)
32 # define GC_LINUX_THREADS
34 #if defined(WIN32_THREADS)
35 # define GC_WIN32_THREADS 1
37 #if defined(USE_LD_WRAP)
38 # define GC_USE_LD_WRAP
41 #if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \
42 || defined(GC_SOLARIS_PTHREADS) \
43 || defined(GC_HPUX_THREADS) \
44 || defined(GC_AIX_THREADS) \
45 || defined(GC_LINUX_THREADS))
47 /* Better late than never. This fails if system headers that */
48 /* depend on this were previously included. */
51 #if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
52 # define _POSIX4A_DRAFT10_SOURCE 1
55 # if defined(GC_SOLARIS_PTHREADS) || defined(GC_FREEBSD_THREADS) || \
56 defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
57 defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
58 defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
59 defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
60 defined(GC_OPENBSD_THREADS) || \
61 (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
65 #if defined(GC_THREADS) && !defined(GC_PTHREADS)
66 # if defined(__linux__)
67 # define GC_LINUX_THREADS
70 # if !defined(LINUX) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
71 || defined(hppa) || defined(__HPPA))
72 # define GC_HPUX_THREADS
75 # if !defined(__linux__) && (defined(__alpha) || defined(__alpha__))
76 # define GC_OSF1_THREADS
79 # if defined(__mips) && !defined(__linux__)
80 # define GC_IRIX_THREADS
83 # if defined(__sparc) && !defined(__linux__)
84 # define GC_SOLARIS_PTHREADS
87 # if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
88 # define GC_DARWIN_THREADS
91 # if !defined(GC_PTHREADS) && defined(__OpenBSD__)
92 # define GC_OPENBSD_THREADS
95 # if !defined(GC_PTHREADS) && defined(__FreeBSD__)
96 # define GC_FREEBSD_THREADS
99 # if defined(DGUX) && (defined(i386) || defined(__i386__))
100 # define GC_DGUX386_THREADS
104 # define GC_AIX_THREADS
107 #endif /* GC_THREADS */
109 #if defined(GC_THREADS) && !defined(GC_PTHREADS) && \
110 (defined(_WIN32) || defined(_MSC_VER) || defined(__CYGWIN__) \
111 || defined(__MINGW32__) || defined(__BORLANDC__) \
112 || defined(_WIN32_WCE))
113 # define GC_WIN32_THREADS
116 #if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS)
117 # define GC_SOLARIS_THREADS
123 # else /* ! _WIN32_WCE */
124 /* Yet more kluges for WinCE */
125 # include <stdlib.h> /* size_t is defined here */
126 typedef long ptrdiff_t; /* ptrdiff_t is not defined */
129 #if defined(_DLL) && !defined(GC_NOT_DLL) && !defined(GC_DLL)
133 #if defined(__MINGW32__) && defined(GC_DLL)
135 # define GC_API __declspec(dllexport)
137 # define GC_API __declspec(dllimport)
141 #if (defined(__DMC__) || defined(_MSC_VER)) && defined(GC_DLL)
143 # define GC_API extern __declspec(dllexport)
145 # define GC_API __declspec(dllimport)
149 #if defined(__WATCOMC__) && defined(GC_DLL)
151 # define GC_API extern __declspec(dllexport)
153 # define GC_API extern __declspec(dllimport)
158 #define GC_API extern