From f4767979987530bb9d88dde6ebe61cdac6f756b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 5 Nov 2009 23:06:45 +0100 Subject: [PATCH] Fix snarfing of `SCM_DEFINE' with static allocation. * libguile/snarf.h (SCM_DEFINE)[SCM_SUPPORT_STATIC_ALLOCATION]: Provide a declaration for FNAME since the last argument to `SCM_IMMUTABLE_SUBR ()' refers to it. --- libguile/snarf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libguile/snarf.h b/libguile/snarf.h index 9eaccf60c..720cff582 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -101,14 +101,15 @@ SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING) /* Static subr allocation. */ #define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ SCM_SYMBOL (scm_i_paste (FNAME, __name), PRIMNAME); \ -SCM_SNARF_HERE( \ +SCM_SNARF_HERE( \ static const char scm_i_paste (s_, FNAME) [] = PRIMNAME; \ + SCM_API SCM FNAME ARGLIST; \ SCM_IMMUTABLE_SUBR (scm_i_paste (FNAME, __subr), \ scm_i_paste (FNAME, __name), \ REQ, OPT, VAR, &FNAME); \ SCM FNAME ARGLIST \ ) \ -SCM_SNARF_INIT( \ +SCM_SNARF_INIT( \ /* Initialize the procedure name (an interned symbol). */ \ scm_i_paste (FNAME, __subr_meta_info)[0] = scm_i_paste (FNAME, __name); \ \