From f450c2c06ec2a351dbac0aa7cca27ea26796f303 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Mon, 29 Jun 2009 20:43:16 +0100 Subject: [PATCH] In MinGW build, avoid clash between libguile and SRFI library function names The dummy scm_init_* and scm_c_init_* functions in the empty libraries for SRFIs 4, 13 and 14 clash with declarations with the same names in libguile.h that are marked (in the MinGW build) with __declspec (dllimport). These libraries are empty because their content was moved into libguile some time ago, and I think these functions are needed only so that the libraries appear to contain something. They used also to be needed for the (load-extension ...) forms in the corresponding .scm modules, but those forms were not needed anymore, and so were removed, when everything moved into libguile. * srfi/srfi-13.c (scm_init_srfi_13_no_clash_with_libguile): Renamed from scm_init_srfi_13. (scm_init_srfi_13_14_no_clash_with_libguile): Same. * srfi/srfi-14.c (scm_init_srfi_14_no_clash_with_libguile): Same. (scm_c_init_srfi_14_no_clash_with_libguile): Same. * srfi/srfi-4.c (scm_init_srfi_4_no_clash_with_libguile): Same. --- srfi/srfi-13.c | 7 +++++-- srfi/srfi-14.c | 7 +++++-- srfi/srfi-4.c | 4 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/srfi/srfi-13.c b/srfi/srfi-13.c index dd5ce9b15..8655885b1 100644 --- a/srfi/srfi-13.c +++ b/srfi/srfi-13.c @@ -29,12 +29,15 @@ #include +void scm_init_srfi_13_no_clash_with_libguile (void); +void scm_init_srfi_13_14_no_clash_with_libguile (void); + void -scm_init_srfi_13 (void) +scm_init_srfi_13_no_clash_with_libguile (void) { } void -scm_init_srfi_13_14 (void) +scm_init_srfi_13_14_no_clash_with_libguile (void) { } diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 1a7297b82..76cea87e4 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -23,12 +23,15 @@ #include +void scm_init_srfi_14_no_clash_with_libguile (void); +void scm_c_init_srfi_14_no_clash_with_libguile (void); + void -scm_init_srfi_14 (void) +scm_init_srfi_14_no_clash_with_libguile (void) { } void -scm_c_init_srfi_14 (void) +scm_c_init_srfi_14_no_clash_with_libguile (void) { } diff --git a/srfi/srfi-4.c b/srfi/srfi-4.c index f40c6b319..f2e29e228 100644 --- a/srfi/srfi-4.c +++ b/srfi/srfi-4.c @@ -28,8 +28,10 @@ #include +void scm_init_srfi_4_no_clash_with_libguile (void); + void -scm_init_srfi_4 (void) +scm_init_srfi_4_no_clash_with_libguile (void) { }