From e7624082a4e4aa39d14a50883f7a9094d9c70103 Mon Sep 17 00:00:00 2001 From: eku Date: Thu, 14 Nov 2002 07:35:52 +0000 Subject: [PATCH] Autoconf cleanup: o added tests for setitimer o updated config.h.in and autoconfig_msvc.h (the latter may be incorrect) o replaced NO_ITIMER with HAVE_SETITIMER --- configure.in | 4 ++-- src/include/gen/autoconfig_msvc.h | 1 + src/make.new/config/config.h.in | 3 ++- src/remote/inet.cpp | 14 ++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configure.in b/configure.in index e868a2b572..2f804bac95 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.85 2002-11-14 06:53:17 eku Exp $ +dnl $Id: configure.in,v 1.86 2002-11-14 07:35:50 eku Exp $ dnl ############################# INITIALISATION ############################### @@ -300,7 +300,7 @@ if test "$ac_cv_func_dirname" = "no"; then unset ac_cv_func_dirname AC_CHECK_FUNCS(dirname)],, $LIBS) fi -AC_CHECK_FUNCS(sigaction) +AC_CHECK_FUNCS(sigaction setitimer) AC_CHECK_FUNCS(snprintf) AC_FUNC_MMAP AC_CHECK_FUNCS(atexit on_exit) diff --git a/src/include/gen/autoconfig_msvc.h b/src/include/gen/autoconfig_msvc.h index a40771d49a..02d73ba3e6 100644 --- a/src/include/gen/autoconfig_msvc.h +++ b/src/include/gen/autoconfig_msvc.h @@ -86,6 +86,7 @@ #define HAVE_STRICMP #define HAVE_DIRNAME #undef HAVE_SIGACTION +#undef HAVE_SETITIMER #define HAVE_SNPRINTF #undef HAVE_MMAP #undef HAVE_ATEXIT diff --git a/src/make.new/config/config.h.in b/src/make.new/config/config.h.in index 6692516bcb..84ff41f298 100644 --- a/src/make.new/config/config.h.in +++ b/src/make.new/config/config.h.in @@ -1,4 +1,4 @@ -#ident "$Id: config.h.in,v 1.57 2002-11-13 12:27:47 eku Exp $" +#ident "$Id: config.h.in,v 1.58 2002-11-14 07:35:51 eku Exp $" /* * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports: @@ -67,6 +67,7 @@ #undef HAVE_STRICMP #undef HAVE_DIRNAME #undef HAVE_SIGACTION +#undef HAVE_SETITIMER #undef HAVE_SNPRINTF #undef HAVE_MMAP #undef HAVE_ATEXIT diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index ce5fe9da98..c15b3dd3c7 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -41,7 +41,7 @@ * */ /* -$Id: inet.cpp,v 1.39 2002-11-14 06:48:09 eku Exp $ +$Id: inet.cpp,v 1.40 2002-11-14 07:35:51 eku Exp $ */ #include "firebird.h" #include "../jrd/ib_stdio.h" @@ -130,7 +130,6 @@ extern int h_errno; #include "../remote/tcptypes.h" #include #include -#define NO_ITIMER #define NO_FORK #define MAX_PTYPE ptype_batch_send #define PROXY_FILE "[sysmgr]gds_proxy.dat" @@ -143,7 +142,6 @@ extern int h_errno; #include #include #include "../utilities/install_nt.h" -#define NO_ITIMER #define ERRNO WSAGetLastError() #define H_ERRNO WSAGetLastError() #define SOCLOSE closesocket @@ -3764,14 +3762,14 @@ static bool_t packet_send( PORT port, SCHAR * buffer, SSHORT buffer_length) SSHORT n, length, count; SCHAR *data; -#ifndef NO_ITIMER +#ifdef HAVE_SETITIMER struct itimerval internal_timer, client_timer; #ifdef HAVE_SIGACTION struct sigaction internal_handler, client_handler; #else struct sigvec internal_handler, client_handler; #endif -#endif +#endif /* HAVE_SETITIMER */ data = buffer; length = buffer_length; @@ -3821,14 +3819,14 @@ static bool_t packet_send( PORT port, SCHAR * buffer, SSHORT buffer_length) break; } -#ifdef NO_ITIMER +#ifndef HAVE_SETITIMER #ifdef WIN_NT SleepEx(50, TRUE); #else sleep(1); #endif } -#else +#else /* HAVE_SETITIMER */ if (count == 1) { /* Wait in a loop until the lock becomes available */ @@ -3872,7 +3870,7 @@ static bool_t packet_send( PORT port, SCHAR * buffer, SSHORT buffer_length) #endif setitimer(ITIMER_REAL, &client_timer, NULL); } -#endif +#endif /* HAVE_SETITIMER */ THREAD_ENTER; if (n == -1) {