Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
26 | pmbaty | 1 | /* ACC -- Automatic Compiler Configuration |
2 | |||
3 | Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer |
||
4 | All Rights Reserved. |
||
5 | |||
6 | This software is a copyrighted work licensed under the terms of |
||
7 | the GNU General Public License. Please consult the file "ACC_LICENSE" |
||
8 | for details. |
||
9 | |||
10 | Markus F.X.J. Oberhumer |
||
11 | <markus@oberhumer.com> |
||
12 | http://www.oberhumer.com/ |
||
13 | */ |
||
14 | |||
15 | |||
16 | /* |
||
17 | * Operating System - exactly one of: |
||
18 | * |
||
19 | * ACC_OS_POSIX [default] |
||
20 | * ACC_OS_AMIGAOS |
||
21 | * ACC_OS_BEOS |
||
22 | * ACC_OS_CYGWIN hybrid WIN32 and POSIX |
||
23 | * ACC_OS_DOS16 16-bit DOS (segmented memory model) |
||
24 | * ACC_OS_DOS32 |
||
25 | * ACC_OS_EMX hybrid OS/2, DOS32, WIN32 (with RSX) and POSIX |
||
26 | * ACC_OS_MACCLASSIC Macintosh Classic |
||
27 | * ACC_OS_PALMOS |
||
28 | * ACC_OS_OS2 OS/2 |
||
29 | * ACC_OS_OS216 16-bit OS/2 1.x (segmented memory model) |
||
30 | * ACC_OS_QNX |
||
31 | * ACC_OS_RISCOS |
||
32 | * ACC_OS_TOS Atari TOS / MiNT |
||
33 | * ACC_OS_VMS |
||
34 | * ACC_OS_WIN16 16-bit Windows 3.x (segmented memory model) |
||
35 | * ACC_OS_WIN32 |
||
36 | * ACC_OS_WIN64 64-bit Windows (LLP64 programming model) |
||
37 | */ |
||
38 | |||
39 | |||
40 | #if defined(__CYGWIN__) && defined(__GNUC__) |
||
41 | # define ACC_OS_CYGWIN 1 |
||
42 | # define ACC_INFO_OS "cygwin" |
||
43 | #elif defined(__EMX__) && defined(__GNUC__) |
||
44 | # define ACC_OS_EMX 1 |
||
45 | # define ACC_INFO_OS "emx" |
||
46 | #elif defined(__BEOS__) |
||
47 | # define ACC_OS_BEOS 1 |
||
48 | # define ACC_INFO_OS "beos" |
||
49 | #elif defined(__QNX__) |
||
50 | # define ACC_OS_QNX 1 |
||
51 | # define ACC_INFO_OS "qnx" |
||
52 | #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) |
||
53 | # define ACC_OS_DOS32 1 |
||
54 | # define ACC_INFO_OS "dos32" |
||
55 | #elif defined(__BORLANDC__) && defined(__DPMI16__) |
||
56 | # define ACC_OS_DOS16 1 |
||
57 | # define ACC_INFO_OS "dos16" |
||
58 | #elif defined(__ZTC__) && defined(DOS386) |
||
59 | # define ACC_OS_DOS32 1 |
||
60 | # define ACC_INFO_OS "dos32" |
||
61 | #elif defined(__OS2__) || defined(__OS2V2__) |
||
62 | # if (UINT_MAX == ACC_0xffffL) |
||
63 | # define ACC_OS_OS216 1 |
||
64 | # define ACC_INFO_OS "os216" |
||
65 | # elif (UINT_MAX == ACC_0xffffffffL) |
||
66 | # define ACC_OS_OS2 1 |
||
67 | # define ACC_INFO_OS "os2" |
||
68 | # else |
||
69 | # error "check your limits.h header" |
||
70 | # endif |
||
71 | #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) |
||
72 | # define ACC_OS_WIN64 1 |
||
73 | # define ACC_INFO_OS "win64" |
||
74 | #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) |
||
75 | # define ACC_OS_WIN32 1 |
||
76 | # define ACC_INFO_OS "win32" |
||
77 | #elif defined(__MWERKS__) && defined(__INTEL__) |
||
78 | # define ACC_OS_WIN32 1 |
||
79 | # define ACC_INFO_OS "win32" |
||
80 | #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) |
||
81 | # if (UINT_MAX == ACC_0xffffL) |
||
82 | # define ACC_OS_WIN16 1 |
||
83 | # define ACC_INFO_OS "win16" |
||
84 | # elif (UINT_MAX == ACC_0xffffffffL) |
||
85 | # define ACC_OS_WIN32 1 |
||
86 | # define ACC_INFO_OS "win32" |
||
87 | # else |
||
88 | # error "check your limits.h header" |
||
89 | # endif |
||
90 | #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) |
||
91 | # if (UINT_MAX == ACC_0xffffL) |
||
92 | # define ACC_OS_DOS16 1 |
||
93 | # define ACC_INFO_OS "dos16" |
||
94 | # elif (UINT_MAX == ACC_0xffffffffL) |
||
95 | # define ACC_OS_DOS32 1 |
||
96 | # define ACC_INFO_OS "dos32" |
||
97 | # else |
||
98 | # error "check your limits.h header" |
||
99 | # endif |
||
100 | #elif defined(__WATCOMC__) |
||
101 | # if defined(__NT__) && (UINT_MAX == ACC_0xffffL) |
||
102 | /* wcl: NT host defaults to DOS target */ |
||
103 | # define ACC_OS_DOS16 1 |
||
104 | # define ACC_INFO_OS "dos16" |
||
105 | # elif defined(__NT__) && (__WATCOMC__ < 1100) |
||
106 | /* wcl386: Watcom C 11 defines _WIN32 */ |
||
107 | # define ACC_OS_WIN32 1 |
||
108 | # define ACC_INFO_OS "win32" |
||
109 | # else |
||
110 | # error "please specify a target using the -bt compiler option" |
||
111 | # endif |
||
112 | #elif defined(__palmos__) |
||
113 | # if (UINT_MAX == ACC_0xffffL) |
||
114 | # define ACC_OS_PALMOS 1 |
||
115 | # define ACC_INFO_OS "palmos" |
||
116 | # else |
||
117 | # error "check your limits.h header" |
||
118 | # endif |
||
119 | #elif defined(__TOS__) || defined(__atarist__) |
||
120 | # define ACC_OS_TOS 1 |
||
121 | # define ACC_INFO_OS "tos" |
||
122 | #elif defined(macintosh) && !defined(__ppc__) |
||
123 | # define ACC_OS_MACCLASSIC 1 |
||
124 | # define ACC_INFO_OS "macclassic" |
||
125 | #elif defined(__VMS) |
||
126 | # define ACC_OS_VMS 1 |
||
127 | # define ACC_INFO_OS "vms" |
||
128 | #else |
||
129 | # define ACC_OS_POSIX 1 |
||
130 | # define ACC_INFO_OS "posix" |
||
131 | #endif |
||
132 | |||
133 | |||
134 | #if (ACC_OS_POSIX) |
||
135 | # if defined(_AIX) || defined(__AIX__) || defined(__aix__) |
||
136 | # define ACC_OS_POSIX_AIX 1 |
||
137 | # define ACC_INFO_OS_POSIX "aix" |
||
138 | # elif defined(__FreeBSD__) |
||
139 | # define ACC_OS_POSIX_FREEBSD 1 |
||
140 | # define ACC_INFO_OS_POSIX "freebsd" |
||
141 | # elif defined(__hpux__) || defined(__hpux) |
||
142 | # define ACC_OS_POSIX_HPUX 1 |
||
143 | # define ACC_INFO_OS_POSIX "hpux" |
||
144 | # elif defined(__INTERIX) |
||
145 | # define ACC_OS_POSIX_INTERIX 1 |
||
146 | # define ACC_INFO_OS_POSIX "interix" |
||
147 | # elif defined(__IRIX__) || defined(__irix__) |
||
148 | # define ACC_OS_POSIX_IRIX 1 |
||
149 | # define ACC_INFO_OS_POSIX "irix" |
||
150 | # elif defined(__linux__) || defined(__linux) |
||
151 | # define ACC_OS_POSIX_LINUX 1 |
||
152 | # define ACC_INFO_OS_POSIX "linux" |
||
153 | # elif defined(__APPLE__) || defined(__MACOS__) |
||
154 | # define ACC_OS_POSIX_MACOSX 1 |
||
155 | # define ACC_INFO_OS_POSIX "macosx" |
||
156 | # elif defined(__NetBSD__) |
||
157 | # define ACC_OS_POSIX_NETBSD 1 |
||
158 | # define ACC_INFO_OS_POSIX "netbsd" |
||
159 | # elif defined(__OpenBSD__) |
||
160 | # define ACC_OS_POSIX_OPENBSD 1 |
||
161 | # define ACC_INFO_OS_POSIX "openbsd" |
||
162 | # elif defined(__osf__) |
||
163 | # define ACC_OS_POSIX_OSF 1 |
||
164 | # define ACC_INFO_OS_POSIX "osf" |
||
165 | # elif defined(__solaris__) || defined(__sun) |
||
166 | # if defined(__SVR4) || defined(__svr4__) |
||
167 | # define ACC_OS_POSIX_SOLARIS 1 |
||
168 | # define ACC_INFO_OS_POSIX "solaris" |
||
169 | # else |
||
170 | # define ACC_OS_POSIX_SUNOS 1 |
||
171 | # define ACC_INFO_OS_POSIX "sunos" |
||
172 | # endif |
||
173 | # elif defined(__ultrix__) || defined(__ultrix) |
||
174 | # define ACC_OS_POSIX_ULTRIX 1 |
||
175 | # define ACC_INFO_OS_POSIX "ultrix" |
||
176 | # else |
||
177 | # define ACC_OS_POSIX_UNKNOWN 1 |
||
178 | # define ACC_INFO_OS_POSIX "unknown" |
||
179 | # endif |
||
180 | #endif |
||
181 | |||
182 | |||
183 | #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) |
||
184 | # if (UINT_MAX != ACC_0xffffL) |
||
185 | # error "this should not happen" |
||
186 | # endif |
||
187 | # if (ULONG_MAX != ACC_0xffffffffL) |
||
188 | # error "this should not happen" |
||
189 | # endif |
||
190 | #endif |
||
191 | #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32 || ACC_OS_WIN64) |
||
192 | # if (UINT_MAX != ACC_0xffffffffL) |
||
193 | # error "this should not happen" |
||
194 | # endif |
||
195 | # if (ULONG_MAX != ACC_0xffffffffL) |
||
196 | # error "this should not happen" |
||
197 | # endif |
||
198 | #endif |
||
199 | |||
200 | |||
201 | /* |
||
202 | vi:ts=4:et |
||
203 | */ |