summaryrefslogtreecommitdiff
path: root/libguile/__scm.h
diff options
context:
space:
mode:
authorJulian Graham <julian@transmetropolitan.(none)>2009-06-02 09:35:02 -0400
committerJulian Graham <julian@transmetropolitan.(none)>2009-06-02 09:35:02 -0400
commit2f9ae9b1040e1b9339bb0bc8b0013a5346622c44 (patch)
tree8dc3105cc05ddd5509edc4559a69d32d2acddfab /libguile/__scm.h
parent922d417bf4a7c4eb7d956d340161ad6407545ae7 (diff)
parent938d46a35d39ec5d7b5fa858a8783136ce24d10d (diff)
downloadguile-2f9ae9b1040e1b9339bb0bc8b0013a5346622c44.tar.gz
Merge branch 'master' of git://git.savannah.gnu.org/guile
Diffstat (limited to 'libguile/__scm.h')
-rw-r--r--libguile/__scm.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/libguile/__scm.h b/libguile/__scm.h
index 3672b1c09..07d7b4d3d 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -98,13 +98,10 @@
#define SCM_UNLIKELY(_expr) SCM_EXPECT ((_expr), 0)
/* The SCM_INTERNAL macro makes it possible to explicitly declare a function
- * as having "internal" linkage. */
-#if (defined __GNUC__) && \
- ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ == 3))
-# define SCM_INTERNAL extern __attribute__ ((__visibility__ ("internal")))
-#else
-# define SCM_INTERNAL extern
-#endif
+ * as having "internal" linkage. However our current tack on this problem is
+ * to use GCC 4's -fvisibility=hidden, making functions internal by default,
+ * and then SCM_API marks them for export. */
+#define SCM_INTERNAL extern
@@ -154,13 +151,14 @@
/* SCM_API is a macro prepended to all function and data definitions
- which should be exported or imported in the resulting dynamic link
- library (DLL) in the Win32 port. */
-
-#if defined (SCM_IMPORT)
-# define SCM_API __declspec (dllimport) extern
-#elif defined (SCM_EXPORT) || defined (DLL_EXPORT)
-# define SCM_API __declspec (dllexport) extern
+ which should be exported from libguile. */
+
+#if BUILDING_LIBGUILE && HAVE_VISIBILITY
+# define SCM_API extern __attribute__((__visibility__("default")))
+#elif BUILDING_LIBGUILE && defined _MSC_VER
+# define SCM_API __declspec(dllexport) extern
+#elif defined _MSC_VER
+# define SCM_API __declspec(dllimport) extern
#else
# define SCM_API extern
#endif