I have applied the attached patch which prevents copy_file() from being compiled on Win32, per report from Andrew Dunstan. copy_file() is not used on Win32 and generates a warning.
-- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c new file mode 100644 index f8f7233..0552541 *** a/contrib/pg_upgrade/file.c --- b/contrib/pg_upgrade/file.c *************** *** 12,20 **** #include <fcntl.h> - static int copy_file(const char *fromfile, const char *tofile, bool force); ! #ifdef WIN32 static int win32_pghardlink(const char *src, const char *dst); #endif --- 12,21 ---- #include <fcntl.h> ! #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 *************** linkAndUpdateFile(pageCnvCtx *pageConver *** 126,131 **** --- 127,133 ---- } + #ifndef WIN32 static int copy_file(const char *srcfile, const char *dstfile, bool force) { *************** copy_file(const char *srcfile, const cha *** 220,225 **** --- 222,228 ---- return 1; } + #endif /*
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers