From 611599ad979eee1364519fc9c3fb6103fd9fa9c6 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Thu, 25 Oct 2018 18:38:22 +0200 Subject: Fix DLL exports --- src/deep.h | 1 + src/lanes.h | 1 + src/platform.h | 24 ++++++++++++++++++++++++ src/threading.h | 22 ++-------------------- 4 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 src/platform.h (limited to 'src') diff --git a/src/deep.h b/src/deep.h index 54b0c32..aeeb828 100644 --- a/src/deep.h +++ b/src/deep.h @@ -7,6 +7,7 @@ */ #include "lua.h" +#include "platform.h" // forwards struct s_Universe; diff --git a/src/lanes.h b/src/lanes.h index d07750a..23fa711 100644 --- a/src/lanes.h +++ b/src/lanes.h @@ -2,6 +2,7 @@ #define __lanes_h__ 1 #include "lua.h" +#include "platform.h" #if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) #define LANES_API __declspec(dllexport) diff --git a/src/platform.h b/src/platform.h new file mode 100644 index 0000000..da5264e --- /dev/null +++ b/src/platform.h @@ -0,0 +1,24 @@ +#ifndef __LANES_PLATFORM_H__ +#define __LANES_PLATFORM_H__ 1 + +#ifdef _WIN32_WCE + #define PLATFORM_POCKETPC +#elif defined(_XBOX) + #define PLATFORM_XBOX +#elif (defined _WIN32) + #define PLATFORM_WIN32 +#elif (defined __linux__) + #define PLATFORM_LINUX +#elif (defined __APPLE__) && (defined __MACH__) + #define PLATFORM_OSX +#elif (defined __NetBSD__) || (defined __FreeBSD__) || (defined BSD) + #define PLATFORM_BSD +#elif (defined __QNX__) + #define PLATFORM_QNX +#elif (defined __CYGWIN__) + #define PLATFORM_CYGWIN +#else + #error "Unknown platform!" +#endif + +#endif // __LANES_PLATFORM_H__ diff --git a/src/threading.h b/src/threading.h index bfa9ab8..4114dba 100644 --- a/src/threading.h +++ b/src/threading.h @@ -4,30 +4,12 @@ #ifndef __threading_h__ #define __threading_h__ 1 -/* Platform detection +/* * win32-pthread: * define HAVE_WIN32_PTHREAD and PTW32_INCLUDE_WINDOWS_H in your project configuration when building for win32-pthread. * link against pthreadVC2.lib, and of course have pthreadVC2.dll somewhere in your path. */ -#ifdef _WIN32_WCE - #define PLATFORM_POCKETPC -#elif defined(_XBOX) - #define PLATFORM_XBOX -#elif (defined _WIN32) - #define PLATFORM_WIN32 -#elif (defined __linux__) - #define PLATFORM_LINUX -#elif (defined __APPLE__) && (defined __MACH__) - #define PLATFORM_OSX -#elif (defined __NetBSD__) || (defined __FreeBSD__) || (defined BSD) - #define PLATFORM_BSD -#elif (defined __QNX__) - #define PLATFORM_QNX -#elif (defined __CYGWIN__) - #define PLATFORM_CYGWIN -#else - #error "Unknown platform!" -#endif +#include "platform.h" typedef int bool_t; #ifndef FALSE -- cgit v1.2.3-55-g6feb