Just bumped into this today, but it seems that in function
gm_timestr_822() of testdate.c, we are stuffing a 64-bit value
(apr_time_t) into something may be a lot shorter (time_t). So, errors
start occurring and test fails (Fedora 7, i686). I was thinking that we
should patch the test along the lines of the attached.
Thoughts?
--
Bojan
Index: test/testdate.c
===================================================================
--- test/testdate.c (revision 574110)
+++ test/testdate.c (working copy)
@@ -161,7 +161,14 @@
guess = lgc(guess);
if (guess < 0)
guess *= -1;
- secstodate = guess + offset;
+
+ /* make sure it fits into time_t */
+ secstodate = (time_t)(guess + offset);
+
+ /* and is positive, taking into account we could be at _MIN */
+ if (secstodate < 0)
+ secstodate = -(secstodate + 1);
+
gm_timestr_822(datestr, secstodate);
secstodate *= APR_USEC_PER_SEC;
newsecs = apr_date_parse_http(datestr);