diff include/begin_code.h @ 337:9154ec9ca3d2

Explicitly specify the SDL API calling convention (C by default)
author Sam Lantinga <slouken@libsdl.org>
date Thu, 11 Apr 2002 14:35:16 +0000
parents f6ffac90895c
children a18ea34d9efe
line wrap: on
line diff
--- a/include/begin_code.h	Wed Apr 10 17:12:32 2002 +0000
+++ b/include/begin_code.h	Thu Apr 11 14:35:16 2002 +0000
@@ -31,6 +31,11 @@
 #endif
 #define _begin_code_h
 
+/* Make sure the correct platform symbols are defined */
+#if !defined(WIN32) && defined(_WIN32)
+#define WIN32
+#endif /* Windows */
+
 /* Some compilers use a special export keyword */
 #ifndef DECLSPEC
 # ifdef __BEOS__
@@ -56,6 +61,15 @@
 # endif
 #endif
 
+/* By default SDL uses the C calling convention */
+#ifndef SDLCALL
+#ifdef WIN32
+#define SDLCALL __cdecl
+#else
+#define SDLCALL
+#endif
+#endif /* SDLCALL */
+
 /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
 #ifdef __SYMBIAN32__ 
 #undef DECLSPEC