aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-07-04 00:39:54 +0000
committerGuy Harris <guy@alum.mit.edu>2013-07-04 00:39:54 +0000
commitd85874c64c451ce10730e12ae6523cb517215470 (patch)
treeff34fcf60d343d6f03eef387fc3a9fc3991665c3
parent88c1661af402d1cc4aad792f9b994c6bef6449aa (diff)
Add more comments indicating what this is doing.
svn path=/trunk/; revision=50379
-rw-r--r--ws_symbol_export.h23
1 files changed, 21 insertions, 2 deletions
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 */