mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
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
This commit is contained in:
parent
df225a87b9
commit
dc3a3a84f9
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue