X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Fhelper.h;h=a187b0e7327b2af0f3d39f1160182ad514317303;hb=94be38e8fd2d71397f79c0a368ba95678052e32d;hp=9873feadd85b020556c1cd1e4f45925094b1fdd1;hpb=171fcc6fd03e3f5787b3d0ee8aedc8cb9bcc6f17;p=lttng-ust.git diff --git a/include/helper.h b/include/helper.h index 9873fead..a187b0e7 100644 --- a/include/helper.h +++ b/include/helper.h @@ -55,4 +55,15 @@ void *zmalloc(size_t len) #define LTTNG_UST_CALLER_IP() __builtin_return_address(0) #endif /* #else #if defined(__PPC__) && !defined(__PPC64__) */ +/* + * LTTNG_HIDDEN: set the hidden attribute for internal functions + * On Windows, symbols are local unless explicitly exported, + * see https://gcc.gnu.org/wiki/Visibility + */ +#if defined(_WIN32) || defined(__CYGWIN__) +#define LTTNG_HIDDEN +#else +#define LTTNG_HIDDEN __attribute__((visibility("hidden"))) +#endif + #endif /* _LTTNG_UST_HELPER_H */