mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Create typedef pgsocket for storing socket descriptors.
This silences some warnings on Win64. Not using the proper SOCKET datatype was actually wrong on Win32 as well, but didn't cause any warnings there. Also create define PGINVALID_SOCKET to indicate an invalid/non-existing socket, instead of using a hardcoded -1 value.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/port/noblock.c,v 1.14 2010/01/02 16:58:13 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/port/noblock.c,v 1.15 2010/01/10 14:16:08 mha Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
bool
|
||||
pg_set_noblock(int sock)
|
||||
pg_set_noblock(pgsocket sock)
|
||||
{
|
||||
#if !defined(WIN32)
|
||||
return (fcntl(sock, F_SETFL, O_NONBLOCK) != -1);
|
||||
@ -32,7 +32,7 @@ pg_set_noblock(int sock)
|
||||
|
||||
|
||||
bool
|
||||
pg_set_block(int sock)
|
||||
pg_set_block(pgsocket sock)
|
||||
{
|
||||
#if !defined(WIN32)
|
||||
int flags;
|
||||
|
Reference in New Issue
Block a user