Mercurial > sdl-ios-xcode
comparison include/begin_code.h @ 3618:276a6474a449
Merged r4717:4718 from branches/SDL-1.2: minor OS/2 DECLSPEC/SDLCALL fixes.
I reworked this a little. The 1.2 branch isn't really very elegant about this.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 06 Jan 2010 20:58:03 +0000 |
parents | d3baf5ac4e37 |
children | 838fcbc09c68 |
comparison
equal
deleted
inserted
replaced
3617:023aa9699baa | 3618:276a6474a449 |
---|---|
50 # define DECLSPEC __declspec(dllimport) | 50 # define DECLSPEC __declspec(dllimport) |
51 # endif | 51 # endif |
52 # else | 52 # else |
53 # define DECLSPEC __declspec(dllexport) | 53 # define DECLSPEC __declspec(dllexport) |
54 # endif | 54 # endif |
55 # elif defined(__OS2__) | |
56 # ifdef BUILD_SDL | |
57 # define DECLSPEC __declspec(dllexport) | |
58 # else | |
59 # define DECLSPEC | |
60 # endif | |
55 # else | 61 # else |
56 # if defined(__GNUC__) && __GNUC__ >= 4 | 62 # if defined(__GNUC__) && __GNUC__ >= 4 |
57 # define DECLSPEC __attribute__ ((visibility("default"))) | 63 # define DECLSPEC __attribute__ ((visibility("default"))) |
58 # else | 64 # else |
59 # define DECLSPEC | 65 # define DECLSPEC |
61 # endif | 67 # endif |
62 #endif | 68 #endif |
63 | 69 |
64 /* By default SDL uses the C calling convention */ | 70 /* By default SDL uses the C calling convention */ |
65 #ifndef SDLCALL | 71 #ifndef SDLCALL |
66 #if defined(__WIN32__) && !defined(__GNUC__) | 72 # if defined(__WIN32__) && !defined(__GNUC__) |
67 #define SDLCALL __cdecl | 73 # define SDLCALL __cdecl |
68 #else | 74 # elif defined(__OS2__) |
69 #define SDLCALL | 75 /* Use the _System calling convention to be compatible with every OS/2 |
70 #endif | 76 compiler. (Please note that this used to be _cdecl for GCC, but that |
77 was a bug. Someone should go examine and fix the XFree86 integration | |
78 instead. We shouldn't be passing SDLCALL function pointers between SDL | |
79 and XFree86!) */ | |
80 # define SDLCALL _System | |
81 # else | |
82 # define SDLCALL | |
83 # endif | |
71 #endif /* SDLCALL */ | 84 #endif /* SDLCALL */ |
72 | 85 |
73 /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */ | 86 /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */ |
74 #ifdef __SYMBIAN32__ | 87 #ifdef __SYMBIAN32__ |
75 #undef DECLSPEC | 88 #undef DECLSPEC |