I posted a support request to the project page regarding 'make check'
failing with the following
output.
...
checking: ctime:
File "./test.scm", line 259, character 9026:
# (test(ctime 100000000.0) "Sat Mar 3 12:46:40 1973"
"ctime")
# ^
# *** ERROR:bigloo:ctime
# check failed must be "Sat Mar 3 12:46:40 1973", got
"Sat Mar 3 03:46:40 1973" --
*** ERROR:bigloo:load:
error occured when loading -- ./test.scm
FAIL: test.scm
===================
..
After looking at this a little and reading the man page for ctime, I
think the problem is
that ctime uses the timezone when constructing its date string. I wrote
the following program
in c and compiled and ran it on a X86 machine running Redhat Linux 7.2
#include <stdio.h>
int main()
{
//# (test(ctime 100000000.0) "Sat Mar 3 12:46:40 1973" "ctime")
// time_t t = 100000000;
time_t t = 0;
printf ( "ctime(0) '%s'\n", ctime(&t));
printf ( "asctime(0) '%s'\n", asctime( gmtime(&t)));
printf ( "tzname[0] '%s'\n", tzname[0]);
printf ( "tzname[1] '%s'\n", tzname[1]);
printf ( "timezone %ld\n", timezone);
printf ( "timezone/3600 %ld\n", (timezone/3600));
printf ( "daylight %d\n", daylight);
t = mktime(localtime(&t));
printf ( "localtime %s\n", ctime (&t));
}
Here is the output it generates for me.
ctime(0) 'Wed Dec 31 18:00:00 1969
'
asctime(0) 'Thu Jan 1 00:00:00 1970
'
tzname[0] 'CST'
tzname[1] 'CDT'
timezone 21600
timezone/3600 6
daylight 1
localtime Wed Dec 31 18:00:00 1969
It appears that while asctime uses the time input as it, ctime converts
to localtime. If this is
true 'common/test.scm' needs the following modification.
common/test.scm:258
(test(>(current-seconds)956000118.80394) #t "current-seconds")
;; this should take into account timezone information
;; (test(ctime 100000000.0) "Sat Mar 3 12:46:40 1973" "ctime")
(test(ctime (+ 100000000.0 (timezone))) "Sat Mar 3 09:46:40 1973"
"ctime")
I have left the original line for your reference. It appears that you
are in timezone +3 and I am
at timezone -6.
Please let me know if I am completely wrong.
Now I am getting this:
make[2]: Entering directory
`/home/tdukes/download/tmp/bigloo-lib-0.17/rdbms'
File "./test.scm", line 86, character 3309:
#(cond-expand
#^
# *** ERROR:bigloo:cond-expand
# Illegal form -- (cond-expand)
*** ERROR:bigloo:load:
error occured when loading -- ./test.scm
FAIL: test.scm
===================
1 of 1 tests failed
thanks,
Todd.
tdukes at austin dot rr dot com
|