Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c. - Mailing list pgsql-hackers

From Christian Ullrich
Subject Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.
Date
Msg-id 56FA8D1E.1090709@chrullrich.net
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.
List pgsql-hackers
* Tom Lane wrote:

> Christian Ullrich <chris@chrullrich.net> writes:

>> Anyway, I think Michael's fix is wrong. The bug is that the Win32
>> version of link() (at the bottom of zic.c) does not set errno if its
>> attempt to copy the file fails, so what dolink() puts into link_errno is
>> bogus.
>
> Ah-hah, that explains things nicely.  The previous coding in dolink()
> wasn't so dependent on link() returning a valid errno on failure.
>
>> Patch attached.
>
> But then, should not this code make sure that errno *always* gets set?

A library function that does not fail does not touch errno. This link()
replacement is an honorary library function, so neither should it.

> I'd be inclined to think we should use _dosmaperr(), too, rather than
> hand-coding it.

Yes, of course. If only I had known about it ...

New patch attached.

--
Christian


Attachment

pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: POC, WIP: OR-clause support for indexes
Next
From: David Steele
Date:
Subject: Re: dealing with extension dependencies that aren't quite 'e'