Thread
Commits
-
Silence compiler warning, hopefully.
- 847561c1d5e2 9.4.24 landed
- caa22d72a5f0 9.5.19 landed
- e480d8350be1 9.6.15 landed
- 8a4fa297a5dd 10.10 landed
- ee9417a04fba 11.5 landed
- 533522846ba0 12.0 landed
- 421466863548 13.0 landed
-
Sync our copy of the timezone library with IANA release tzcode2019b.
- f285322f9cd3 13.0 cited
-
pgsql: Sync our copy of the timezone library with IANA release tzcode20
Tom Lane <tgl@sss.pgh.pa.us> — 2019-07-17T22:26:45Z
Sync our copy of the timezone library with IANA release tzcode2019b. A large fraction of this diff is just due to upstream's somewhat random decision to rename a bunch of internal variables and struct fields. However, there is an interesting new feature in zic: it's grown a "-b slim" option that emits zone files without 32-bit data and other backwards-compatibility hacks. We should consider whether we wish to enable that. Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f285322f9cd3145ea2e5b870e6ba7e0c641422ac Modified Files -------------- src/timezone/README | 7 +- src/timezone/localtime.c | 89 +++++----- src/timezone/pgtz.h | 6 +- src/timezone/tzfile.h | 17 +- src/timezone/zic.c | 453 +++++++++++++++++++++++++---------------------- 5 files changed, 305 insertions(+), 267 deletions(-)
-
Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20
Michael Paquier <michael@paquier.xyz> — 2019-07-19T03:53:47Z
Hi Tom, (moving to -hackers) On Wed, Jul 17, 2019 at 10:26:45PM +0000, Tom Lane wrote: > Sync our copy of the timezone library with IANA release tzcode2019b. > > A large fraction of this diff is just due to upstream's somewhat > random decision to rename a bunch of internal variables and struct > fields. However, there is an interesting new feature in zic: > it's grown a "-b slim" option that emits zone files without 32-bit > data and other backwards-compatibility hacks. We should consider > whether we wish to enable that. This is causing a compilation warning on Windows: https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=whelk&dt=2019-07-19%2001%3A41%3A13&stg=make "C:\buildfarm\buildenv\HEAD\pgsql.build\pgsql.sln" (Standardziel) (1) -> "C:\buildfarm\buildenv\HEAD\pgsql.build\zic.vcxproj" (Standardziel) (72) -> src/timezone/zic.c(2401): warning C4804: '-' : unsafe use of type 'bool' in operation [C:\buildfarm\buildenv\HEAD\pgsql.build\zic.vcxproj] Buildfarm members using VS like whelk complains about that, and I can see the warning myself. -- Michael
-
Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20
Tom Lane <tgl@sss.pgh.pa.us> — 2019-07-19T04:06:01Z
Michael Paquier <michael@paquier.xyz> writes: > This is causing a compilation warning on Windows: > src/timezone/zic.c(2401): warning C4804: '-' : unsafe use of type > 'bool' in operation Hmmm ... the code looks like bool locut, hicut; ... thistimecnt = -locut - hicut; so I think your compiler has a point. I shall complain to upstream. At best, it's really unobvious what this code is meant to do, and at worst (eg, depending on whether bool promotes to signed or unsigned int) the results are unportable. regards, tom lane -
Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20
Tom Lane <tgl@sss.pgh.pa.us> — 2019-07-19T18:56:34Z
I wrote: > Michael Paquier <michael@paquier.xyz> writes: >> This is causing a compilation warning on Windows: > ...so I think your compiler has a point. I shall complain to upstream. The IANA folk want to fix it like this: diff --git a/zic.c b/zic.c index 8bf5628..a84703a 100644 --- a/zic.c +++ b/zic.c @@ -2145,7 +2145,7 @@ writezone(const char *const name, const char *const string, char version, } if (pass == 1 && !want_bloat()) { utcnt = stdcnt = thisleapcnt = 0; - thistimecnt = - locut - hicut; + thistimecnt = - (locut + hicut); thistypecnt = thischarcnt = 1; thistimelim = thistimei; } I'm not quite convinced whether that will silence the warning, but at least it's a bit less unreadable. regards, tom lane -
Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20
Michael Paquier <michael@paquier.xyz> — 2019-07-20T09:17:33Z
On Fri, Jul 19, 2019 at 02:56:34PM -0400, Tom Lane wrote: > I'm not quite convinced whether that will silence the warning, but > at least it's a bit less unreadable. Thanks for working with upstream on this. From what I can see, woodlouse & friends do not complain anymore. -- Michael