fix for older compilers
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1593 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
13479f6091
commit
e2b10fe908
@ -1323,6 +1323,9 @@ X_API int Sdprintf(char *format,...)
|
|||||||
static int
|
static int
|
||||||
SWI_ctime(void)
|
SWI_ctime(void)
|
||||||
{
|
{
|
||||||
|
#if HAVE_CTIME
|
||||||
|
time_t tim;
|
||||||
|
#endif
|
||||||
YAP_Term t1 = YAP_ARG1;
|
YAP_Term t1 = YAP_ARG1;
|
||||||
|
|
||||||
if (YAP_IsVarTerm(t1)) {
|
if (YAP_IsVarTerm(t1)) {
|
||||||
@ -1330,7 +1333,7 @@ SWI_ctime(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#if HAVE_CTIME
|
#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);
|
return YAP_Unify(YAP_BufferToString(ctime(&tim)), YAP_ARG2);
|
||||||
#else
|
#else
|
||||||
YAP_Error(0,0L,"convert_time requires ctime");
|
YAP_Error(0,0L,"convert_time requires ctime");
|
||||||
|
Reference in New Issue
Block a user