mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
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
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user