mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
Autoconf: check for aio.h, pread and pwrite
This commit is contained in:
parent
29e90114c8
commit
7fe24dd9a8
@ -1,4 +1,4 @@
|
|||||||
dnl $Id: configure.in,v 1.80 2002-11-12 13:15:10 eku Exp $
|
dnl $Id: configure.in,v 1.81 2002-11-12 13:46:06 eku Exp $
|
||||||
|
|
||||||
dnl ############################# INITIALISATION ###############################
|
dnl ############################# INITIALISATION ###############################
|
||||||
|
|
||||||
@ -178,6 +178,7 @@ AC_CHECK_HEADERS(unistd.h)
|
|||||||
AC_CHECK_HEADERS(varargs.h)
|
AC_CHECK_HEADERS(varargs.h)
|
||||||
AC_CHECK_HEADERS(crypt.h)
|
AC_CHECK_HEADERS(crypt.h)
|
||||||
AC_CHECK_HEADERS(netinet/in.h rpc/rpc.h netconfig.h rpc/xdr.h)
|
AC_CHECK_HEADERS(netinet/in.h rpc/rpc.h netconfig.h rpc/xdr.h)
|
||||||
|
AC_CHECK_HEADERS(aio.h)
|
||||||
|
|
||||||
dnl Check for libraries
|
dnl Check for libraries
|
||||||
AC_CHECK_LIB(dl, main)
|
AC_CHECK_LIB(dl, main)
|
||||||
@ -250,6 +251,7 @@ AC_CHECK_FUNCS(flock)
|
|||||||
AC_CHECK_FUNCS(initgroups)
|
AC_CHECK_FUNCS(initgroups)
|
||||||
AC_CHECK_FUNCS(getpagesize)
|
AC_CHECK_FUNCS(getpagesize)
|
||||||
AC_CHECK_FUNCS(xdr_hyper)
|
AC_CHECK_FUNCS(xdr_hyper)
|
||||||
|
AC_CHECK_FUNCS(pread pwrite)
|
||||||
|
|
||||||
|
|
||||||
dnl Check for other things
|
dnl Check for other things
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
#undef HAVE_NETINET_IN_H
|
#undef HAVE_NETINET_IN_H
|
||||||
#undef HAVE_RPC_RPC_H
|
#undef HAVE_RPC_RPC_H
|
||||||
#undef HAVE_RPC_XDR_H
|
#undef HAVE_RPC_XDR_H
|
||||||
|
#undef HAVE_AIO_H
|
||||||
|
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
@ -98,6 +99,8 @@
|
|||||||
#undef HAVE_INITGROUPS
|
#undef HAVE_INITGROUPS
|
||||||
#undef HAVE_GETPAGESIZE
|
#undef HAVE_GETPAGESIZE
|
||||||
#undef HAVE_XDR_HYPER
|
#undef HAVE_XDR_HYPER
|
||||||
|
#undef HAVE_PREAD
|
||||||
|
#undef HAVE_PWRITE
|
||||||
|
|
||||||
/* Types */
|
/* Types */
|
||||||
#undef socklen_t
|
#undef socklen_t
|
||||||
|
@ -41,10 +41,14 @@
|
|||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_AIO_H
|
||||||
|
#include <aio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../jrd/jrd.h"
|
#include "../jrd/jrd.h"
|
||||||
#include "../jrd/pio.h"
|
#include "../jrd/pio.h"
|
||||||
@ -68,19 +72,12 @@
|
|||||||
|
|
||||||
/* SUPERSERVER uses a mutex to allow atomic seek/read(write) sequences.
|
/* SUPERSERVER uses a mutex to allow atomic seek/read(write) sequences.
|
||||||
SUPERSERVER_V2 uses "positioned" read (write) calls to avoid a seek
|
SUPERSERVER_V2 uses "positioned" read (write) calls to avoid a seek
|
||||||
and allow multiple threads to overlap database I/O.
|
and allow multiple threads to overlap database I/O. */
|
||||||
17-Oct-1996 Enabled positioned I/O calls on SOLARIS Superserver. */
|
#if defined SUPERSERVER
|
||||||
|
#if (defined PREAD && defined PWRITE) || defined HAVE_AIO_H
|
||||||
#if (defined SUPERSERVER && (defined SOLARIS_MT || defined LINUX))
|
|
||||||
#define PREAD_PWRITE
|
#define PREAD_PWRITE
|
||||||
#if !(defined SOLARIS_MT || defined LINUX)
|
#endif
|
||||||
/* pread() and pwrite() function calls are provided on SOLARIS.
|
#endif
|
||||||
The aio_read(), aio_*() etc. calls are not implemented on
|
|
||||||
the HP-UX systems. Once it is implemented, this #include could
|
|
||||||
be enabled only for HP-UX systems (POSIX). */
|
|
||||||
#include <aio.h>
|
|
||||||
#endif /* SOLARIS_MT */
|
|
||||||
#endif /* SUPERSERVER && (SOLARIS_MT || LINUX) */
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -123,22 +120,20 @@ extern "C" {
|
|||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EINTR
|
|
||||||
#define EINTR 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SUPERSERVER
|
#ifdef SUPERSERVER
|
||||||
#define MASK 0600
|
#define MASK 0600
|
||||||
#else
|
#else
|
||||||
#define MASK 0666
|
#define MASK 0666
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int errno;
|
|
||||||
|
|
||||||
static void close_marker_file(TEXT *);
|
static void close_marker_file(TEXT *);
|
||||||
static FIL seek_file(FIL, BDB, UINT64 *, STATUS *);
|
static FIL seek_file(FIL, BDB, UINT64 *, STATUS *);
|
||||||
static FIL setup_file(DBB, TEXT *, USHORT, int);
|
static FIL setup_file(DBB, TEXT *, USHORT, int);
|
||||||
static BOOLEAN unix_error(TEXT *, FIL, STATUS, STATUS *);
|
static BOOLEAN unix_error(TEXT *, FIL, STATUS, STATUS *);
|
||||||
|
#if defined PREAD_PWRITE && !(defined HAVE_PREAD && defined HAVE_PWRITE)
|
||||||
|
static SLONG pread(int, SCHAR *, SLONG, SLONG);
|
||||||
|
static SLONG pwrite(int, SCHAR *, SLONG, SLONG);
|
||||||
|
#endif
|
||||||
#ifdef SUPPORT_RAW_DEVICES
|
#ifdef SUPPORT_RAW_DEVICES
|
||||||
static BOOLEAN raw_devices_check_file (TEXT *);
|
static BOOLEAN raw_devices_check_file (TEXT *);
|
||||||
static BOOLEAN raw_devices_validate_database (int, TEXT *, USHORT);
|
static BOOLEAN raw_devices_validate_database (int, TEXT *, USHORT);
|
||||||
@ -1113,7 +1108,7 @@ static BOOLEAN unix_error(
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ((defined PREAD_PWRITE) && !(defined SOLARIS_MT || defined LINUX))
|
#if defined PREAD_PWRITE && !(defined HAVE_PREAD && defined HAVE_PWRITE)
|
||||||
|
|
||||||
/* pread() and pwrite() behave like read() and write() except that they
|
/* pread() and pwrite() behave like read() and write() except that they
|
||||||
take an additional 'offset' argument. The I/O takes place at the specified
|
take an additional 'offset' argument. The I/O takes place at the specified
|
||||||
@ -1126,7 +1121,7 @@ static BOOLEAN unix_error(
|
|||||||
using the POSIX asynchronous I/O calls.
|
using the POSIX asynchronous I/O calls.
|
||||||
|
|
||||||
NOTE: pread() and pwrite() are defined in UNIX International system
|
NOTE: pread() and pwrite() are defined in UNIX International system
|
||||||
interface and are a part of Solaris 2.
|
interface and are a part of POSIX systems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static SLONG pread(int fd, SCHAR * buf, SLONG nbytes, SLONG offset)
|
static SLONG pread(int fd, SCHAR * buf, SLONG nbytes, SLONG offset)
|
||||||
@ -1195,7 +1190,8 @@ static SLONG pwrite(int fd, SCHAR * buf, SLONG nbytes, SLONG offset)
|
|||||||
return (aio_return(&io)); /* return I/O status */
|
return (aio_return(&io)); /* return I/O status */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined PREAD_PWRITE && ! (defined SOLARIS_MT || LINUX) */
|
#endif /* PREAD_PWRITE && !(HAVE_PREAD && HAVE_PWRITE)*/
|
||||||
|
|
||||||
|
|
||||||
int PIO_unlink (
|
int PIO_unlink (
|
||||||
TEXT *file_name)
|
TEXT *file_name)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#ident "$Id: config.h.in,v 1.54 2002-11-12 13:15:13 eku Exp $"
|
#ident "$Id: config.h.in,v 1.55 2002-11-12 13:46:11 eku Exp $"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
||||||
@ -54,6 +54,7 @@
|
|||||||
#undef HAVE_NETINET_IN_H
|
#undef HAVE_NETINET_IN_H
|
||||||
#undef HAVE_RPC_RPC_H
|
#undef HAVE_RPC_RPC_H
|
||||||
#undef HAVE_RPC_XDR_H
|
#undef HAVE_RPC_XDR_H
|
||||||
|
#undef HAVE_AIO_H
|
||||||
|
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
@ -79,6 +80,8 @@
|
|||||||
#undef HAVE_INITGROUPS
|
#undef HAVE_INITGROUPS
|
||||||
#undef HAVE_GETPAGESIZE
|
#undef HAVE_GETPAGESIZE
|
||||||
#undef HAVE_XDR_HYPER
|
#undef HAVE_XDR_HYPER
|
||||||
|
#undef HAVE_PREAD
|
||||||
|
#undef HAVE_PWRITE
|
||||||
|
|
||||||
|
|
||||||
/* Types */
|
/* Types */
|
||||||
|
Loading…
Reference in New Issue
Block a user