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:
@ -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);
|
||||
|
Reference in New Issue
Block a user