Commit 87091cb1 authored by Magnus Hagander's avatar Magnus Hagander

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.
parent 84b6d5f3
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.190 2010/01/02 16:57:45 momjian Exp $ * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.191 2010/01/10 14:16:07 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1497,7 +1497,7 @@ ident_inet(const SockAddr remote_addr, ...@@ -1497,7 +1497,7 @@ ident_inet(const SockAddr remote_addr,
const SockAddr local_addr, const SockAddr local_addr,
char *ident_user) char *ident_user)
{ {
int sock_fd, /* File descriptor for socket on which we talk pgsocket sock_fd, /* File descriptor for socket on which we talk
* to Ident */ * to Ident */
rc; /* Return code from a locally called function */ rc; /* Return code from a locally called function */
bool ident_return; bool ident_return;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.49 2010/01/02 16:57:45 momjian Exp $ * $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.50 2010/01/10 14:16:07 mha Exp $
* *
* This file and the IPV6 implementation were initially provided by * This file and the IPV6 implementation were initially provided by
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design * Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
...@@ -656,9 +656,9 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data) ...@@ -656,9 +656,9 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data)
struct sockaddr *addr, *mask; struct sockaddr *addr, *mask;
char *ptr, *buffer = NULL; char *ptr, *buffer = NULL;
size_t n_buffer = 1024; size_t n_buffer = 1024;
int sock, fd; pgsocket sock, fd;
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
int sock6; pgsocket sock6;
#endif #endif
int i, total; int i, total;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.200 2010/01/02 16:57:45 momjian Exp $ * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.201 2010/01/10 14:16:07 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -199,9 +199,9 @@ pq_close(int code, Datum arg) ...@@ -199,9 +199,9 @@ pq_close(int code, Datum arg)
* transport layer reports connection closure, and you can be sure the * transport layer reports connection closure, and you can be sure the
* backend has exited. * backend has exited.
* *
* We do set sock to -1 to prevent any further I/O, though. * We do set sock to PGINVALID_SOCKET to prevent any further I/O, though.
*/ */
MyProcPort->sock = -1; MyProcPort->sock = PGINVALID_SOCKET;
} }
} }
...@@ -232,7 +232,7 @@ StreamDoUnlink(int code, Datum arg) ...@@ -232,7 +232,7 @@ StreamDoUnlink(int code, Datum arg)
* StreamServerPort -- open a "listening" port to accept connections. * StreamServerPort -- open a "listening" port to accept connections.
* *
* Successfully opened sockets are added to the ListenSocket[] array, * Successfully opened sockets are added to the ListenSocket[] array,
* at the first position that isn't -1. * at the first position that isn't PGINVALID_SOCKET.
* *
* RETURNS: STATUS_OK or STATUS_ERROR * RETURNS: STATUS_OK or STATUS_ERROR
*/ */
...@@ -240,10 +240,10 @@ StreamDoUnlink(int code, Datum arg) ...@@ -240,10 +240,10 @@ StreamDoUnlink(int code, Datum arg)
int int
StreamServerPort(int family, char *hostName, unsigned short portNumber, StreamServerPort(int family, char *hostName, unsigned short portNumber,
char *unixSocketName, char *unixSocketName,
int ListenSocket[], int MaxListen) pgsocket ListenSocket[], int MaxListen)
{ {
int fd, pgsocket fd;
err; int err;
int maxconn; int maxconn;
int ret; int ret;
char portNumberStr[32]; char portNumberStr[32];
...@@ -311,7 +311,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, ...@@ -311,7 +311,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
/* See if there is still room to add 1 more socket. */ /* See if there is still room to add 1 more socket. */
for (; listen_index < MaxListen; listen_index++) for (; listen_index < MaxListen; listen_index++)
{ {
if (ListenSocket[listen_index] == -1) if (ListenSocket[listen_index] == PGINVALID_SOCKET)
break; break;
} }
if (listen_index >= MaxListen) if (listen_index >= MaxListen)
...@@ -570,7 +570,7 @@ Setup_AF_UNIX(void) ...@@ -570,7 +570,7 @@ Setup_AF_UNIX(void)
* RETURNS: STATUS_OK or STATUS_ERROR * RETURNS: STATUS_OK or STATUS_ERROR
*/ */
int int
StreamConnection(int server_fd, Port *port) StreamConnection(pgsocket server_fd, Port *port)
{ {
/* accept connection and fill in the client (remote) address */ /* accept connection and fill in the client (remote) address */
port->raddr.salen = sizeof(port->raddr.addr); port->raddr.salen = sizeof(port->raddr.addr);
...@@ -676,7 +676,7 @@ StreamConnection(int server_fd, Port *port) ...@@ -676,7 +676,7 @@ StreamConnection(int server_fd, Port *port)
* we do NOT want to send anything to the far end. * we do NOT want to send anything to the far end.
*/ */
void void
StreamClose(int sock) StreamClose(pgsocket sock)
{ {
closesocket(sock); closesocket(sock);
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* *
* Copyright (c) 2001-2010, PostgreSQL Global Development Group * Copyright (c) 2001-2010, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.196 2010/01/02 16:57:50 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.197 2010/01/10 14:16:07 mha Exp $
* ---------- * ----------
*/ */
#include "postgres.h" #include "postgres.h"
...@@ -130,7 +130,7 @@ PgStat_MsgBgWriter BgWriterStats; ...@@ -130,7 +130,7 @@ PgStat_MsgBgWriter BgWriterStats;
* Local data * Local data
* ---------- * ----------
*/ */
NON_EXEC_STATIC int pgStatSock = -1; NON_EXEC_STATIC pgsocket pgStatSock = PGINVALID_SOCKET;
static struct sockaddr_storage pgStatAddr; static struct sockaddr_storage pgStatAddr;
...@@ -369,7 +369,7 @@ pgstat_init(void) ...@@ -369,7 +369,7 @@ pgstat_init(void)
(errcode_for_socket_access(), (errcode_for_socket_access(),
errmsg("could not bind socket for statistics collector: %m"))); errmsg("could not bind socket for statistics collector: %m")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
...@@ -380,7 +380,7 @@ pgstat_init(void) ...@@ -380,7 +380,7 @@ pgstat_init(void)
(errcode_for_socket_access(), (errcode_for_socket_access(),
errmsg("could not get address of socket for statistics collector: %m"))); errmsg("could not get address of socket for statistics collector: %m")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
...@@ -396,7 +396,7 @@ pgstat_init(void) ...@@ -396,7 +396,7 @@ pgstat_init(void)
(errcode_for_socket_access(), (errcode_for_socket_access(),
errmsg("could not connect socket for statistics collector: %m"))); errmsg("could not connect socket for statistics collector: %m")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
...@@ -417,7 +417,7 @@ retry1: ...@@ -417,7 +417,7 @@ retry1:
(errcode_for_socket_access(), (errcode_for_socket_access(),
errmsg("could not send test message on socket for statistics collector: %m"))); errmsg("could not send test message on socket for statistics collector: %m")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
...@@ -443,7 +443,7 @@ retry1: ...@@ -443,7 +443,7 @@ retry1:
(errcode_for_socket_access(), (errcode_for_socket_access(),
errmsg("select() failed in statistics collector: %m"))); errmsg("select() failed in statistics collector: %m")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
if (sel_res == 0 || !FD_ISSET(pgStatSock, &rset)) if (sel_res == 0 || !FD_ISSET(pgStatSock, &rset))
...@@ -458,7 +458,7 @@ retry1: ...@@ -458,7 +458,7 @@ retry1:
(errcode(ERRCODE_CONNECTION_FAILURE), (errcode(ERRCODE_CONNECTION_FAILURE),
errmsg("test message did not get through on socket for statistics collector"))); errmsg("test message did not get through on socket for statistics collector")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
...@@ -473,7 +473,7 @@ retry2: ...@@ -473,7 +473,7 @@ retry2:
(errcode_for_socket_access(), (errcode_for_socket_access(),
errmsg("could not receive test message on socket for statistics collector: %m"))); errmsg("could not receive test message on socket for statistics collector: %m")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
...@@ -483,7 +483,7 @@ retry2: ...@@ -483,7 +483,7 @@ retry2:
(errcode(ERRCODE_INTERNAL_ERROR), (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("incorrect test message transmission on socket for statistics collector"))); errmsg("incorrect test message transmission on socket for statistics collector")));
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
continue; continue;
} }
...@@ -521,7 +521,7 @@ startup_failed: ...@@ -521,7 +521,7 @@ startup_failed:
if (pgStatSock >= 0) if (pgStatSock >= 0)
closesocket(pgStatSock); closesocket(pgStatSock);
pgStatSock = -1; pgStatSock = PGINVALID_SOCKET;
/* /*
* Adjust GUC variables to suppress useless activity, and for debugging * Adjust GUC variables to suppress useless activity, and for debugging
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.599 2010/01/02 16:57:50 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.600 2010/01/10 14:16:08 mha Exp $
* *
* NOTES * NOTES
* *
...@@ -172,7 +172,7 @@ int ReservedBackends; ...@@ -172,7 +172,7 @@ int ReservedBackends;
/* The socket(s) we're listening to. */ /* The socket(s) we're listening to. */
#define MAXLISTEN 64 #define MAXLISTEN 64
static int ListenSocket[MAXLISTEN]; static pgsocket ListenSocket[MAXLISTEN];
/* /*
* Set by the -o option * Set by the -o option
...@@ -382,7 +382,7 @@ static pid_t internal_forkexec(int argc, char *argv[], Port *port); ...@@ -382,7 +382,7 @@ static pid_t internal_forkexec(int argc, char *argv[], Port *port);
#ifdef WIN32 #ifdef WIN32
typedef struct typedef struct
{ {
SOCKET origsocket; /* Original socket value, or -1 if not a SOCKET origsocket; /* Original socket value, or PGINVALID_SOCKET if not a
* socket */ * socket */
WSAPROTOCOL_INFO wsainfo; WSAPROTOCOL_INFO wsainfo;
} InheritableSocket; } InheritableSocket;
...@@ -400,7 +400,7 @@ typedef struct ...@@ -400,7 +400,7 @@ typedef struct
Port port; Port port;
InheritableSocket portsocket; InheritableSocket portsocket;
char DataDir[MAXPGPATH]; char DataDir[MAXPGPATH];
int ListenSocket[MAXLISTEN]; pgsocket ListenSocket[MAXLISTEN];
long MyCancelKey; long MyCancelKey;
int MyPMChildSlot; int MyPMChildSlot;
#ifndef WIN32 #ifndef WIN32
...@@ -807,7 +807,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -807,7 +807,7 @@ PostmasterMain(int argc, char *argv[])
* Establish input sockets. * Establish input sockets.
*/ */
for (i = 0; i < MAXLISTEN; i++) for (i = 0; i < MAXLISTEN; i++)
ListenSocket[i] = -1; ListenSocket[i] = PGINVALID_SOCKET;
if (ListenAddresses) if (ListenAddresses)
{ {
...@@ -860,7 +860,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -860,7 +860,7 @@ PostmasterMain(int argc, char *argv[])
#ifdef USE_BONJOUR #ifdef USE_BONJOUR
/* Register for Bonjour only if we opened TCP socket(s) */ /* Register for Bonjour only if we opened TCP socket(s) */
if (enable_bonjour && ListenSocket[0] != -1) if (enable_bonjour && ListenSocket[0] != PGINVALID_SOCKET)
{ {
DNSServiceErrorType err; DNSServiceErrorType err;
...@@ -908,7 +908,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -908,7 +908,7 @@ PostmasterMain(int argc, char *argv[])
/* /*
* check that we have some socket to listen on * check that we have some socket to listen on
*/ */
if (ListenSocket[0] == -1) if (ListenSocket[0] == PGINVALID_SOCKET)
ereport(FATAL, ereport(FATAL,
(errmsg("no socket created for listening"))); (errmsg("no socket created for listening")));
...@@ -1392,7 +1392,7 @@ ServerLoop(void) ...@@ -1392,7 +1392,7 @@ ServerLoop(void)
for (i = 0; i < MAXLISTEN; i++) for (i = 0; i < MAXLISTEN; i++)
{ {
if (ListenSocket[i] == -1) if (ListenSocket[i] == PGINVALID_SOCKET)
break; break;
if (FD_ISSET(ListenSocket[i], &rmask)) if (FD_ISSET(ListenSocket[i], &rmask))
{ {
...@@ -1493,7 +1493,7 @@ initMasks(fd_set *rmask) ...@@ -1493,7 +1493,7 @@ initMasks(fd_set *rmask)
{ {
int fd = ListenSocket[i]; int fd = ListenSocket[i];
if (fd == -1) if (fd == PGINVALID_SOCKET)
break; break;
FD_SET (fd, rmask); FD_SET (fd, rmask);
...@@ -2002,10 +2002,10 @@ ClosePostmasterPorts(bool am_syslogger) ...@@ -2002,10 +2002,10 @@ ClosePostmasterPorts(bool am_syslogger)
/* Close the listen sockets */ /* Close the listen sockets */
for (i = 0; i < MAXLISTEN; i++) for (i = 0; i < MAXLISTEN; i++)
{ {
if (ListenSocket[i] != -1) if (ListenSocket[i] != PGINVALID_SOCKET)
{ {
StreamClose(ListenSocket[i]); StreamClose(ListenSocket[i]);
ListenSocket[i] = -1; ListenSocket[i] = PGINVALID_SOCKET;
} }
} }
...@@ -4408,7 +4408,7 @@ extern slock_t *ProcStructLock; ...@@ -4408,7 +4408,7 @@ extern slock_t *ProcStructLock;
extern PROC_HDR *ProcGlobal; extern PROC_HDR *ProcGlobal;
extern PGPROC *AuxiliaryProcs; extern PGPROC *AuxiliaryProcs;
extern PMSignalData *PMSignalState; extern PMSignalData *PMSignalState;
extern int pgStatSock; extern pgsocket pgStatSock;
#ifndef WIN32 #ifndef WIN32
#define write_inheritable_socket(dest, src, childpid) ((*(dest) = (src)), true) #define write_inheritable_socket(dest, src, childpid) ((*(dest) = (src)), true)
...@@ -4522,7 +4522,7 @@ static bool ...@@ -4522,7 +4522,7 @@ static bool
write_inheritable_socket(InheritableSocket *dest, SOCKET src, pid_t childpid) write_inheritable_socket(InheritableSocket *dest, SOCKET src, pid_t childpid)
{ {
dest->origsocket = src; dest->origsocket = src;
if (src != 0 && src != -1) if (src != 0 && src != PGINVALID_SOCKET)
{ {
/* Actual socket */ /* Actual socket */
if (WSADuplicateSocket(src, childpid, &dest->wsainfo) != 0) if (WSADuplicateSocket(src, childpid, &dest->wsainfo) != 0)
...@@ -4544,7 +4544,7 @@ read_inheritable_socket(SOCKET *dest, InheritableSocket *src) ...@@ -4544,7 +4544,7 @@ read_inheritable_socket(SOCKET *dest, InheritableSocket *src)
{ {
SOCKET s; SOCKET s;
if (src->origsocket == -1 || src->origsocket == 0) if (src->origsocket == PGINVALID_SOCKET || src->origsocket == 0)
{ {
/* Not a real socket! */ /* Not a real socket! */
*dest = src->origsocket; *dest = src->origsocket;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.72 2010/01/02 16:58:04 momjian Exp $ * $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.73 2010/01/10 14:16:08 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -103,7 +103,7 @@ typedef struct ...@@ -103,7 +103,7 @@ typedef struct
typedef struct Port typedef struct Port
{ {
int sock; /* File descriptor */ pgsocket sock; /* File descriptor */
ProtocolVersion proto; /* FE/BE protocol version */ ProtocolVersion proto; /* FE/BE protocol version */
SockAddr laddr; /* local addr (postmaster) */ SockAddr laddr; /* local addr (postmaster) */
SockAddr raddr; /* remote addr (client) */ SockAddr raddr; /* remote addr (client) */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/libpq/libpq.h,v 1.72 2010/01/02 16:58:04 momjian Exp $ * $PostgreSQL: pgsql/src/include/libpq/libpq.h,v 1.73 2010/01/10 14:16:08 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -45,10 +45,10 @@ typedef struct ...@@ -45,10 +45,10 @@ typedef struct
* prototypes for functions in pqcomm.c * prototypes for functions in pqcomm.c
*/ */
extern int StreamServerPort(int family, char *hostName, extern int StreamServerPort(int family, char *hostName,
unsigned short portNumber, char *unixSocketName, int ListenSocket[], unsigned short portNumber, char *unixSocketName, pgsocket ListenSocket[],
int MaxListen); int MaxListen);
extern int StreamConnection(int server_fd, Port *port); extern int StreamConnection(pgsocket server_fd, Port *port);
extern void StreamClose(int sock); extern void StreamClose(pgsocket sock);
extern void TouchSocketFile(void); extern void TouchSocketFile(void);
extern void pq_init(void); extern void pq_init(void);
extern void pq_comm_reset(void); extern void pq_comm_reset(void);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/port.h,v 1.128 2010/01/02 16:58:00 momjian Exp $ * $PostgreSQL: pgsql/src/include/port.h,v 1.129 2010/01/10 14:16:08 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -17,9 +17,18 @@ ...@@ -17,9 +17,18 @@
#include <netdb.h> #include <netdb.h>
#include <pwd.h> #include <pwd.h>
/* socket has a different definition on WIN32 */
#ifndef WIN32
typedef int pgsocket;
#define PGINVALID_SOCKET -1
#else
typedef SOCKET pgsocket;
#define PGINVALID_SOCKET INVALID_SOCKET
#endif
/* non-blocking */ /* non-blocking */
extern bool pg_set_noblock(int sock); extern bool pg_set_noblock(pgsocket sock);
extern bool pg_set_block(int sock); extern bool pg_set_block(pgsocket sock);
/* Portable path handling for Unix/Win32 (in path.c) */ /* Portable path handling for Unix/Win32 (in path.c) */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * 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 @@ ...@@ -18,7 +18,7 @@
bool bool
pg_set_noblock(int sock) pg_set_noblock(pgsocket sock)
{ {
#if !defined(WIN32) #if !defined(WIN32)
return (fcntl(sock, F_SETFL, O_NONBLOCK) != -1); return (fcntl(sock, F_SETFL, O_NONBLOCK) != -1);
...@@ -32,7 +32,7 @@ pg_set_noblock(int sock) ...@@ -32,7 +32,7 @@ pg_set_noblock(int sock)
bool bool
pg_set_block(int sock) pg_set_block(pgsocket sock)
{ {
#if !defined(WIN32) #if !defined(WIN32)
int flags; int flags;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment