aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-29 10:40:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-29 10:40:08 -0400
commit6d257e732b358ee601a114fe3d1640a46317e554 (patch)
treeab37d421e9ea15ef2c6e860605cdba9bf2de71a8 /src
parent656ee8489053aafc85324b9ef7e91b645674ffb9 (diff)
downloadpostgresql-6d257e732b358ee601a114fe3d1640a46317e554.tar.gz
postgresql-6d257e732b358ee601a114fe3d1640a46317e554.zip
Fix zic for Windows.
The new coding of dolink() is dependent on link() returning an on-point errno when it fails; but the quick-hack implementation of link() that we'd put in for Windows didn't bother with setting errno. Fix that. Analysis and patch by Christian Ullrich.
Diffstat (limited to 'src')
-rw-r--r--src/timezone/zic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index 8d4347a47a3..f9cbac9f006 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -3485,7 +3485,10 @@ int
link(const char *oldpath, const char *newpath)
{
if (!CopyFile(oldpath, newpath, false))
+ {
+ _dosmaperr(GetLastError());
return -1;
+ }
return 0;
}
#endif