TZ-Lib  $VERSION$
private.h File Reference
#include <time.h>
#include "sys/types.h"
#include "stdio.h"
#include "string.h"
#include "limits.h"
#include "stdlib.h"
#include "errno.h"
#include <sys/wait.h>
#include "unistd.h"

Go to the source code of this file.

Macros

#define _(msgid)   msgid
 
#define __EXTENSIONS__   1
 
#define _GNU_SOURCE   1
 
#define _Noreturn
 
#define _POSIX_PTHREAD_SEMANTICS   1
 
#define ATTRIBUTE_CONST   /* empty */
 
#define ATTRIBUTE_FORMAT(spec)   /* empty */
 
#define ATTRIBUTE_PURE   /* empty */
 
#define AVGSECSPERYEAR   31556952L
 
#define bool   int
 
#define ENAMETOOLONG   EINVAL
 
#define ENOTSUP   EINVAL
 
#define EOVERFLOW   EINVAL
 
#define EPOCH_LOCAL   0
 
#define EPOCH_OFFSET   0
 
#define F_OK   0
 
#define false   0
 
#define GRANDPARENTED   "Local time zone must be set--see zic manual page"
 
#define HAVE_DECL_ASCTIME_R   1
 
#define HAVE_GETTEXT   0
 
#define HAVE_INCOMPATIBLE_CTIME_R   0
 
#define HAVE_INTTYPES_H   HAVE_STDINT_H
 
#define HAVE_LINK   1
 
#define HAVE_POSIX_DECLS   1
 
#define HAVE_STDINT_H
 
#define HAVE_STRDUP   1
 
#define HAVE_STRFTIME_L   0
 
#define HAVE_SYMLINK   1
 
#define HAVE_SYS_STAT_H   1
 
#define HAVE_SYS_WAIT_H   1
 
#define HAVE_UNISTD_H   1
 
#define HAVE_UTMPX_H   1
 
#define INITIALIZE(x)
 
#define INT32_MAX   0x7fffffff
 
#define INT32_MIN   (-1 - INT32_MAX)
 
#define INT_FAST32_MAX   LONG_MAX
 
#define INT_FAST32_MIN   LONG_MIN
 
#define INT_FAST64_MAX   LONG_MAX
 
#define INT_FAST64_MIN   LONG_MIN
 
#define INT_STRLEN_MAXIMUM(type)
 
#define INTMAX_MAX   LONG_MAX
 
#define INTMAX_MIN   LONG_MIN
 
#define is_digit(c)   ((unsigned)(c) - '0' <= 9)
 
#define localtime_rz   sys_localtime_rz
 
#define MAXVAL(t, b)
 
#define MINVAL(t, b)   ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))
 
#define mktime_z   sys_mktime_z
 
#define NETBSD_INSPIRED   1
 
#define posix2time_z   sys_posix2time_z
 
#define PRIdFAST64   "lld"
 
#define PRIdMAX   "lld"
 
#define PRIuMAX   "lu"
 
#define R_OK   4
 
#define restrict   /* empty */
 
#define SCNdFAST64   PRIdFAST64
 
#define SECSPERREPEAT   ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR)
 
#define SECSPERREPEAT_BITS   34 /* ceil(log2(SECSPERREPEAT)) */
 
#define SIZE_MAX   ((size_t) -1)
 
#define strtoimax   strtol
 
#define time2posix_z   sys_time2posix_z
 
#define timezone_t   sys_timezone_t
 
#define true   1
 
#define TWOS_COMPLEMENT(t)   ((t) ~ (t) 0 < 0)
 
#define TYPE_BIT(type)   (sizeof (type) * CHAR_BIT)
 
#define TYPE_SIGNED(type)   (((type) -1) < 0)
 
#define TZ_DOMAIN   "tz"
 
#define tzalloc   sys_tzalloc
 
#define tzfree   sys_tzfree
 
#define UNINIT_TRAP   0
 
#define WEXITSTATUS(status)   (((status) >> 8) & 0xff)
 
#define WIFEXITED(status)   (((status) & 0xff) == 0)
 
#define YEARSPERREPEAT   400 /* years before a Gregorian repeat */
 

Typedefs

typedef long int_fast32_t
 
typedef long intmax_t
 
typedef struct statetimezone_t
 
typedef unsigned long uintmax_t
 

Functions

struct tmlocaltime_rz (timezone_t restrict, time_t const *restrict, struct tm *restrict)
 
time_t mktime_z (timezone_t restrict, struct tm *restrict)
 
Please use a compiler that
supports a bit integer 
type (or wider)
 
timezone_t tzalloc (char const *)
 
void tzfree (timezone_t)
 

Variables

you may need to compile with
DHAVE_STDINT_H typedef long 
int_fast64_t
 
static time_t const time_t_max = MAXVAL(time_t, TYPE_BIT(time_t))
 
static time_t const time_t_min = MINVAL(time_t, TYPE_BIT(time_t))
 
you may need to compile with
DHAVE_STDINT_H typedef
unsigned long 
uint_fast64_t
 

Macro Definition Documentation

#define __EXTENSIONS__   1
#define _GNU_SOURCE   1
#define _Noreturn
#define _POSIX_PTHREAD_SEMANTICS   1
#define ATTRIBUTE_CONST   /* empty */
#define ATTRIBUTE_FORMAT (   spec)    /* empty */
#define ATTRIBUTE_PURE   /* empty */
#define AVGSECSPERYEAR   31556952L

Referenced by localsub().

#define bool   int
#define ENAMETOOLONG   EINVAL

Referenced by tzloadbody().

#define ENOTSUP   EINVAL

Referenced by dolink().

#define EOVERFLOW   EINVAL

Referenced by asctime_r(), itsdir(), and timesub().

#define EPOCH_LOCAL   0
#define EPOCH_OFFSET   0
#define F_OK   0
#define false   0
#define GRANDPARENTED   "Local time zone must be set--see zic manual page"

Referenced by newabbr(), and scrub_abbrs().

#define HAVE_DECL_ASCTIME_R   1
#define HAVE_GETTEXT   0
#define HAVE_INCOMPATIBLE_CTIME_R   0
#define HAVE_INTTYPES_H   HAVE_STDINT_H
#define HAVE_LINK   1
#define HAVE_POSIX_DECLS   1
#define HAVE_STDINT_H
Value:
(199901 <= __STDC_VERSION__ \
|| 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \
|| __CYGWIN__ || INTMAX_MAX)
#define INTMAX_MAX
Definition: private.h:245
#define HAVE_STRDUP   1
#define HAVE_STRFTIME_L   0
#define HAVE_SYMLINK   1
#define HAVE_SYS_STAT_H   1
#define HAVE_SYS_WAIT_H   1
#define HAVE_UNISTD_H   1
#define HAVE_UTMPX_H   1
#define INITIALIZE (   x)

Referenced by main(), outzone(), and transtime().

#define INT32_MAX   0x7fffffff

Referenced by is32().

#define INT32_MIN   (-1 - INT32_MAX)

Referenced by is32(), and writezone().

#define INT_FAST32_MAX   LONG_MAX

Referenced by increment_overflow32(), and time2sub().

#define INT_FAST32_MIN   LONG_MIN

Referenced by increment_overflow32(), and time2sub().

#define INT_FAST64_MAX   LONG_MAX
#define INT_FAST64_MIN   LONG_MIN
#define INT_STRLEN_MAXIMUM (   type)
Value:
((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \
Please use a compiler that supports a bit integer type(or wider)
#define TYPE_BIT(type)
Definition: private.h:504
#define TYPE_SIGNED(type)
Definition: private.h:508

Referenced by _conv(), _fmt(), asctime_r(), and yearistype().

#define INTMAX_MAX   LONG_MAX

Referenced by yeartot().

#define INTMAX_MIN   LONG_MIN
#define is_digit (   c)    ((unsigned)(c) - '0' <= 9)

Referenced by getnum(), getrule(), getzname(), and scheck().

#define localtime_rz   sys_localtime_rz
#define MAXVAL (   t,
 
)
Value:
((t) (((t) 1 << ((b) - 1 - TYPE_SIGNED(t))) \
- 1 + ((t) 1 << ((b) - 1 - TYPE_SIGNED(t)))))
#define TYPE_SIGNED(type)
Definition: private.h:508
#define MINVAL (   t,
 
)    ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))
#define mktime_z   sys_mktime_z
#define NETBSD_INSPIRED   1
#define posix2time_z   sys_posix2time_z
#define PRIdFAST64   "lld"
#define PRIdMAX   "lld"

Referenced by _fmt(), and tformat().

#define PRIuMAX   "lu"

Referenced by _fmt(), and tformat().

#define R_OK   4

Referenced by tzloadbody().

#define restrict   /* empty */
#define SCNdFAST64   PRIdFAST64
#define SECSPERREPEAT   ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR)

Referenced by differ_by_repeat(), and localsub().

#define SECSPERREPEAT_BITS   34 /* ceil(log2(SECSPERREPEAT)) */

Referenced by differ_by_repeat().

#define SIZE_MAX   ((size_t) -1)

Referenced by growalloc(), relname(), and size_product().

#define strtoimax   strtol

Referenced by main().

#define time2posix_z   sys_time2posix_z
#define timezone_t   sys_timezone_t
#define true   1
#define TWOS_COMPLEMENT (   t)    ((t) ~ (t) 0 < 0)

Referenced by detzcode(), and detzcode64().

#define TYPE_BIT (   type)    (sizeof (type) * CHAR_BIT)

Referenced by differ_by_repeat(), and main().

#define TYPE_SIGNED (   type)    (((type) -1) < 0)
#define TZ_DOMAIN   "tz"

Referenced by main().

#define tzalloc   sys_tzalloc
#define tzfree   sys_tzfree
#define UNINIT_TRAP   0
#define WEXITSTATUS (   status)    (((status) >> 8) & 0xff)

Referenced by yearistype().

#define WIFEXITED (   status)    (((status) & 0xff) == 0)

Referenced by yearistype().

#define YEARSPERREPEAT   400 /* years before a Gregorian repeat */

Referenced by localsub(), outzone(), and tzparse().

Typedef Documentation

typedef long int_fast32_t
typedef long intmax_t
typedef struct state* timezone_t
typedef unsigned long uintmax_t

Function Documentation

struct tm* localtime_rz ( timezone_t  restrict,
time_t const *  restrict,
struct tm restrict 
)
time_t mktime_z ( timezone_t  restrict,
struct tm restrict 
)
Please use a compiler that supports a bit integer type ( or  wider)

Referenced by addtt(), outzone(), and writezone().

timezone_t tzalloc ( char const *  )

References zoneinit().

void tzfree ( timezone_t  )

Variable Documentation

you may need to compile with DHAVE_STDINT_H typedef long int_fast64_t
time_t const time_t_max = MAXVAL(time_t, TYPE_BIT(time_t))
static
time_t const time_t_min = MINVAL(time_t, TYPE_BIT(time_t))
static
you may need to compile with DHAVE_STDINT_H typedef unsigned long uint_fast64_t

Referenced by detzcode64().