]> git.ipfire.org Git - thirdparty/gcc.git/blame - boehm-gc/include/gc_config_macros.h
re PR target/78594 (Bug in November 11th, 2016 change to rs6000.md)
[thirdparty/gcc.git] / boehm-gc / include / gc_config_macros.h
CommitLineData
6991c6c9
JS
1/*
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.
6991c6c9 4 */
6991c6c9
JS
5#if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \
6 || defined(GC_SOLARIS_PTHREADS) \
7 || defined(GC_HPUX_THREADS) \
8 || defined(GC_AIX_THREADS) \
b260c71f
ST
9 || defined(GC_LINUX_THREADS) \
10 || defined(GC_GNU_THREADS))
6991c6c9
JS
11# define _REENTRANT
12 /* Better late than never. This fails if system headers that */
13 /* depend on this were previously included. */
14#endif
15
16#if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
17# define _POSIX4A_DRAFT10_SOURCE 1
18#endif
19
20# if defined(GC_SOLARIS_PTHREADS) || defined(GC_FREEBSD_THREADS) || \
21 defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
b260c71f 22 defined(GC_GNU_THREADS) || \
6991c6c9
JS
23 defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
24 defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
25 defined(GC_AIX_THREADS) || \
54fde020 26 (defined(GC_WIN32_THREADS) && defined(__CYGWIN__))
6991c6c9
JS
27# define GC_PTHREADS
28# endif
29
30#if defined(GC_THREADS) && !defined(GC_PTHREADS)
31# if defined(__linux__)
32# define GC_LINUX_THREADS
33# define GC_PTHREADS
34# endif
35# if !defined(LINUX) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
36 || defined(hppa) || defined(__HPPA))
37# define GC_HPUX_THREADS
38# define GC_PTHREADS
39# endif
40# if !defined(__linux__) && (defined(__alpha) || defined(__alpha__))
41# define GC_OSF1_THREADS
42# define GC_PTHREADS
43# endif
44# if defined(__mips) && !defined(__linux__)
45# define GC_IRIX_THREADS
46# define GC_PTHREADS
47# endif
48# if defined(__sparc) && !defined(__linux__)
49# define GC_SOLARIS_PTHREADS
50# define GC_PTHREADS
51# endif
52# if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
53# define GC_DARWIN_THREADS
54# define GC_PTHREADS
55# endif
56# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
57# define GC_FREEBSD_THREADS
58# define GC_PTHREADS
59# endif
60# if defined(DGUX) && (defined(i386) || defined(__i386__))
61# define GC_DGUX386_THREADS
62# define GC_PTHREADS
63# endif
54f28c21
BM
64# if defined(_AIX)
65# define GC_AIX_THREADS
66# define GC_PTHREADS
67# endif
6991c6c9
JS
68#endif /* GC_THREADS */
69
aa7a966b
BM
70#if defined(GC_THREADS) && !defined(GC_PTHREADS) && \
71 (defined(_WIN32) || defined(_MSC_VER) || defined(__CYGWIN__) \
72 || defined(__MINGW32__) || defined(__BORLANDC__) \
73 || defined(_WIN32_WCE))
6991c6c9
JS
74# define GC_WIN32_THREADS
75#endif
76
6991c6c9 77# define __GC
aa7a966b
BM
78# ifndef _WIN32_WCE
79# include <stddef.h>
80# else /* ! _WIN32_WCE */
6991c6c9
JS
81/* Yet more kluges for WinCE */
82# include <stdlib.h> /* size_t is defined here */
83 typedef long ptrdiff_t; /* ptrdiff_t is not defined */
84# endif
85
19f326e8
KT
86#if ((defined(_DLL) && !defined (__MINGW32__)) \
87 || (defined (DLL_EXPORT) && defined (GC_BUILD))) \
88 && !defined(GC_DLL)
6991c6c9
JS
89# define GC_DLL
90#endif
91
92#if defined(__MINGW32__) && defined(GC_DLL)
93# ifdef GC_BUILD
94# define GC_API __declspec(dllexport)
95# else
96# define GC_API __declspec(dllimport)
97# endif
98#endif
99
100#if (defined(__DMC__) || defined(_MSC_VER)) && defined(GC_DLL)
101# ifdef GC_BUILD
102# define GC_API extern __declspec(dllexport)
103# else
104# define GC_API __declspec(dllimport)
105# endif
106#endif
107
108#if defined(__WATCOMC__) && defined(GC_DLL)
109# ifdef GC_BUILD
110# define GC_API extern __declspec(dllexport)
111# else
112# define GC_API extern __declspec(dllimport)
113# endif
114#endif
115
116#ifndef GC_API
117#define GC_API extern
118#endif
119