-/* Copyright (C) 1998, 1999, 2000, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <unistd.h>
int failed = 0;
}
-int
-main (int argc, char ** argv)
+static int
+do_test (void)
{
time_t t;
const struct test_times *pt;
strcpy (envstring, "TZ=Europe/London");
putenv (envstring);
t = mktime (&tmBuf);
- snprintf (buf, sizeof (buf), "TZ=%s %ld %d %d %d %d %d %d %d %d %d",
- getenv ("TZ"), t,
+ snprintf (buf, sizeof (buf), "TZ=%s %jd %d %d %d %d %d %d %d %d %d",
+ getenv ("TZ"), (intmax_t) t,
tmBuf.tm_sec, tmBuf.tm_min, tmBuf.tm_hour,
tmBuf.tm_mday, tmBuf.tm_mon, tmBuf.tm_year,
tmBuf.tm_wday, tmBuf.tm_yday, tmBuf.tm_isdst);
strcpy (envstring, "TZ=GMT");
/* No putenv call needed! */
t = mktime (&tmBuf);
- snprintf (buf, sizeof (buf), "TZ=%s %ld %d %d %d %d %d %d %d %d %d",
- getenv ("TZ"), t,
+ snprintf (buf, sizeof (buf), "TZ=%s %jd %d %d %d %d %d %d %d %d %d",
+ getenv ("TZ"), (intmax_t) t,
tmBuf.tm_sec, tmBuf.tm_min, tmBuf.tm_hour,
tmBuf.tm_mday, tmBuf.tm_mon, tmBuf.tm_year,
tmBuf.tm_wday, tmBuf.tm_yday, tmBuf.tm_isdst);
return failed ? EXIT_FAILURE : EXIT_SUCCESS;
}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"