Mercurial > sdl-ios-xcode
comparison include/begin_code.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 | 173c063d4f55 |
children | 2422ca15ba42 |
comparison
equal
deleted
inserted
replaced
1401:1819fd069e89 | 1402:d910939febfa |
---|---|
29 #ifdef _begin_code_h | 29 #ifdef _begin_code_h |
30 #error Nested inclusion of begin_code.h | 30 #error Nested inclusion of begin_code.h |
31 #endif | 31 #endif |
32 #define _begin_code_h | 32 #define _begin_code_h |
33 | 33 |
34 /* Make sure the correct platform symbols are defined */ | |
35 #if !defined(WIN32) && defined(_WIN32) | |
36 #define WIN32 | |
37 #endif /* Windows */ | |
38 | |
39 /* Some compilers use a special export keyword */ | 34 /* Some compilers use a special export keyword */ |
40 #ifndef DECLSPEC | 35 #ifndef DECLSPEC |
41 # ifdef __BEOS__ | 36 # ifdef __BEOS__ |
42 # if defined(__GNUC__) | 37 # if defined(__GNUC__) |
43 # define DECLSPEC __declspec(dllexport) | 38 # define DECLSPEC __declspec(dllexport) |
44 # else | 39 # else |
45 # define DECLSPEC __declspec(export) | 40 # define DECLSPEC __declspec(export) |
46 # endif | 41 # endif |
47 # else | 42 # else |
48 # ifdef WIN32 | 43 # ifdef __WIN32__ |
49 # ifdef __BORLANDC__ | 44 # ifdef __BORLANDC__ |
50 # ifdef BUILD_SDL | 45 # ifdef BUILD_SDL |
51 # define DECLSPEC | 46 # define DECLSPEC |
52 # else | 47 # else |
53 # define DECLSPEC __declspec(dllimport) | 48 # define DECLSPEC __declspec(dllimport) |
73 # endif | 68 # endif |
74 #endif | 69 #endif |
75 | 70 |
76 /* By default SDL uses the C calling convention */ | 71 /* By default SDL uses the C calling convention */ |
77 #ifndef SDLCALL | 72 #ifndef SDLCALL |
78 #if defined(WIN32) && !defined(__GNUC__) | 73 #if defined(__WIN32__) && !defined(__GNUC__) |
79 #define SDLCALL __cdecl | 74 #define SDLCALL __cdecl |
80 #else | 75 #else |
81 #ifdef __OS2__ | 76 #ifdef __OS2__ |
82 /* But on OS/2, we use the _System calling convention */ | 77 /* But on OS/2, we use the _System calling convention */ |
83 /* to be compatible with every compiler */ | 78 /* to be compatible with every compiler */ |
105 #endif | 100 #endif |
106 #ifdef __BORLANDC__ | 101 #ifdef __BORLANDC__ |
107 #pragma nopackwarning | 102 #pragma nopackwarning |
108 #endif | 103 #endif |
109 #pragma pack(push,4) | 104 #pragma pack(push,4) |
110 #elif (defined(__MWERKS__) && defined(macintosh)) | 105 #elif (defined(__MWERKS__) && defined(__MACOS__)) |
111 #pragma options align=mac68k4byte | 106 #pragma options align=mac68k4byte |
112 #pragma enumsalwaysint on | 107 #pragma enumsalwaysint on |
113 #endif /* Compiler needs structure packing set */ | 108 #endif /* Compiler needs structure packing set */ |
114 | 109 |
115 /* Set up compiler-specific options for inlining functions */ | 110 /* Set up compiler-specific options for inlining functions */ |