diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1997-03-14 23:06:42 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1997-03-14 23:06:42 +0000 |
commit | dfa84eae7b007d95dbbcd1f4b206b7d4ae00192b (patch) | |
tree | 092ec944a84c8b78010eb9b0e3bfb8db2a20248f | |
parent | 3bc61059b4b6ba18961effa8ef55144bfe396d1d (diff) | |
download | guile-dfa84eae7b007d95dbbcd1f4b206b7d4ae00192b.tar.gz |
* snarf.h: g++ says it's non-portable not to specify the first
argument in a varargs declaration. I introduced the first
argument by using preprocessor conditionals.
-rw-r--r-- | libguile/ChangeLog | 6 | ||||
-rw-r--r-- | libguile/snarf.h | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 078f54d1b..94a83554d 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,9 @@ +Sat Mar 15 00:06:08 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se> + + * snarf.h: g++ says it's non-portable not to specify the first + argument in a varargs declaration. I introduced the first + argument by using preprocessor conditionals. + Thu Mar 13 21:28:25 1997 Gary Houston <ghouston@actrix.gen.nz> * ioext.c (scm_read_delimited_x): use RO string macros for delims. diff --git a/libguile/snarf.h b/libguile/snarf.h index 2104531aa..4304d99cd 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -53,16 +53,26 @@ static char RANAME[]=STR #else #ifdef __cplusplus +#if REQ == 0 && OPT == 0 && VAR == 0 #define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ -%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*) (...)) CFN) +%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*) ()) CFN) +#else +#define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ +%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*) (SCM, ...)) CFN) +#endif +#if TYPE == scm_tc7_subr_0 #define SCM_PROC1(RANAME, STR, TYPE, CFN) \ %%% scm_make_subr(RANAME, TYPE, (SCM (*)(...)) CFN) -#else /* not __cplusplus */ +#else +#define SCM_PROC1(RANAME, STR, TYPE, CFN) \ +%%% scm_make_subr(RANAME, TYPE, (SCM (*)(...)) CFN) +#endif +#else /* __cplusplus */ #define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ %%% scm_make_gsubr (RANAME, REQ, OPT, VAR, CFN) #define SCM_PROC1(RANAME, STR, TYPE, CFN) \ %%% scm_make_subr(RANAME, TYPE, CFN) -#endif /* not __cplusplus */ +#endif /* __cplusplus */ #endif #ifndef SCM_MAGIC_SNARFER |