1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

libguile/scm.h: Allow compilation with ‘-Werror=undef’.

* libguile/scm.h: BUILDING_LIBGUILE is not always defined. This is
signaled by -Werror=undef in code using libguile. This patch fixes
commit dc3a3a84f9
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Hannes Müller 2024-12-21 19:20:17 +01:00 committed by Ludovic Courtès
parent 5abb24efe4
commit ff4d79074c
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 4 additions and 2 deletions

View file

@ -718,9 +718,9 @@ enum scm_tc8_tags
/* SCM_API is a macro prepended to all function and data definitions
which should be exported from libguile. */
#if BUILDING_LIBGUILE && HAVE_VISIBILITY
#if defined BUILDING_LIBGUILE && HAVE_VISIBILITY
# define SCM_API extern __attribute__((__visibility__("default")))
#elif BUILDING_LIBGUILE && (defined _WIN32 || defined __CYGWIN__)
#elif defined BUILDING_LIBGUILE && (defined _WIN32 || defined __CYGWIN__)
# define SCM_API __declspec(dllexport) extern
#elif defined _WIN32 || defined __CYGWIN__
# define SCM_API __declspec(dllimport) extern