1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +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:
Bruce Momjian
2003-05-15 16:35:30 +00:00
parent 2c0556068f
commit 12c9423832
39 changed files with 488 additions and 360 deletions

View File

@@ -13,7 +13,7 @@
*
* Copyright (c) 2001-2003, PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.35 2003/04/27 20:09:44 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.36 2003/05/15 16:35:29 momjian Exp $
* ----------
*/
#include "postgres.h"
@@ -217,7 +217,7 @@ pgstat_init(void)
* messages will be discarded; backends won't block waiting to send
* messages to the collector.
*/
if (fcntl(pgStatSock, F_SETFL, O_NONBLOCK) < 0)
if (FCNTL_NONBLOCK(pgStatSock) < 0)
{
elog(LOG, "PGSTAT: fcntl() failed: %m");
goto startup_failed;
@@ -1520,7 +1520,7 @@ pgstat_recvbuffer(void)
* Set the write pipe to nonblock mode, so that we cannot block when
* the collector falls behind.
*/
if (fcntl(writePipe, F_SETFL, O_NONBLOCK) < 0)
if (FCNTL_NONBLOCK(writePipe) < 0)
{
elog(LOG, "PGSTATBUFF: fcntl() failed: %m");
exit(1);