diff include/begin_code.h @ 1190:173c063d4f55

OS/2 port! This was mostly, if not entirely, written by "Doodle" and "Caetano": doodle@scenergy.dfmk.hu daniel@caetano.eng.br --ryan.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 23 Nov 2005 07:29:56 +0000
parents 3652d111416c
children d910939febfa
line wrap: on
line diff
--- a/include/begin_code.h	Wed Nov 23 07:23:48 2005 +0000
+++ b/include/begin_code.h	Wed Nov 23 07:29:56 2005 +0000
@@ -56,8 +56,20 @@
 #   define DECLSPEC	__declspec(dllexport)
 #  endif
 # else
+# ifdef __OS2__
+#  ifdef __WATCOMC__
+#   ifdef BUILD_SDL
+#    define DECLSPEC __declspec(dllexport)
+#   else
 #  define DECLSPEC
 # endif
+#  else
+#   define DECLSPEC
+#  endif
+# else
+#  define DECLSPEC
+# endif
+# endif
 # endif
 #endif
 
@@ -66,8 +78,14 @@
 #if defined(WIN32) && !defined(__GNUC__)
 #define SDLCALL __cdecl
 #else
+#ifdef __OS2__
+/* But on OS/2, we use the _System calling convention */
+/* to be compatible with every compiler */
+#define SDLCALL _System
+#else
 #define SDLCALL
 #endif
+#endif
 #endif /* SDLCALL */
 
 /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */