summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-12-13 14:37:19 +0100
committerAraq <rumpf_a@web.de>2017-12-13 14:37:19 +0100
commitc35788b97c1d5dffbb5bb7948946029bce2527bf (patch)
treea28c5f128f2ee28d30c0bf302d2fe0c9f91a2be5 /lib
parentd550417f8b6dd9703f48f5dbd12c35b9037a7d02 (diff)
downloadNim-c35788b97c1d5dffbb5bb7948946029bce2527bf.tar.gz
make hidden visibility the default for Unix
Diffstat (limited to 'lib')
-rw-r--r--lib/nimbase.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h
index ac2cc097c..b12d8e34d 100644
--- a/lib/nimbase.h
+++ b/lib/nimbase.h
@@ -159,6 +159,7 @@ __clang__
 /* ------------------------------------------------------------------- */
 
 #if defined(WIN32) || defined(_WIN32) /* only Windows has this mess... */
+#  define N_LIB_PRIVATE
 #  define N_CDECL(rettype, name) rettype __cdecl name
 #  define N_STDCALL(rettype, name) rettype __stdcall name
 #  define N_SYSCALL(rettype, name) rettype __syscall name
@@ -178,6 +179,7 @@ __clang__
 #  endif
 #  define N_LIB_IMPORT  extern __declspec(dllimport)
 #else
+#  define N_LIB_PRIVATE __attribute__((visibility("hidden")))
 #  if defined(__GNUC__)
 #    define N_CDECL(rettype, name) rettype name
 #    define N_STDCALL(rettype, name) rettype name