# HG changeset patch # User Ryan C. Gordon # Date 1262811483 0 # Node ID 276a6474a449c3eb87856f2667d492491665a4b8 # Parent 023aa9699baa0e9a37212c176fdb8817840af676 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. diff -r 023aa9699baa -r 276a6474a449 include/begin_code.h --- a/include/begin_code.h Wed Jan 06 20:31:21 2010 +0000 +++ b/include/begin_code.h Wed Jan 06 20:58:03 2010 +0000 @@ -52,6 +52,12 @@ # else # define DECLSPEC __declspec(dllexport) # endif +# elif defined(__OS2__) +# ifdef BUILD_SDL +# define DECLSPEC __declspec(dllexport) +# else +# define DECLSPEC +# endif # else # if defined(__GNUC__) && __GNUC__ >= 4 # define DECLSPEC __attribute__ ((visibility("default"))) @@ -63,11 +69,18 @@ /* By default SDL uses the C calling convention */ #ifndef SDLCALL -#if defined(__WIN32__) && !defined(__GNUC__) -#define SDLCALL __cdecl -#else -#define SDLCALL -#endif +# if defined(__WIN32__) && !defined(__GNUC__) +# define SDLCALL __cdecl +# elif defined(__OS2__) + /* Use the _System calling convention to be compatible with every OS/2 + compiler. (Please note that this used to be _cdecl for GCC, but that + was a bug. Someone should go examine and fix the XFree86 integration + instead. We shouldn't be passing SDLCALL function pointers between SDL + and XFree86!) */ +# define SDLCALL _System +# else +# define SDLCALL +# endif #endif /* SDLCALL */ /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */