comparison include/SDL_platform.h @ 1402:d910939febfa

Use consistent identifiers for the various platforms we support. Make sure every source file includes SDL_config.h, so the proper system headers are chosen.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Feb 2006 08:46:50 +0000
parents
children 39ca9a4b22f3
comparison
equal deleted inserted replaced
1401:1819fd069e89 1402:d910939febfa
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2006 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22
23 /* Try to get a standard set of platform defines */
24
25 #if defined(_AIX)
26 #undef __AIX__
27 #define __AIX__ 1
28 #endif
29 #if defined(AMIGA) || defined(__AMIGA) || defined(__amigados__)
30 /* FIXME: is this the right test for AmigaOS? */
31 #undef __AMIGA__
32 #define __AMIGA__ 1
33 #endif
34 #if defined(__BEOS__)
35 #undef __BEOS__
36 #define __BEOS__ 1
37 #endif
38 #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
39 #undef __BSDI__
40 #define __BSDI__ 1
41 #endif
42 #if defined(DREAMCAST)
43 /* FIXME: is this the right test for Dreamcast? */
44 #undef __DREAMCAST__
45 #define __DREAMCAST__ 1
46 #endif
47 #if defined(__FreeBSD__)
48 #undef __FREEBSD__
49 #define __FREEBSD__ 1
50 #endif
51 #if defined(hpux) || defined(__hpux) || defined(__hpux__)
52 #undef __HPUX__
53 #define __HPUX__ 1
54 #endif
55 #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
56 #undef __IRIX__
57 #define __IRIX__ 1
58 #endif
59 #if defined(linux) || defined(__linux) || defined(__linux__)
60 #undef __LINUX__
61 #define __LINUX__ 1
62 #endif
63 #if defined(macintosh)
64 #undef __MACOS__
65 #define __MACOS__ 1
66 #endif
67 #if defined(__GNUC__) && (defined(__APPLE_CC__) || defined(__APPLE_CPP__))
68 #undef __MACOSX__
69 #define __MACOSX__ 1
70 #define TARGET_API_MAC_CARBON 1
71 #endif
72 #if defined(__NetBSD__)
73 #undef __NETBSD__
74 #define __NETBSD__ 1
75 #endif
76 #if defined(__OpenBSD__)
77 #undef __OPENBSD__
78 #define __OPENBSD__ 1
79 #endif
80 #if defined(__OS2__)
81 #undef __OS2__
82 #define __OS2__ 1
83 #endif
84 #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
85 #undef __OSF__
86 #define __OSF__ 1
87 #endif
88 #if defined(__QNXNTO__)
89 #undef __QNXNTO__
90 #define __QNXNTO__ 1
91 #endif
92 #if defined(riscos) || defined(__riscos) || defined(__riscos__)
93 #undef __RISCOS__
94 #define __RISCOS__ 1
95 #endif
96 #if defined(solaris) || defined(__solaris) || defined(__solaris__)
97 /* FIXME: is this the right test for Solaris? Check SDL_sunaudio.c */
98 #undef __SOLARIS__
99 #define __SOLARIS__ 1
100 #endif
101 #if defined(WIN32) || defined(_WIN32)
102 #undef __WIN32__
103 #define __WIN32__ 1
104 #endif