1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +03:00

Assorted minor changes to silence Windows compiler warnings.

Mostly to do with macro redefinitions or object signedness.
This commit is contained in:
Andrew Dunstan
2011-04-25 12:56:53 -04:00
parent 7762288744
commit 860be17ec3
10 changed files with 44 additions and 16 deletions

View File

@ -23,7 +23,7 @@ pg_set_noblock(pgsocket sock)
#if !defined(WIN32)
return (fcntl(sock, F_SETFL, O_NONBLOCK) != -1);
#else
long ioctlsocket_ret = 1;
unsigned long ioctlsocket_ret = 1;
/* Returns non-0 on failure, while fcntl() returns -1 on failure */
return (ioctlsocket(sock, FIONBIO, &ioctlsocket_ret) == 0);
@ -42,7 +42,7 @@ pg_set_block(pgsocket sock)
return false;
return true;
#else
long ioctlsocket_ret = 0;
unsigned long ioctlsocket_ret = 0;
/* Returns non-0 on failure, while fcntl() returns -1 on failure */
return (ioctlsocket(sock, FIONBIO, &ioctlsocket_ret) == 0);