include/begin_code.h
changeset 1190 173c063d4f55
parent 1025 3652d111416c
child 1402 d910939febfa
--- 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 */