summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Weber <tweber@debian.org>2017-01-29 00:25:58 +0100
committerThomas Weber <tweber@debian.org>2017-02-02 09:42:07 +0100
commit408bc9dfb94c7fb83f14cee6caf3c51c0b3d0b65 (patch)
tree2a50326dd4fb49f928201cb7a99d74f4381ff086 /include
parentab1093539b4287c233aca6a3cf53b234faceb792 (diff)
downloadlcms2-408bc9dfb94c7fb83f14cee6caf3c51c0b3d0b65.tar.gz
Explicitly mark symbols meant for export under unixoid systems
The compiler has to support this, but most semi-modern compilers do. This brings these builds closer to the Windows builds. If the compiler does not support hiding of symbols, all symbols will be exported, just as before.
Diffstat (limited to 'include')
-rw-r--r--include/lcms2.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/lcms2.h b/include/lcms2.h
index 54f6bfe..136316c 100644
--- a/include/lcms2.h
+++ b/include/lcms2.h
@@ -228,16 +228,18 @@ typedef int cmsBool;
# define CMSAPI __declspec(dllexport)
# else
# define CMSAPI __declspec(dllimport)
-# endif
+# endif
# endif
+# endif
+#else // not Windows
+# ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
+# define CMSEXPORT
+# define CMSAPI __attribute__((visibility("default")))
# else
-# define CMSEXPORT
-# define CMSAPI
+# define CMSEXPORT
+# define CMSAPI
# endif
-#else
-# define CMSEXPORT
-# define CMSAPI
-#endif
+#endif // CMS_IS_WINDOWS_
#ifdef HasTHREADS
# if HasTHREADS == 1