Blame lib/time-internal.h

Packit 33f14e
/* Time internal interface
Packit 33f14e
Packit 33f14e
   Copyright 2015-2017 Free Software Foundation, Inc.
Packit 33f14e
Packit 33f14e
   This program is free software; you can redistribute it and/or modify
Packit 33f14e
   it under the terms of the GNU General Public License as published by
Packit 33f14e
   the Free Software Foundation; either version 3, or (at your option)
Packit 33f14e
   any later version.
Packit 33f14e
Packit 33f14e
   This program is distributed in the hope that it will be useful,
Packit 33f14e
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 33f14e
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 33f14e
   GNU General Public License for more details.
Packit 33f14e
Packit 33f14e
   You should have received a copy of the GNU General Public License along
Packit 33f14e
   with this program; if not, see <http://www.gnu.org/licenses/>.  */
Packit 33f14e
Packit 33f14e
/* Written by Paul Eggert.  */
Packit 33f14e
Packit 33f14e
/* A time zone rule.  */
Packit 33f14e
struct tm_zone
Packit 33f14e
{
Packit 33f14e
  /* More abbreviations, should they be needed.  Their TZ_IS_SET
Packit 33f14e
     members are zero.  */
Packit 33f14e
  struct tm_zone *next;
Packit 33f14e
Packit 33f14e
#if HAVE_TZNAME && !HAVE_TM_ZONE
Packit 33f14e
  /* Copies of recent strings taken from tzname[0] and tzname[1].
Packit 33f14e
     The copies are in ABBRS, so that they survive tzset.  Null if unknown.  */
Packit 33f14e
  char *tzname_copy[2];
Packit 33f14e
#endif
Packit 33f14e
Packit 33f14e
  /* If nonzero, the rule represents the TZ environment variable set
Packit 33f14e
     to the first "abbreviation" (this may be the empty string).
Packit 33f14e
     Otherwise, it represents an unset TZ.  */
Packit 33f14e
  char tz_is_set;
Packit 33f14e
Packit 33f14e
  /* A sequence of null-terminated strings packed next to each other.
Packit 33f14e
     The strings are followed by an extra null byte.  If TZ_IS_SET,
Packit 33f14e
     there must be at least one string and the first string (which is
Packit 33f14e
     actually a TZ environment value) may be empty.  Otherwise all
Packit 33f14e
     strings must be nonempty.
Packit 33f14e
Packit 33f14e
     Abbreviations are stored here because otherwise the values of
Packit 33f14e
     tm_zone and/or tzname would be dead after changing TZ and calling
Packit 33f14e
     tzset.  Abbreviations never move once allocated, and are live
Packit 33f14e
     until tzfree is called.  */
Packit 33f14e
  char abbrs[FLEXIBLE_ARRAY_MEMBER];
Packit 33f14e
};