[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 04/04: In test-extensions test, must export library fuct
From: |
Mike Gran |
Subject: |
[Guile-commits] 04/04: In test-extensions test, must export library fuctions when built as DLL |
Date: |
Tue, 18 Jul 2023 01:48:40 -0400 (EDT) |
mike121 pushed a commit to branch main
in repository guile.
commit 0e9ccaf47cb956f70c8ecd4b9fba64fea4023dfc
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Fri Jun 2 13:43:57 2023 -0700
In test-extensions test, must export library fuctions when built as DLL
The test-extensions standalone test creates a library to be loaded with
load-extension. When such libraries are DLLs, the public functions
must be marked with the dllexport function attribute.
* test-suite/standalone/test-extensions-lib.c (API): new define
Mark public functions with define.
---
test-suite/standalone/test-extensions-lib.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/test-suite/standalone/test-extensions-lib.c
b/test-suite/standalone/test-extensions-lib.c
index 84eb376b9..481e5abe5 100644
--- a/test-suite/standalone/test-extensions-lib.c
+++ b/test-suite/standalone/test-extensions-lib.c
@@ -25,8 +25,14 @@
SCM init2_count;
-void libtest_extensions_init2 (void);
-void libtest_extensions_init (void);
+#if _WIN32 || __CYGWIN__
+#define API __declspec(dllexport)
+#else
+#define API
+#endif
+
+API void libtest_extensions_init2 (void);
+API void libtest_extensions_init (void);
void
libtest_extensions_init2 (void)