aboutsummaryrefslogtreecommitdiffstats
path: root/code/SDL12/include/begin_code.h
diff options
context:
space:
mode:
Diffstat (limited to 'code/SDL12/include/begin_code.h')
-rw-r--r--code/SDL12/include/begin_code.h41
1 files changed, 27 insertions, 14 deletions
diff --git a/code/SDL12/include/begin_code.h b/code/SDL12/include/begin_code.h
index 925d379..4027933 100644
--- a/code/SDL12/include/begin_code.h
+++ b/code/SDL12/include/begin_code.h
@@ -31,43 +31,56 @@
#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__
+# if defined(__BEOS__)
# if defined(__GNUC__)
# define DECLSPEC __declspec(dllexport)
# else
# define DECLSPEC __declspec(export)
# endif
-# else
-# ifdef WIN32
+# elif defined(__WIN32__)
# ifdef __BORLANDC__
# ifdef BUILD_SDL
# define DECLSPEC
# else
-# define DECLSPEC __declspec(dllimport)
+# define DECLSPEC __declspec(dllimport)
# endif
# else
# define DECLSPEC __declspec(dllexport)
# endif
+# elif defined(__OS2__)
+# ifdef __WATCOMC__
+# ifdef BUILD_SDL
+# define DECLSPEC __declspec(dllexport)
+# else
+# define DECLSPEC
+# endif
+# else
+# define DECLSPEC
+# endif
# else
-# define DECLSPEC
-# endif
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define DECLSPEC __attribute__ ((visibility("default")))
+# else
+# define DECLSPEC
+# endif
# endif
#endif
/* By default SDL uses the C calling convention */
#ifndef SDLCALL
-#if defined(WIN32) && !defined(__GNUC__)
+#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 */
@@ -89,7 +102,7 @@
#pragma nopackwarning
#endif
#pragma pack(push,4)
-#elif (defined(__MWERKS__) && defined(macintosh))
+#elif (defined(__MWERKS__) && defined(__MACOS__))
#pragma options align=mac68k4byte
#pragma enumsalwaysint on
#endif /* Compiler needs structure packing set */
@@ -134,4 +147,4 @@
#define NULL ((void *)0)
#endif
#endif /* NULL */
-#endif /* ! MacOS X - breaks precompiled headers */
+#endif /* ! Mac OS X - breaks precompiled headers */