guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 02/02: Modify SCM_API for DLLs


From: Mike Gran
Subject: [Guile-commits] 02/02: Modify SCM_API for DLLs
Date: Fri, 2 Jun 2023 01:12:48 -0400 (EDT)

mike121 pushed a commit to branch main-patches
in repository guile.

commit 6df98ba2edb92d64a79a6ae0c0d1d75ef545326d
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]