From: | Christian Ullrich <chris(at)chrullrich(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <michael(dot)paquier(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c. |
Date: | 2016-03-29 14:11:42 |
Message-ID: | 56FA8D1E.1090709@chrullrich.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
* Tom Lane wrote:
> Christian Ullrich <chris(at)chrullrich(dot)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 | Content-Type | Size |
---|---|---|
zic-link.patch | text/plain | 384 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-03-29 14:20:21 | Re: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c. |
Previous Message | Tom Lane | 2016-03-29 13:48:32 | Re: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c. |
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2016-03-29 14:15:51 | Re: dealing with extension dependencies that aren't quite 'e' |
Previous Message | David Steele | 2016-03-29 14:01:21 | Re: POC, WIP: OR-clause support for indexes |