summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2001-11-02 00:07:21 +0000
committerMarius Vollmer <mvo@zagadka.de>2001-11-02 00:07:21 +0000
commit1174045c9ade5765b91d80d12af7f70b7744f305 (patch)
tree1d4fc22ffd2b8aae590fefe46287b7f1462b94c7
parent94b1762d3229122bad4cece53aa9088f0b8c2f6f (diff)
downloadguile-1174045c9ade5765b91d80d12af7f70b7744f305.tar.gz
* __scm.h: Defined SCM_API. This macro gets prepended to all
function and data definitions which should be exported or imported in the resulting dynamic link library in the Win32 port. * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h, chars.h, continuations.h, coop-defs.h, coop-threads.h, debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h, environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h, feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h, gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h, hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h, load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h, objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h, procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h, read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h, smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h, strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h, tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h, vports.h, weaks.h: Prefixed each each exported symbol with SCM_API.
-rw-r--r--libguile/__scm.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/libguile/__scm.h b/libguile/__scm.h
index fb2d9c2cd..b24158b51 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -157,6 +157,20 @@
+/* SCM_API is a macro prepended to all function and data definitions
+ which should be exported or imported in the resulting dynamic link
+ library in the Win32 port. */
+
+#if defined (__SCM_IMPORT__)
+# define SCM_API __declspec (dllimport) extern
+#elif defined (__SCM_EXPORT__) || defined (DLL_EXPORT)
+# define SCM_API __declspec (dllexport) extern
+#else
+# define SCM_API extern
+#endif
+
+
+
/* What did the configure script discover about the outside world? */
#include "libguile/scmconfig.h"
@@ -384,7 +398,7 @@ typedef long SCM_STACKITEM;
#endif
#ifdef GUILE_OLD_ASYNC_CLICK
-extern unsigned int scm_async_clock;
+SCM_API unsigned int scm_async_clock;
#define SCM_ASYNC_TICK \
do { \
@@ -392,7 +406,7 @@ do { \
scm_async_click (); \
} while(0)
#else
-extern int scm_asyncs_pending_p;
+SCM_API int scm_asyncs_pending_p;
#define SCM_ASYNC_TICK /*fixme* should change names */ \
do { \
@@ -565,7 +579,7 @@ do { \
* like SCM_BOOL_F or SCM_UNDEFINED was chosen.
*/
-extern SCM scm_call_generic_0 (SCM gf);
+SCM_API SCM scm_call_generic_0 (SCM gf);
#define SCM_WTA_DISPATCH_0(gf, subr) \
return (SCM_UNPACK (gf) \
@@ -574,7 +588,7 @@ extern SCM scm_call_generic_0 (SCM gf);
#define SCM_GASSERT0(cond, gf, subr) \
if (!(cond)) SCM_WTA_DISPATCH_0((gf), (subr))
-extern SCM scm_call_generic_1 (SCM gf, SCM a1);
+SCM_API SCM scm_call_generic_1 (SCM gf, SCM a1);
#define SCM_WTA_DISPATCH_1(gf, a1, pos, subr) \
return (SCM_UNPACK (gf) \
@@ -583,7 +597,7 @@ extern SCM scm_call_generic_1 (SCM gf, SCM a1);
#define SCM_GASSERT1(cond, gf, a1, pos, subr) \
if (!(cond)) SCM_WTA_DISPATCH_1((gf), (a1), (pos), (subr))
-extern SCM scm_call_generic_2 (SCM gf, SCM a1, SCM a2);
+SCM_API SCM scm_call_generic_2 (SCM gf, SCM a1, SCM a2);
#define SCM_WTA_DISPATCH_2(gf, a1, a2, pos, subr) \
return (SCM_UNPACK (gf) \
@@ -594,7 +608,7 @@ extern SCM scm_call_generic_2 (SCM gf, SCM a1, SCM a2);
#define SCM_GASSERT2(cond, gf, a1, a2, pos, subr) \
if (!(cond)) SCM_WTA_DISPATCH_2((gf), (a1), (a2), (pos), (subr))
-extern SCM scm_apply_generic (SCM gf, SCM args);
+SCM_API SCM scm_apply_generic (SCM gf, SCM args);
#define SCM_WTA_DISPATCH_n(gf, args, pos, subr) \
return (SCM_UNPACK (gf) \