mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 23:23:02 +01:00
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
This commit is contained in:
parent
8ae57bbe91
commit
e7624082a4
@ -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 ###############################
|
dnl ############################# INITIALISATION ###############################
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ if test "$ac_cv_func_dirname" = "no"; then
|
|||||||
unset ac_cv_func_dirname
|
unset ac_cv_func_dirname
|
||||||
AC_CHECK_FUNCS(dirname)],, $LIBS)
|
AC_CHECK_FUNCS(dirname)],, $LIBS)
|
||||||
fi
|
fi
|
||||||
AC_CHECK_FUNCS(sigaction)
|
AC_CHECK_FUNCS(sigaction setitimer)
|
||||||
AC_CHECK_FUNCS(snprintf)
|
AC_CHECK_FUNCS(snprintf)
|
||||||
AC_FUNC_MMAP
|
AC_FUNC_MMAP
|
||||||
AC_CHECK_FUNCS(atexit on_exit)
|
AC_CHECK_FUNCS(atexit on_exit)
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
#define HAVE_STRICMP
|
#define HAVE_STRICMP
|
||||||
#define HAVE_DIRNAME
|
#define HAVE_DIRNAME
|
||||||
#undef HAVE_SIGACTION
|
#undef HAVE_SIGACTION
|
||||||
|
#undef HAVE_SETITIMER
|
||||||
#define HAVE_SNPRINTF
|
#define HAVE_SNPRINTF
|
||||||
#undef HAVE_MMAP
|
#undef HAVE_MMAP
|
||||||
#undef HAVE_ATEXIT
|
#undef HAVE_ATEXIT
|
||||||
|
@ -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:
|
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
||||||
@ -67,6 +67,7 @@
|
|||||||
#undef HAVE_STRICMP
|
#undef HAVE_STRICMP
|
||||||
#undef HAVE_DIRNAME
|
#undef HAVE_DIRNAME
|
||||||
#undef HAVE_SIGACTION
|
#undef HAVE_SIGACTION
|
||||||
|
#undef HAVE_SETITIMER
|
||||||
#undef HAVE_SNPRINTF
|
#undef HAVE_SNPRINTF
|
||||||
#undef HAVE_MMAP
|
#undef HAVE_MMAP
|
||||||
#undef HAVE_ATEXIT
|
#undef HAVE_ATEXIT
|
||||||
|
@ -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 "firebird.h"
|
||||||
#include "../jrd/ib_stdio.h"
|
#include "../jrd/ib_stdio.h"
|
||||||
@ -130,7 +130,6 @@ extern int h_errno;
|
|||||||
#include "../remote/tcptypes.h"
|
#include "../remote/tcptypes.h"
|
||||||
#include <ib_perror.h>
|
#include <ib_perror.h>
|
||||||
#include <socket.h>
|
#include <socket.h>
|
||||||
#define NO_ITIMER
|
|
||||||
#define NO_FORK
|
#define NO_FORK
|
||||||
#define MAX_PTYPE ptype_batch_send
|
#define MAX_PTYPE ptype_batch_send
|
||||||
#define PROXY_FILE "[sysmgr]gds_proxy.dat"
|
#define PROXY_FILE "[sysmgr]gds_proxy.dat"
|
||||||
@ -143,7 +142,6 @@ extern int h_errno;
|
|||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "../utilities/install_nt.h"
|
#include "../utilities/install_nt.h"
|
||||||
#define NO_ITIMER
|
|
||||||
#define ERRNO WSAGetLastError()
|
#define ERRNO WSAGetLastError()
|
||||||
#define H_ERRNO WSAGetLastError()
|
#define H_ERRNO WSAGetLastError()
|
||||||
#define SOCLOSE closesocket
|
#define SOCLOSE closesocket
|
||||||
@ -3764,14 +3762,14 @@ static bool_t packet_send( PORT port, SCHAR * buffer, SSHORT buffer_length)
|
|||||||
SSHORT n, length, count;
|
SSHORT n, length, count;
|
||||||
SCHAR *data;
|
SCHAR *data;
|
||||||
|
|
||||||
#ifndef NO_ITIMER
|
#ifdef HAVE_SETITIMER
|
||||||
struct itimerval internal_timer, client_timer;
|
struct itimerval internal_timer, client_timer;
|
||||||
#ifdef HAVE_SIGACTION
|
#ifdef HAVE_SIGACTION
|
||||||
struct sigaction internal_handler, client_handler;
|
struct sigaction internal_handler, client_handler;
|
||||||
#else
|
#else
|
||||||
struct sigvec internal_handler, client_handler;
|
struct sigvec internal_handler, client_handler;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif /* HAVE_SETITIMER */
|
||||||
|
|
||||||
data = buffer;
|
data = buffer;
|
||||||
length = buffer_length;
|
length = buffer_length;
|
||||||
@ -3821,14 +3819,14 @@ static bool_t packet_send( PORT port, SCHAR * buffer, SSHORT buffer_length)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NO_ITIMER
|
#ifndef HAVE_SETITIMER
|
||||||
#ifdef WIN_NT
|
#ifdef WIN_NT
|
||||||
SleepEx(50, TRUE);
|
SleepEx(50, TRUE);
|
||||||
#else
|
#else
|
||||||
sleep(1);
|
sleep(1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#else
|
#else /* HAVE_SETITIMER */
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
{
|
{
|
||||||
/* Wait in a loop until the lock becomes available */
|
/* 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
|
#endif
|
||||||
setitimer(ITIMER_REAL, &client_timer, NULL);
|
setitimer(ITIMER_REAL, &client_timer, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* HAVE_SETITIMER */
|
||||||
|
|
||||||
THREAD_ENTER;
|
THREAD_ENTER;
|
||||||
if (n == -1) {
|
if (n == -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user