[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/04: Modify SCM_API for DLLs
From: |
Mike Gran |
Subject: |
[Guile-commits] 03/04: Modify SCM_API for DLLs |
Date: |
Tue, 18 Jul 2023 01:48:40 -0400 (EDT) |
mike121 pushed a commit to branch main
in repository guile.
commit dc3a3a84f908f4a16e95a2c3bb412861521960dc
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Thu Jun 1 18:51:27 2023 -0700
Modify SCM_API for DLLs
In https://gcc.gnu.org/wiki/Visibility, they recommend _WIN32 and
__CYGWIN__ as the test defines for dllexport.
Also, logic is incorrect since HAVE_VISIBILITY can be defined but zero.
* libguile/scm.h (SCM_API): modify #ifdef logic
---
libguile/scm.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libguile/scm.h b/libguile/scm.h
index e69552893..4d079b1a8 100644
--- a/libguile/scm.h
+++ b/libguile/scm.h
@@ -1,7 +1,7 @@
#ifndef SCM_SCM_H
#define SCM_SCM_H
-/* Copyright 1995-2004,2006-2015,2017-2019
+/* Copyright 1995-2004,2006-2015,2017-2019,2023
Free Software Foundation, Inc.
This file is part of Guile.
@@ -718,11 +718,11 @@ enum scm_tc8_tags
/* SCM_API is a macro prepended to all function and data definitions
which should be exported from libguile. */
-#if defined BUILDING_LIBGUILE && defined HAVE_VISIBILITY
+#if BUILDING_LIBGUILE && HAVE_VISIBILITY
# define SCM_API extern __attribute__((__visibility__("default")))
-#elif defined BUILDING_LIBGUILE && defined _MSC_VER
+#elif BUILDING_LIBGUILE && (defined _WIN32 || defined __CYGWIN__)
# define SCM_API __declspec(dllexport) extern
-#elif defined _MSC_VER
+#elif defined _WIN32 || defined __CYGWIN__
# define SCM_API __declspec(dllimport) extern
#else
# define SCM_API extern