From fe3491419b084c2d41ad9f29274325e6c0043856 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 31 Jan 2012 22:28:18 +0000 Subject: Windows/Visual C++ portability. git-svn-id: http://svn.drobilla.net/zix/trunk@51 df6676b4-ccc9-40e5-b5d6-7c4628a128e3 --- zix/common.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'zix/common.h') diff --git a/zix/common.h b/zix/common.h index c0dffeb..ab7e431 100644 --- a/zix/common.h +++ b/zix/common.h @@ -17,8 +17,6 @@ #ifndef ZIX_COMMON_H #define ZIX_COMMON_H -#include - /** @addtogroup zix @{ @@ -26,7 +24,7 @@ /** @cond */ #ifdef ZIX_SHARED -# ifdef __WIN32__ +# ifdef _WIN32 # define ZIX_LIB_IMPORT __declspec(dllimport) # define ZIX_LIB_EXPORT __declspec(dllexport) # else @@ -43,6 +41,12 @@ #endif /** @endcond */ +#ifdef __cplusplus +extern "C" { +#else +# include +#endif + typedef enum { ZIX_STATUS_SUCCESS, ZIX_STATUS_ERROR, @@ -66,7 +70,12 @@ typedef bool (*ZixEqualFunc)(const void* a, const void* b); */ typedef void (*ZixDestroyFunc)(void* ptr); -/**@} +/** + @} */ +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* ZIX_COMMON_H */ -- cgit v1.2.1