Skip to content

Commit

Permalink
Update timezone code from tzcode 2018i.
Browse files Browse the repository at this point in the history
This patch updates files coming from tzcode to the versions in tzcode
2018i.  No changes elsewhere in glibc were needed.

Tested for x86_64.

	* timezone/zdump.c: Update from tzcode 2018i.
	* timezone/zic.c: Likewise.
  • Loading branch information
jsm28 committed Dec 31, 2018
1 parent 9b7f98b commit e740e5b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2018-12-31 Joseph Myers <[email protected]>

* timezone/zdump.c: Update from tzcode 2018i.
* timezone/zic.c: Likewise.

2018-12-31 Paul Eggert <[email protected]>

regex: improve Gnulib port to AIX
Expand Down
4 changes: 3 additions & 1 deletion timezone/zdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,10 @@ my_snprintf(char *s, size_t size, char const *format, ...)
arglen = strlen(arg);
} else {
n = vsprintf(buf, format, args);
if (n < 0)
if (n < 0) {
va_end(args);
return n;
}
arg = buf;
arglen = n;
}
Expand Down
8 changes: 4 additions & 4 deletions timezone/zic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,7 @@ error(_("can't determine time zone abbreviation to use just after until time"));
if (attypes[i].at > lastat->at)
lastat = &attypes[i];
if (lastat->at < rpytime(&xr, max_year - 1)) {
addtt(rpytime(&xr, max_year + 1), typecnt-1);
addtt(rpytime(&xr, max_year + 1), lastat->type);
attypes[timecnt - 1].dontmerge = true;
}
}
Expand Down Expand Up @@ -2945,7 +2945,7 @@ lowerit(char a)
}

/* case-insensitive equality */
static bool
static ATTRIBUTE_PURE bool
ciequal(register const char *ap, register const char *bp)
{
while (lowerit(*ap) == lowerit(*bp++))
Expand All @@ -2954,7 +2954,7 @@ ciequal(register const char *ap, register const char *bp)
return false;
}

static bool
static ATTRIBUTE_PURE bool
itsabbr(register const char *abbr, register const char *word)
{
if (lowerit(*abbr) != lowerit(*word))
Expand All @@ -2970,7 +2970,7 @@ itsabbr(register const char *abbr, register const char *word)

/* Return true if ABBR is an initial prefix of WORD, ignoring ASCII case. */

static bool
static ATTRIBUTE_PURE bool
ciprefix(char const *abbr, char const *word)
{
do
Expand Down

0 comments on commit e740e5b

Please sign in to comment.