mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win' add -lwsock32 on Win32 make gethostname() be only used when kerberos4 is enabled use /port/getopt.c new /port/opendir.c routines disable GUC unix_socket_group on Win32 convert some keywords.c symbols to KEYWORD_P to prevent conflict create new FCNTL_NONBLOCK macro to turn off socket blocking create new /include/port.h file that has /port prototypes, move out of c.h new /include/port/win32_include dir to hold missing include files work around ERROR being defined in Win32 includes
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.240 2003/05/05 00:44:56 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.241 2003/05/15 16:35:30 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -719,17 +719,7 @@ update_db_info(PGconn *conn)
|
||||
static int
|
||||
connectMakeNonblocking(PGconn *conn)
|
||||
{
|
||||
#if defined(WIN32) || defined(__BEOS__)
|
||||
int on = 1;
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
if (ioctlsocket(conn->sock, FIONBIO, &on) != 0)
|
||||
#elif defined(__BEOS__)
|
||||
if (ioctl(conn->sock, FIONBIO, &on) != 0)
|
||||
#else
|
||||
if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0)
|
||||
#endif
|
||||
if (FCNTL_NONBLOCK(conn->sock) < 0)
|
||||
{
|
||||
printfPQExpBuffer(&conn->errorMessage,
|
||||
libpq_gettext("could not set socket to non-blocking mode: %s\n"),
|
||||
|
Reference in New Issue
Block a user