diff -cr postgresql-snapshot-030210/src/backend/libpq/pqsignal.c postgresql-win32-mha/src/backend/libpq/pqsignal.c *** postgresql-snapshot-030210/src/backend/libpq/pqsignal.c Sun Feb 8 23:28:56 2004 --- postgresql-win32-mha/src/backend/libpq/pqsignal.c Tue Feb 10 23:00:16 2004 *************** *** 429,436 **** /* Console control handler will execute on a thread created by the OS at the time of invocation */ static BOOL WINAPI pg_console_handler(DWORD dwCtrlType) { - printf("Console handler being called!\n"); - fflush(stdout); if (dwCtrlType == CTRL_C_EVENT || dwCtrlType == CTRL_BREAK_EVENT || dwCtrlType == CTRL_CLOSE_EVENT || --- 429,434 ---- diff -cr postgresql-snapshot-030210/src/backend/port/win32/Makefile postgresql-win32-mha/src/backend/port/win32/Makefile *** postgresql-snapshot-030210/src/backend/port/win32/Makefile Sat Nov 29 20:51:54 2003 --- postgresql-win32-mha/src/backend/port/win32/Makefile Thu Feb 12 20:27:41 2004 *************** *** 12,18 **** top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global ! OBJS = sema.o shmem.o all: SUBSYS.o --- 12,18 ---- top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global ! OBJS = sema.o shmem.o timer.o all: SUBSYS.o diff -cr postgresql-snapshot-030210/src/backend/storage/lmgr/proc.c postgresql-win32-mha/src/backend/storage/lmgr/proc.c *** postgresql-snapshot-030210/src/backend/storage/lmgr/proc.c Sun Feb 8 23:28:56 2004 --- postgresql-win32-mha/src/backend/storage/lmgr/proc.c Thu Feb 12 20:35:00 2004 *************** *** 972,980 **** bool enable_sig_alarm(int delayms, bool is_statement_timeout) { - #ifdef WIN32 - #warning add Win32 timer - #else struct timeval fin_time; #ifndef __BEOS__ --- 972,977 ---- *************** *** 1045,1051 **** if (set_alarm(time_interval, B_ONE_SHOT_RELATIVE_ALARM) < 0) return false; #endif - #endif return true; } --- 1042,1047 ---- *************** *** 1059,1068 **** 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 --- 1055,1060 ---- *************** *** 1102,1108 **** if (!CheckStatementTimeout()) return false; } - #endif return true; } --- 1094,1099 ---- *************** *** 1135,1143 **** else { /* Not time yet, so (re)schedule the interrupt */ - #ifdef WIN32 - #warning add win32 timer - #else #ifndef __BEOS__ struct itimerval timeval; --- 1126,1131 ---- *************** *** 1160,1166 **** (statement_fin_time.tv_usec - now.tv_usec); if (set_alarm(time_interval, B_ONE_SHOT_RELATIVE_ALARM) < 0) return false; - #endif #endif } --- 1148,1153 ---- diff -cr postgresql-snapshot-030210/src/include/port/win32.h postgresql-win32-mha/src/include/port/win32.h *** postgresql-snapshot-030210/src/include/port/win32.h Sun Feb 8 23:28:57 2004 --- postgresql-win32-mha/src/include/port/win32.h Thu Feb 12 21:14:19 2004 *************** *** 132,137 **** --- 132,146 ---- int tz_dsttime; /* Nonzero if DST is ever in effect. */ }; + /* for setitimer in backend/port/win32/timer.c */ + #define ITIMER_REAL 0 + struct itimerval { + struct timeval it_interval; + struct timeval it_value; + }; + int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue); + + /* FROM SRA */ /*