/* Test program from Paul Eggert and Tony Leneis. */
+
+#include <limits.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
struct tm tm;
time_t now;
tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+ tm.tm_isdst = -1;
now = mktime (&tm);
if (now != (time_t) -1)
{
do_test (void)
{
time_t t, delta;
- int i, j;
+ int i;
+ unsigned int j;
setenv ("TZ", "America/Sao_Paulo", 1);
/* This test makes some buggy mktime implementations loop.
mktime_test ((time_t) (60 * 60));
mktime_test ((time_t) (60 * 60 * 24));
- for (j = 1; 0 < j; j *= 2)
+ for (j = 1; j <= INT_MAX; j *= 2)
bigtime_test (j);
bigtime_test (j - 1);
}