X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=internals%2F_PDCLIB_aux.h;h=8ea40f4254ced580769d959e866a307b1f0c8dab;hp=d34dfb57e28aee30eb7755c9c0e97ba7d66b33ca;hb=7015f5842d05bd5da32523048e4260e60e9e310c;hpb=2546ca02850b8d684a694dc7373887f7aec994dc diff --git a/internals/_PDCLIB_aux.h b/internals/_PDCLIB_aux.h index d34dfb5..8ea40f4 100644 --- a/internals/_PDCLIB_aux.h +++ b/internals/_PDCLIB_aux.h @@ -63,7 +63,24 @@ #define _PDCLIB_noreturn _Noreturn #endif +#ifdef _WIN32 + #define _PDCLIB_EXPORT __declspec(dllexport) + #define _PDCLIB_IMPORT __declspec(dllimport) +#endif + #ifdef __GNUC__ + #ifndef _PDCLIB_EXPORT + #define _PDCLIB_EXPORT __attribute__((__visibility__("protected"))) + #endif + + #ifndef _PDCLIB_IMPORT + #define _PDCLIB_IMPORT + #endif + + #ifndef _PDCLIB_HIDDEN + #define _PDCLIB_HIDDEN __attribute__((__visibility__("hidden"))) + #endif + #ifndef _PDCLIB_restrict #define _PDCLIB_restrict __restrict #endif @@ -77,6 +94,26 @@ #endif #endif +#ifndef _PDCLIB_EXPORT + #define _PDCLIB_EXPORT +#endif +#ifndef _PDCLIB_IMPORT + #define _PDCLIB_IMPORT +#endif +#ifndef _PDCLIB_HIDDEN + #define _PDCLIB_HIDDEN +#endif + +#if defined(_PDCLIB_SHARED) + #if defined(_PDCLIB_BUILD) + #define _PDCLIB_API _PDCLIB_EXPORT + #else + #define _PDCLIB_API _PDCLIB_IMPORT + #endif +#else + #define _PDCLIB_API _PDCLIB_HIDDEN +#endif + #ifndef _PDCLIB_restrict #define _PDCLIB_restrict #endif