Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Merged r4717:4718 from branches/SDL-1.2: minor OS/2 DECLSPEC/SDLCALL …
Browse files Browse the repository at this point in the history
…fixes.

I reworked this a little. The 1.2 branch isn't really very elegant about this.
  • Loading branch information
icculus committed Jan 6, 2010
1 parent 0c4edc8 commit bf6e10d
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions include/begin_code.h
Expand Up @@ -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")))
Expand All @@ -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 */
Expand Down

0 comments on commit bf6e10d

Please sign in to comment.