include/begin_code.h
branchSDL-1.2
changeset 4193 430e6690c4cd
parent 4164 7a4c511c980a
child 4217 4c4113c2162c
     1.1 --- a/include/begin_code.h	Sun Sep 13 22:19:56 2009 +0000
     1.2 +++ b/include/begin_code.h	Mon Sep 14 00:08:12 2009 +0000
     1.3 @@ -56,6 +56,15 @@
     1.4  #   else
     1.5  #    define DECLSPEC
     1.6  #   endif
     1.7 +#  elif defined (__GNUC__) && __GNUC__ < 4
     1.8 +#   /* Added support for GCC-EMX <v4.x */
     1.9 +#   /* this is needed for XFree86/OS2 developement */
    1.10 +#   /* F. Ambacher(anakor@snafu.de) 05.2008 */
    1.11 +#   ifdef BUILD_SDL
    1.12 +#    define DECLSPEC    __declspec(dllexport)
    1.13 +#   else
    1.14 +#    define DECLSPEC
    1.15 +#   endif
    1.16  #  else
    1.17  #   define DECLSPEC
    1.18  #  endif
    1.19 @@ -70,17 +79,22 @@
    1.20  
    1.21  /* By default SDL uses the C calling convention */
    1.22  #ifndef SDLCALL
    1.23 -#if defined(__WIN32__) && !defined(__GNUC__)
    1.24 -#define SDLCALL __cdecl
    1.25 -#else
    1.26 -#ifdef __OS2__
    1.27 -/* But on OS/2, we use the _System calling convention */
    1.28 -/* to be compatible with every compiler */
    1.29 -#define SDLCALL _System
    1.30 -#else
    1.31 -#define SDLCALL
    1.32 -#endif
    1.33 -#endif
    1.34 +# if defined(__WIN32__) && !defined(__GNUC__)
    1.35 +#  define SDLCALL __cdecl
    1.36 +# elif defined(__OS2__)
    1.37 +#  if defined (__GNUC__) && __GNUC__ < 4
    1.38 +#   /* Added support for GCC-EMX <v4.x */
    1.39 +#   /* this is needed for XFree86/OS2 developement */
    1.40 +#   /* F. Ambacher(anakor@snafu.de) 05.2008 */
    1.41 +#   define SDLCALL _cdecl
    1.42 +#  else
    1.43 +#   /* On other compilers on OS/2, we use the _System calling convention */
    1.44 +#   /* to be compatible with every compiler */
    1.45 +#   define SDLCALL _System
    1.46 +#  endif
    1.47 +# else
    1.48 +#  define SDLCALL
    1.49 +# endif
    1.50  #endif /* SDLCALL */
    1.51  
    1.52  #ifdef __SYMBIAN32__