X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=internals%2F_PDCLIB_aux.h;h=8ea40f4254ced580769d959e866a307b1f0c8dab;hb=a18343e497615802f47e0f6876b5bed73af674e0;hp=d34dfb57e28aee30eb7755c9c0e97ba7d66b33ca;hpb=b41576197133c1211d6ec353faf93f505f573b8a;p=pdclib 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