TimeVals.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
Definitions private to the Implementation of <time.h>.
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Portions derived from the NIH time zone package files,
which contain the following notice:
This file is in the public domain, so clarified as of
1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
**/
#ifndef _TIMEVAL_H
#define _TIMEVAL_H
extern char * tzname[2];
extern const char gmt[4];
extern const char wildabbr[9];
extern const int year_lengths[2];
extern long int timezone;
extern int daylight;
#define EFI_UNSPECIFIED_TIMEZONE 0x07FF
/*
** The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
** We default to US rules as of 1999-08-17.
** POSIX 1003.1 section 8.1.1 says that the default DST rules are
** implementation dependent; for historical reasons, US rules are a
** common default.
*/
#ifndef TZDEFRULESTRING
#define TZDEFRULESTRING ",M4.1.0,M10.5.0"
#endif
// Facilities for external time-zone definition files do not currently exist
#define NO_ZONEINFO_FILES
#define EPOCH_DAY 5
#define DAY_TO_uSEC 86400000000
/* Rule type values for the r_type member of a rule structure */
#define JULIAN_DAY 0 /* Jn - Julian day */
#ifdef TZNAME_MAX
#define MY_TZNAME_MAX TZNAME_MAX
#endif /* defined TZNAME_MAX */
#ifndef TZNAME_MAX
#define MY_TZNAME_MAX 255
#endif /* !defined TZNAME_MAX */
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b))
#ifndef INITIALIZE
#define INITIALIZE(x) ((x) = 0)
#endif /* !defined INITIALIZE */
struct ttinfo { /* time type information */
int tt_isdst; /* used to set tm_isdst */
int tt_abbrind; /* abbreviation list index */
int tt_ttisstd; /* TRUE if transition is std time */
int tt_ttisgmt; /* TRUE if transition is UTC */
};
struct lsinfo { /* leap second information */
};
struct state {
int leapcnt;
int timecnt;
int typecnt;
int charcnt;
unsigned char types[TZ_MAX_TIMES];
};
struct rule {
int r_type; /* type of rule--see below */
int r_day; /* day number of rule */
int r_week; /* week number of rule */
int r_mon; /* month number of rule */
};
#define JULIAN_DAY 0 /* Jn - Julian day */
extern void tzset(void);
#endif /* _TIMEVAL_H */