From d85874c64c451ce10730e12ae6523cb517215470 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 4 Jul 2013 00:39:54 +0000 Subject: Add more comments indicating what this is doing. svn path=/trunk/; revision=50379 --- ws_symbol_export.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'ws_symbol_export.h') diff --git a/ws_symbol_export.h b/ws_symbol_export.h index 5654ad1243..562dccf0b9 100644 --- a/ws_symbol_export.h +++ b/ws_symbol_export.h @@ -83,15 +83,24 @@ #define WS_DLL_PUBLIC_DEF __attribute__ ((dllimport)) #elif ! (defined ENABLE_STATIC) /* ! __GNUC__ */ /* - * Presumably MSVC. + * Presumably MSVC, and we're not building all-static. * Note: actually gcc seems to also support this syntax. */ #define WS_DLL_PUBLIC_DEF __declspec(dllimport) #else /* ! __GNUC__ && ENABLE_STATIC */ - /* presumably MSVC */ + /* + * Presumably MSVC, and we're building all-static, so we're + * not building any DLLs. + */ #define WS_DLL_PUBLIC_DEF #endif /* __GNUC__ */ #endif /* WS_BUILD_DLL */ + + /* + * Symbols in a DLL are *not* exported unless they're specifically + * flagged as exported, so, for a non-static but non-exported + * symbol, we don't have to do anything. + */ #define WS_DLL_LOCAL #else /* defined _WIN32 || defined __CYGWIN__ */ /* @@ -101,9 +110,19 @@ * with GCC 4 or later. */ #if __GNUC__ >= 4 + /* + * Symbols exported from libraries. + */ #define WS_DLL_PUBLIC_DEF __attribute__ ((visibility ("default"))) + + /* + * Non-static symbols *not* exported from libraries. + */ #define WS_DLL_LOCAL __attribute__ ((visibility ("hidden"))) #else /* ! __GNUC__ >= 4 */ + /* + * We have no way to control visibility. + */ #define WS_DLL_PUBLIC_DEF #define WS_DLL_LOCAL #endif /* __GNUC__ >= 4 */ -- cgit v1.2.1