aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-07-01 16:03:34 -0700
committerGuy Harris <guy@alum.mit.edu>2014-07-01 23:04:05 +0000
commit22ea889ee4bd6fe408faade5768005041e3e26e4 (patch)
tree833950da4e727c9f28a61d39f86e09c592a65753
parenta4a624e4c5f16ad75ab9124e390f82efaca06512 (diff)
For Sun C with linker scoping specifiers, define WS_DLL_PUBLIC_DEF.
This may let us, at least for those compilers, make the default "hidden" with -xldscope=hidden. Change-Id: I94e10733c2aba0ff8d77a8bf4f1dc8ecc8b2a47f Reviewed-on: https://code.wireshark.org/review/2766 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--ws_symbol_export.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ws_symbol_export.h b/ws_symbol_export.h
index c3804755a6..4bc63eea28 100644
--- a/ws_symbol_export.h
+++ b/ws_symbol_export.h
@@ -152,12 +152,16 @@
* This was lifted from GLib; see above for why we don't use
* G_GNUC_INTERNAL.
*/
- #define WS_DLL_PUBLIC_DEF
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+ /* This supports GCC-style __attribute__ ((visibility (XXX))) */
+ #define WS_DLL_PUBLIC_DEF __attribute__ ((visibility ("default")))
#define WS_DLL_LOCAL __attribute__ ((visibility ("hidden")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+ /* This doesn't, but supports __global and __hidden */
+ #define WS_DLL_PUBLIC_DEF __global
#define WS_DLL_LOCAL __hidden
#else /* not Sun C with "hidden" support */
+ #define WS_DLL_PUBLIC_DEF
#define WS_DLL_LOCAL
#endif
#endif /* __GNUC__ >= 4 */