* Tom Lane wrote:
Christian Ullrich <ch...@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
Ah-hah, that explains things nicely. The previous coding in dolink()
wasn't so dependent on link() returning a valid errno on failure.
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
Yes, of course. If only I had known about it ...
New patch attached.
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
new file mode 100644
*** 3485,3491 ****
--- 3485,3494 ----
link(const char *oldpath, const char *newpath)
if (!CopyFile(oldpath, newpath, false))
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: