From e2b10fe9085b5c0f9a94f2bb51d8f9d72ed87eb3 Mon Sep 17 00:00:00 2001 From: rslopes Date: Tue, 11 Apr 2006 16:49:07 +0000 Subject: [PATCH] fix for older compilers git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1593 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- library/yap2swi/yap2swi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/yap2swi/yap2swi.c b/library/yap2swi/yap2swi.c index 7501866da..b5d9e165d 100644 --- a/library/yap2swi/yap2swi.c +++ b/library/yap2swi/yap2swi.c @@ -1323,6 +1323,9 @@ X_API int Sdprintf(char *format,...) static int SWI_ctime(void) { +#if HAVE_CTIME + time_t tim; +#endif YAP_Term t1 = YAP_ARG1; if (YAP_IsVarTerm(t1)) { @@ -1330,7 +1333,7 @@ SWI_ctime(void) return FALSE; } #if HAVE_CTIME - time_t tim = (time_t)YAP_IntOfTerm(t1); + tim = (time_t)YAP_IntOfTerm(t1); return YAP_Unify(YAP_BufferToString(ctime(&tim)), YAP_ARG2); #else YAP_Error(0,0L,"convert_time requires ctime");