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