-/* Copyright (C) 1998, 1999, 2000, 2005 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.
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <unistd.h>
int failed = 0;
{ "America/Chicago", 1, 21600, {"CST", "CDT" }},
{ "America/Indiana/Indianapolis", 1, 18000, {"EST", "EDT" }},
{ "America/Los_Angeles", 1, 28800, {"PST", "PDT" }},
- { "Asia/Tokyo", 1, -32400, {"JST", "JDT" }},
{ "Pacific/Auckland", 1, -43200, { "NZST", "NZDT" }},
{ NULL, 0, 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"