summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-05 18:28:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:15 -0500
commit8ef42b1fab5e7608a8f90f303ec4c1d3524627d9 (patch)
tree029c1856fc9338aa81bb8e4a7d5099cce86ec3dd /source4/include
parent3bec2022eb610342de4a023205996b3872035da7 (diff)
downloadsamba-8ef42b1fab5e7608a8f90f303ec4c1d3524627d9.tar.gz
samba-8ef42b1fab5e7608a8f90f303ec4c1d3524627d9.tar.bz2
samba-8ef42b1fab5e7608a8f90f303ec4c1d3524627d9.zip
r13847: Fix some portability issues with the visibility attribute.
(This used to be commit fe5eae0e983d1c8634dd9b7caf19cd103c641223)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/includes.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 83bc9569cb..32dda4a302 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -36,6 +36,12 @@
/** Feel free to add definitions for other compilers here. */
#endif
+#ifdef HAVE_VISIBILITY_ATTR
+# define _PUBLIC_ __attribute__((visibility("default")))
+#else
+# define _PUBLIC_
+#endif
+
#ifndef PRINTF_ATTRIBUTE
#if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3)
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
@@ -158,8 +164,4 @@ extern int DEBUGLEVEL;
#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
-#ifndef _PUBLIC_
-#define _PUBLIC_
-#endif
-
#endif /* _INCLUDES_H */