summaryrefslogtreecommitdiff
path: root/src/gd.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-07-22 15:19:15 +0530
committerMike Frysinger <vapier@gentoo.org>2016-07-22 18:12:48 +0530
commitc78ae3e4d677274323a5abb59fd8197e0c38a860 (patch)
treeec2587051d25bc24eb8386807e76cccd193f94c7 /src/gd.h
parent2cf85cd8dbd4f3431fefbf1a9dc32757f4eb899a (diff)
downloadlibgd-c78ae3e4d677274323a5abb59fd8197e0c38a860.tar.gz
cmake: add visibility support #260
This makes sure we don't export symbols in libgd.so that we shouldn't. We now assume that, if you're using gcc, you're using at least version 3.3 as that's the first to support the visibility attribute. We can wait to see if anyone complains before worrying about older ones.
Diffstat (limited to 'src/gd.h')
-rw-r--r--src/gd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gd.h b/src/gd.h
index 4498392..04cad83 100644
--- a/src/gd.h
+++ b/src/gd.h
@@ -66,7 +66,7 @@ extern "C" {
# define BGD_STDCALL __stdcall
# define BGD_EXPORT_DATA_IMPL
#else
-# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY==1
+# if defined(__GNUC__) || defined(__clang__)
# define BGD_EXPORT_DATA_PROT __attribute__ ((visibility ("default")))
# define BGD_EXPORT_DATA_IMPL __attribute__ ((visibility ("hidden")))
# else