mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +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/backend/storage/lmgr/proc.c,v 1.129 2003/02/18 02:13:24 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.130 2003/05/15 16:35:29 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -944,6 +944,9 @@ ProcSendSignal(BackendId procId)
|
||||
bool
|
||||
enable_sig_alarm(int delayms, bool is_statement_timeout)
|
||||
{
|
||||
#ifdef WIN32
|
||||
# warning add Win32 timer
|
||||
#else
|
||||
struct timeval fin_time;
|
||||
#ifndef __BEOS__
|
||||
struct itimerval timeval;
|
||||
@@ -1012,7 +1015,7 @@ enable_sig_alarm(int delayms, bool is_statement_timeout)
|
||||
if (set_alarm(time_interval, B_ONE_SHOT_RELATIVE_ALARM) < 0)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1026,6 +1029,9 @@ enable_sig_alarm(int delayms, bool is_statement_timeout)
|
||||
bool
|
||||
disable_sig_alarm(bool is_statement_timeout)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#warning add Win32 timer
|
||||
#else
|
||||
/*
|
||||
* Always disable the interrupt if it is active; this avoids being
|
||||
* interrupted by the signal handler and thereby possibly getting
|
||||
@@ -1065,7 +1071,7 @@ disable_sig_alarm(bool is_statement_timeout)
|
||||
if (!CheckStatementTimeout())
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1098,6 +1104,9 @@ CheckStatementTimeout(void)
|
||||
else
|
||||
{
|
||||
/* Not time yet, so (re)schedule the interrupt */
|
||||
#ifdef WIN32
|
||||
#warning add win32 timer
|
||||
#else
|
||||
#ifndef __BEOS__
|
||||
struct itimerval timeval;
|
||||
|
||||
@@ -1120,6 +1129,7 @@ CheckStatementTimeout(void)
|
||||
(statement_fin_time.tv_usec - now.tv_usec);
|
||||
if (set_alarm(time_interval, B_ONE_SHOT_RELATIVE_ALARM) < 0)
|
||||
return false;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user