From: Michael Jeanson Date: Thu, 26 Jan 2017 20:09:22 +0000 (-0500) Subject: Port: win32 DLLs don't support hidden symbols X-Git-Tag: v2.9.4~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=25d9f44237780ae59483a889d5d37351df480fe9;p=lttng-tools.git Port: win32 DLLs don't support hidden symbols Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/macros.h b/src/common/macros.h index 8ae6535d0..90849ed30 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -74,7 +74,14 @@ void *zmalloc(size_t len) #define LTTNG_PACKED __attribute__((__packed__)) #endif -#ifndef LTTNG_HIDDEN +/* + * 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