From ff4d79074c7ab35ac4ceb3ad76fd3644fc9c148e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20M=C3=BCller?= <> Date: Sat, 21 Dec 2024 19:20:17 +0100 Subject: [PATCH] =?UTF-8?q?libguile/scm.h:=20Allow=20compilation=20with=20?= =?UTF-8?q?=E2=80=98-Werror=3Dundef=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libguile/scm.h: BUILDING_LIBGUILE is not always defined. This is signaled by -Werror=undef in code using libguile. This patch fixes commit dc3a3a84f908f4a16e95a2c3bb412861521960dc * NEWS: Update. Signed-off-by: Ludovic Courtès --- NEWS | 2 ++ libguile/scm.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 135615fab..5321e953d 100644 --- a/NEWS +++ b/NEWS @@ -78,6 +78,8 @@ every line in a file. available or the port isn't a tty). ** Fix build error when cross-compiling to MinGW () +** Change to allow compilation with -Werror=undef + () Changes in 3.0.10 (since 3.0.9) diff --git a/libguile/scm.h b/libguile/scm.h index 4d079b1a8..180b40159 100644 --- a/libguile/scm.h +++ b/libguile/scm.h @@ -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