/*
** This file is in the public domain, so clarified as of
** 2009-05-17 by Arthur David Olson.
*/
#include "version.h"
/*
** This code has been made independent of the rest of the time
** conversion package to increase confidence in the verification it provides.
** You can use this code to help in verifying other implementations.
** To do this, compile with -DUSE_LTZ=0 and link without the tz library.
*/
#ifndef NETBSD_INSPIRED
# define NETBSD_INSPIRED 1
#endif
#ifndef USE_LTZ
# define USE_LTZ 1
#endif
#if USE_LTZ
# include "private.h"
#endif
/* Enable tm_gmtoff and tm_zone on GNUish systems. */
#define _GNU_SOURCE 1
/* Enable strtoimax on Solaris 10. */
#define __EXTENSIONS__ 1
#include "stdio.h" /* for stdout, stderr, perror */
#include "string.h" /* for strcpy */
#include "sys/types.h" /* for time_t */
#include "time.h" /* for struct tm */
#include "stdlib.h" /* for exit, malloc, atoi */
#include "limits.h" /* for CHAR_BIT, LLONG_MAX */
#include <errno.h>
/*
** Substitutes for pre-C99 compilers.
** Much of this section of code is stolen from private.h.
*/
#ifndef HAVE_STDINT_H
# define HAVE_STDINT_H \
(199901 <= __STDC_VERSION__ \
|| 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \
|| __CYGWIN__)
#endif
#if HAVE_STDINT_H
# include "stdint.h"
#endif
#ifndef HAVE_INTTYPES_H
# define HAVE_INTTYPES_H HAVE_STDINT_H
#endif