summaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/pg_basebackup.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2016-04-29 07:59:47 -0400
committerAndrew Dunstan <andrew@dunslane.net>2016-04-29 08:09:07 -0400
commit0fb54de9aa4ffb792ea63af853146021ae501f12 (patch)
tree143d27120773629c601894184c065b1eef12ba9b /src/bin/pg_basebackup/pg_basebackup.c
parent59455018a8120bb3c02680b0f9764492c5283d99 (diff)
Support building with Visual Studio 2015
Adjust the way we detect the locale. As a result the minumum Windows version supported by VS2015 and later is Windows Vista. Add some tweaks to remove new compiler warnings. Remove documentation references to the now obsolete msysGit. Michael Paquier, somewhat edited by me, reviewed by Christian Ullrich. Backpatch to 9.5
Diffstat (limited to 'src/bin/pg_basebackup/pg_basebackup.c')
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 5676d501229..2927b60cc2d 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1830,6 +1830,11 @@ BaseBackup(void)
int r;
#else
DWORD status;
+ /*
+ * get a pointer sized version of bgchild to avoid warnings about
+ * casting to a different size on WIN64.
+ */
+ intptr_t bgchild_handle = bgchild;
uint32 hi,
lo;
#endif
@@ -1892,7 +1897,7 @@ BaseBackup(void)
InterlockedIncrement(&has_xlogendptr);
/* First wait for the thread to exit */
- if (WaitForSingleObjectEx((HANDLE) bgchild, INFINITE, FALSE) !=
+ if (WaitForSingleObjectEx((HANDLE) bgchild_handle, INFINITE, FALSE) !=
WAIT_OBJECT_0)
{
_dosmaperr(GetLastError());
@@ -1900,7 +1905,7 @@ BaseBackup(void)
progname, strerror(errno));
disconnect_and_exit(1);
}
- if (GetExitCodeThread((HANDLE) bgchild, &status) == 0)
+ if (GetExitCodeThread((HANDLE) bgchild_handle, &status) == 0)
{
_dosmaperr(GetLastError());
fprintf(stderr, _("%s: could not get child thread exit status: %s\n"),