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.10.0-rc1~56 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=70c6956ba2dcd36f4e44158a0b27621eda336a6a;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