diff options
author | Bruce Momjian | 2011-04-24 00:27:57 +0000 |
---|---|---|
committer | Bruce Momjian | 2011-04-24 00:28:29 +0000 |
commit | f6322b31918c5c57eeea80c26a088af44d573095 (patch) | |
tree | d53beb69589d91811c9d74a47c84cf37a569542f | |
parent | 795c382e8caf27f9db2fb09d12384b8183280fee (diff) |
In pg_upgrade, only compile copy_file() on non-Win32 systems.
Per report from Andrew Dunstan.
-rw-r--r-- | contrib/pg_upgrade/file.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c index f8f7233593..0552541c24 100644 --- a/contrib/pg_upgrade/file.c +++ b/contrib/pg_upgrade/file.c @@ -12,9 +12,10 @@ #include <fcntl.h> -static int copy_file(const char *fromfile, const char *tofile, bool force); -#ifdef WIN32 +#ifndef WIN32 +static int copy_file(const char *fromfile, const char *tofile, bool force); +#else static int win32_pghardlink(const char *src, const char *dst); #endif @@ -126,6 +127,7 @@ linkAndUpdateFile(pageCnvCtx *pageConverter, } +#ifndef WIN32 static int copy_file(const char *srcfile, const char *dstfile, bool force) { @@ -220,6 +222,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force) return 1; } +#endif /* |