mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Autoconf cleanup:
o use predefined macros to test for sys/wait.h, time.h and sys/time.h o search strcasecmp in libresolv only if strcasecmp and stricmp are not in libc o use predefined macro AC_SYS_LARGEFILE to determine 64Bit I/O o determine the alignment of long and double (ALIGNMENT,DOUBLE_ALIGN), still need to write a test for FB_ALIGN!
This commit is contained in:
parent
5e3a6fea4a
commit
ef2ff91438
55
configure.in
55
configure.in
@ -1,4 +1,4 @@
|
||||
dnl $Id: configure.in,v 1.44 2002-09-17 05:58:33 eku Exp $
|
||||
dnl $Id: configure.in,v 1.45 2002-09-18 12:50:01 eku Exp $
|
||||
|
||||
dnl ############################# INITIALISATION ###############################
|
||||
|
||||
@ -110,9 +110,8 @@ AC_CHECK_HEADERS(pthread.h)
|
||||
AC_CHECK_HEADERS(sys/types.h)
|
||||
AC_CHECK_HEADERS(sys/stat.h)
|
||||
AC_CHECK_HEADERS(sys/uio.h)
|
||||
AC_CHECK_HEADERS(sys/wait.h)
|
||||
AC_CHECK_HEADERS(time.h)
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(sys/timeb.h)
|
||||
AC_CHECK_HEADERS(sys/param.h)
|
||||
AC_CHECK_HEADERS(sys/ioctl.h)
|
||||
@ -168,7 +167,7 @@ if test "$ac_cv_func_connect" = "no"; then
|
||||
AC_CHECK_LIB(socket, connect, XE_APPEND(-lsocket,LIBS),, $LIBS)
|
||||
fi
|
||||
AC_CHECK_FUNCS(strcasecmp stricmp)
|
||||
if test "$ac_cv_func_strcasecmp" = "no"; then
|
||||
if test "$ac_cv_func_strcasecmp" = "no" -a "$ac_cv_func_stricmp" = "no"; then
|
||||
dnl EKU: On SINIX-Z strcasecmp is in libresolv.
|
||||
AC_CHECK_LIB(resolv, strcasecmp,
|
||||
[XE_APPEND(-lresolv,LIBS)
|
||||
@ -199,12 +198,44 @@ AC_C_CONST dnl EKU: we should replace the CONST define in the source!!!
|
||||
AC_C_VOLATILE
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_TYPE(socklen_t,int)
|
||||
AC_CHECK_TYPE(off64_t,
|
||||
[UNIX_64_BIT_IO=Y
|
||||
AC_DEFINE(UNIX_64_BIT_IO)],
|
||||
[UNIX_64_BIT_IO=N])
|
||||
AC_SYS_LARGEFILE
|
||||
AC_CHECK_SIZEOF(void*)
|
||||
|
||||
dnl EKU: try to determine the alignment of long and double
|
||||
dnl replaces ALIGNMENT and DOUBLE_ALIGN in src/jrd/common.h
|
||||
AC_MSG_CHECKING(alignment of long)
|
||||
AC_TRY_RUN([main () {
|
||||
struct s {
|
||||
char a;
|
||||
long b;
|
||||
};
|
||||
exit((int)&((struct s*)0)->b);
|
||||
}], ac_cv_c_alignment=$ac_status, ac_cv_c_alignment=$ac_status)
|
||||
AC_MSG_RESULT($ac_cv_c_alignment)
|
||||
AC_DEFINE_UNQUOTED(ALIGNMENT,$ac_cv_c_alignment)
|
||||
|
||||
AC_MSG_CHECKING(alignment of double)
|
||||
AC_TRY_RUN([main () {
|
||||
struct s {
|
||||
char a;
|
||||
double b;
|
||||
};
|
||||
exit((int)&((struct s*)0)->b);
|
||||
}], ac_cv_c_double_align=$ac_status, ac_cv_c_double_align=$ac_status)
|
||||
AC_MSG_RESULT($ac_cv_c_double_align)
|
||||
AC_DEFINE_UNQUOTED(DOUBLE_ALIGN,$ac_cv_c_double_align)
|
||||
|
||||
dnl EKU: don't know how to convert this into an autoconf test:
|
||||
dnl #define FB_ALIGN(n,b) ...
|
||||
dnl
|
||||
dnl VMS (n) -> no
|
||||
dnl sun_68k ((n+1) & ~1) -> even
|
||||
dnl XENIX ((n+1) & ~1) -> even
|
||||
dnl netware_386 ((n+1) & ~1) -> even
|
||||
dnl all others ((n + b - 1) & ~(b - 1)) -> multiple of b
|
||||
dnl
|
||||
dnl volunters are welcome!
|
||||
|
||||
dnl ##################### DO NOT ADD ANY TESTS BELOW ###########################
|
||||
|
||||
dnl The following file defines the version number strings
|
||||
@ -460,9 +491,9 @@ case $PROD_BUILD_FLG in
|
||||
N) echo " Debug : enabled";;
|
||||
esac
|
||||
|
||||
case $UNIX_64_BIT_IO in
|
||||
Y) echo " 64 bit I/O : enabled";;
|
||||
N) echo " 64 bit I/O : disabled";;
|
||||
case $ac_cv_sys_file_offset_bits in
|
||||
no) echo " 64 bit I/O : disabled";;
|
||||
64) echo " 64 bit I/O : enabled";;
|
||||
esac
|
||||
|
||||
if test "$FIREBIRD_ARCH_TYPE" = "classic"; then
|
||||
|
@ -26,7 +26,16 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include "../burp/burp.h"
|
||||
#ifdef WIN_NT
|
||||
#include <windows.h>
|
||||
|
@ -37,7 +37,16 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include "../burp/spit.h"
|
||||
#include "../burp/burpswi.h"
|
||||
|
||||
|
@ -64,12 +64,19 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
#include <sys/timeb.h>
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
@ -83,8 +90,15 @@
|
||||
//}
|
||||
//#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -23,7 +23,16 @@
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include "ib_util.h"
|
||||
#include "ib_udf.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ident "$Id: autoconfig_msvc.h,v 1.28 2002-09-17 05:58:34 eku Exp $"
|
||||
#ident "$Id: autoconfig_msvc.h,v 1.29 2002-09-18 12:50:02 eku Exp $"
|
||||
|
||||
/*
|
||||
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
||||
@ -39,6 +39,7 @@
|
||||
#define HAVE_SYS_STAT_H
|
||||
#undef HAVE_SYS_UIO_H
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
#define HAVE_TIME_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#define HAVE_SYS_TIMEB_H
|
||||
@ -81,11 +82,18 @@
|
||||
#undef GETTIMEOFDAY_RETURNS_TIMEZONE
|
||||
|
||||
/* Are we doing 64bit IO on unix */
|
||||
#undef UNIX_64_BIT_IO
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* sizeof(void *) = 8 ==> HAS_64BIT_POINTERS */
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
/* alignment of long */
|
||||
#define ALIGNMENT 4
|
||||
|
||||
/* alignment of double */
|
||||
#define DOUBLE_ALIGN 4
|
||||
|
||||
/* Functions */
|
||||
#define snprintf _snprintf
|
||||
|
||||
|
@ -24,7 +24,16 @@
|
||||
#include <shellapi.h>
|
||||
#include <prsht.h>
|
||||
#include <commctrl.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include "../iscguard/iscguard.rh"
|
||||
#include "../iscguard/iscguard.h"
|
||||
#include "../iscguard/cntlg_proto.h"
|
||||
|
@ -28,7 +28,16 @@
|
||||
#include "../jrd/ib_stdio.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include <bios.h>
|
||||
#include <ctype.h>
|
||||
#include <io.h>
|
||||
|
@ -31,7 +31,9 @@
|
||||
#include "../jrd/common.h"
|
||||
|
||||
#ifdef WIN_NT
|
||||
#include <sys/timeb.h>
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
#define TEXT SCHAR
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@
|
||||
* 2002.04.16 Paul Beach - HP10 and unistd.h
|
||||
*/
|
||||
/*
|
||||
$Id: common.h,v 1.28 2002-09-17 05:58:35 eku Exp $
|
||||
$Id: common.h,v 1.29 2002-09-18 12:50:03 eku Exp $
|
||||
*/
|
||||
|
||||
#ifndef JRD_COMMON_H
|
||||
@ -117,7 +117,6 @@ typedef RETSIGTYPE (*SIG_FPTR) (int);
|
||||
#include <sys/mman.h>
|
||||
#include <sys/socket.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -154,8 +153,8 @@ int shutdown(int s, int how);
|
||||
#define QUADFORMAT "ll"
|
||||
#define QUADCONST(n) (n##LL)
|
||||
|
||||
#define ALIGNMENT 4
|
||||
#define DOUBLE_ALIGN 8
|
||||
/*#define ALIGNMENT 4*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
|
||||
#ifdef SUPERSERVER
|
||||
@ -194,8 +193,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#endif
|
||||
#define __LINE__IS_INT
|
||||
#define SLONGFORMAT "ld"
|
||||
#define ALIGNMENT 4
|
||||
#define DOUBLE_ALIGN 4
|
||||
/*#define ALIGNMENT 4*/
|
||||
/*#define DOUBLE_ALIGN 4*/
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define BSD_UNIX 1
|
||||
#define UNIX 1
|
||||
@ -231,8 +230,8 @@ typedef RETSIGTYPE (*SIG_FPTR) (int);
|
||||
#ifdef FREEBSD
|
||||
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 4
|
||||
#define DOUBLE_ALIGN 4
|
||||
/*#define ALIGNMENT 4*/
|
||||
/*#define DOUBLE_ALIGN 4*/
|
||||
|
||||
#define UNIX 1
|
||||
#define IEEE 1
|
||||
@ -257,8 +256,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
|
||||
#if defined(__i386__)
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 4
|
||||
#define DOUBLE_ALIGN 4
|
||||
/*#define ALIGNMENT 4*/
|
||||
/*#define DOUBLE_ALIGN 4*/
|
||||
|
||||
#define IEEE 1
|
||||
#define I386 1
|
||||
@ -377,9 +376,9 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
|
||||
#ifdef sparc
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 4
|
||||
/*#define ALIGNMENT 4*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_sun4 /* 30 */
|
||||
#define DOUBLE_ALIGN 8
|
||||
#define INTL
|
||||
#else /* sparc */
|
||||
|
||||
@ -415,8 +414,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define INTL
|
||||
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 8
|
||||
#define DOUBLE_ALIGN 8
|
||||
/*#define ALIGNMENT 8*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_hp_ux /* 31 */
|
||||
|
||||
#define IEEE
|
||||
@ -455,8 +454,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#ifdef mips
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_mips_ult /* 36 */
|
||||
#define IEEE
|
||||
#define ALIGNMENT 4
|
||||
#define DOUBLE_ALIGN 8
|
||||
/*#define ALIGNMENT 4*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#else
|
||||
#define CTO32L(p) (*(long*) p)
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_vax_ultr /* 26 */
|
||||
@ -522,7 +521,7 @@ typedef RETSIGTYPE (API_ROUTINE * SIG_FPTR) ();
|
||||
#ifdef VMS
|
||||
#define VAX_FLOAT 1
|
||||
#define FB_ALIGN(n,b) (n)
|
||||
#define ALIGNMENT 4
|
||||
/*#define ALIGNMENT 4*/
|
||||
#define NO_NFS
|
||||
#define CTO32L(p) (*(long*)p)
|
||||
#define NO_CHECKSUM 1
|
||||
@ -558,7 +557,7 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define UNIX 1
|
||||
#define CURSES_KEYPAD 1
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 4
|
||||
/*#define ALIGNMENT 4*/
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_rt_aix /* 35 */
|
||||
#define IEEE
|
||||
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
|
||||
@ -573,7 +572,7 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define UNIX 1
|
||||
#define CURSES_KEYPAD 1
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 4
|
||||
/*#define ALIGNMENT 4*/
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_rt_aix /* 35 */
|
||||
#define IEEE
|
||||
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
|
||||
@ -739,9 +738,9 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define CURSES_KEYPAD 1
|
||||
#ifndef DG_X86
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 8
|
||||
/*#define ALIGNMENT 8*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_dg /* 38 */
|
||||
#define DOUBLE_ALIGN 8
|
||||
#else
|
||||
#define IMPLEMENTATION isc_info_db_impl_dg_x86 /* 58 */
|
||||
#define I386 1
|
||||
@ -767,8 +766,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define KILLER_SIGNALS
|
||||
#define UNIX 1
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 8
|
||||
#define DOUBLE_ALIGN 8
|
||||
/*#define ALIGNMENT 8*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#define IMPLEMENTATION isc_info_db_impl_alpha_osf /* 52 */
|
||||
#define IEEE
|
||||
|
||||
@ -796,9 +795,9 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define UNIX 1
|
||||
#define CURSES_KEYPAD 1
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#define ALIGNMENT 8
|
||||
/*#define ALIGNMENT 8*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#define IMPLEMENTATION isc_info_db_impl_isc_sgi /* 41 */
|
||||
#define DOUBLE_ALIGN 8
|
||||
#define IEEE
|
||||
#define INTL
|
||||
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
|
||||
@ -927,14 +926,15 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#ifdef I386
|
||||
/* Using internal alignment optimal for 386 processor and above
|
||||
*/
|
||||
#define ALIGNMENT 4
|
||||
#define DOUBLE_ALIGN 8
|
||||
/*#define ALIGNMENT 4*/
|
||||
/*#define DOUBLE_ALIGN 8*/
|
||||
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ALIGNMENT
|
||||
#define ALIGNMENT 2
|
||||
/*#define ALIGNMENT 2*/
|
||||
#error must define ALIGNMENT for your system
|
||||
#endif
|
||||
|
||||
#ifndef SHIFTLONG
|
||||
@ -945,7 +945,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#endif
|
||||
|
||||
#ifndef DOUBLE_ALIGN
|
||||
#define DOUBLE_ALIGN 4
|
||||
/*#define DOUBLE_ALIGN 4*/
|
||||
#error must define DOUBLE_ALIGN for your system
|
||||
#endif
|
||||
|
||||
|
||||
@ -973,12 +974,6 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define FAILURE 1
|
||||
|
||||
|
||||
/* Enable 64 bit io for unix platforms if UNIX_64_BIT_IO macro is set. */
|
||||
#ifdef UNIX_64_BIT_IO
|
||||
#define _FILE_OFFSET_BITS 64 /* Enable 64 bit IO functions */
|
||||
#endif
|
||||
|
||||
|
||||
/* data type definitions */
|
||||
|
||||
|
||||
|
@ -58,8 +58,18 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#ifdef DARWIN
|
||||
#include </usr/include/time.h>
|
||||
#endif
|
||||
|
@ -31,11 +31,20 @@
|
||||
* to count virtual operations, not real I/O on the underlying tables.
|
||||
*/
|
||||
/*
|
||||
$Id: exe.cpp,v 1.15 2002-09-17 05:58:35 eku Exp $
|
||||
$Id: exe.cpp,v 1.16 2002-09-18 12:50:03 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "../jrd/common.h"
|
||||
#include "../jrd/ibsetjmp.h"
|
||||
|
@ -4768,7 +4768,8 @@ static void init(void)
|
||||
if (!getrlimit(RLIMIT_NOFILE, &old) && old.rlim_cur < old.rlim_max) {
|
||||
new_.rlim_cur = new_.rlim_max = old.rlim_max;
|
||||
if (!setrlimit(RLIMIT_NOFILE, &new_))
|
||||
#if (defined UNIX_64_BIT_IO && defined SOLARIS)
|
||||
{
|
||||
#if _FILE_OFFSET_BITS == 64 && defined SOLARIS
|
||||
gds__log("64 bit i/o support is on.");
|
||||
gds__log("Open file limit increased from %lld to %lld",
|
||||
old.rlim_cur, new_.rlim_cur);
|
||||
@ -4777,6 +4778,7 @@ static void init(void)
|
||||
gds__log("Open file limit increased from %d to %d",
|
||||
old.rlim_cur, new_.rlim_cur);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -42,8 +42,19 @@
|
||||
#include "../jrd/ib_stdio.h"
|
||||
#include <assert.h>
|
||||
#include "../jrd/mov.c"
|
||||
#include <sys/time.h>
|
||||
#include <sys/timeb.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
|
||||
#define TEST_REPEATS 6 /* Number of times to repeat timing */
|
||||
|
@ -35,7 +35,16 @@
|
||||
|
||||
#include "firebird.h"
|
||||
#include <dos.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
|
||||
|
@ -36,12 +36,12 @@
|
||||
#include "../jrd/perf_proto.h"
|
||||
#include "../jrd/gdsassert.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIMES_H
|
||||
#include <sys/times.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
@ -70,7 +70,16 @@ struct tms {
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -21,13 +21,22 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
/*
|
||||
$Id: pwd.cpp,v 1.6 2002-08-12 11:32:25 dimitr Exp $
|
||||
$Id: pwd.cpp,v 1.7 2002-09-18 12:50:03 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include "../jrd/gds.h"
|
||||
#include "../jrd/jrd.h"
|
||||
#include "../jrd/pwd.h"
|
||||
|
@ -66,8 +66,14 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
@ -26,17 +26,23 @@
|
||||
#define _JRD_TIME_H_
|
||||
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#ifdef DARWIN
|
||||
#include </usr/include/time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBIO_H /* was linux only - I really wonder if it is actuall y needed*/
|
||||
#include <libio.h>
|
||||
#endif
|
||||
|
@ -935,7 +935,7 @@ static FIL seek_file(FIL file, BDB bdb, UINT64 * offset, STATUS * status_vector)
|
||||
lseek_offset = page;
|
||||
lseek_offset *= dbb->dbb_page_size;
|
||||
|
||||
#ifndef UNIX_64_BIT_IO
|
||||
#if _FILE_OFFSET_BITS != 64
|
||||
if (lseek_offset > MAX_SLONG) {
|
||||
return (FIL) unix_error ("lseek", file, isc_io_32bit_exceeded_err, status_vector);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: lock.cpp,v 1.11 2002-09-11 11:30:44 eku Exp $
|
||||
$Id: lock.cpp,v 1.12 2002-09-18 12:50:04 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -54,12 +54,25 @@ $Id: lock.cpp,v 1.11 2002-09-11 11:30:44 eku Exp $
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ident "$Id: config.h.in,v 1.33 2002-09-17 05:58:36 eku Exp $"
|
||||
#ident "$Id: config.h.in,v 1.34 2002-09-18 12:50:04 eku Exp $"
|
||||
|
||||
/*
|
||||
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
||||
@ -29,6 +29,7 @@
|
||||
#undef HAVE_SYS_STAT_H
|
||||
#undef HAVE_SYS_UIO_H
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
#undef HAVE_TIME_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#undef HAVE_SYS_TIMEB_H
|
||||
@ -71,11 +72,18 @@
|
||||
#undef GETTIMEOFDAY_RETURNS_TIMEZONE
|
||||
|
||||
/* Are we doing 64bit IO on unix */
|
||||
#undef UNIX_64_BIT_IO
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* sizeof(void *) = 8 ==> HAS_64BIT_POINTERS */
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
/* alignment of long */
|
||||
#define ALIGNMENT 4
|
||||
|
||||
/* alignment of double */
|
||||
#define DOUBLE_ALIGN 4
|
||||
|
||||
/* Is the platform big endian? */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
|
@ -32,19 +32,21 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "../jrd/common.h"
|
||||
#include "../jrd/gds.h"
|
||||
#include "../jrd/gds_proto.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
DATABASE DB = "msg.gdb";
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: inet.cpp,v 1.18 2002-08-26 12:13:22 eku Exp $
|
||||
$Id: inet.cpp,v 1.19 2002-09-18 12:50:04 eku Exp $
|
||||
*/
|
||||
#include "firebird.h"
|
||||
#include "../jrd/ib_stdio.h"
|
||||
@ -281,7 +281,9 @@ static struct ipccfg INET_tcp_delay[] =
|
||||
|
||||
#ifndef REQUESTER
|
||||
#ifdef DEBUG
|
||||
#include <sys/timeb.h>
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
#define TRACE_packets (1 << 0) /* bit 0 */
|
||||
#define TRACE_operations (1 << 1) /* bit 1 */
|
||||
#define TRACE_summary (1 << 2) /* bit 2 */
|
||||
|
@ -23,7 +23,7 @@
|
||||
* FSG 16.03.2001
|
||||
*/
|
||||
/*
|
||||
$Id: inet_server.cpp,v 1.9 2002-09-08 07:56:50 dimitr Exp $
|
||||
$Id: inet_server.cpp,v 1.10 2002-09-18 12:50:04 eku Exp $
|
||||
*/
|
||||
#include "firebird.h"
|
||||
#include "../jrd/ib_stdio.h"
|
||||
@ -39,16 +39,29 @@ $Id: inet_server.cpp,v 1.9 2002-09-08 07:56:50 dimitr Exp $
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
|
@ -18,7 +18,16 @@
|
||||
*/
|
||||
#include "firebird.h"
|
||||
#include <nwsnut.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include <signal.h>
|
||||
#include <process.h>
|
||||
#include <conio.h>
|
||||
|
@ -30,7 +30,16 @@
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../jrd/ib_stdio.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
/*
|
||||
$Id: drop.cpp,v 1.8 2002-08-26 13:20:05 eku Exp $
|
||||
$Id: drop.cpp,v 1.9 2002-09-18 12:50:05 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -50,8 +50,14 @@ $Id: drop.cpp,v 1.8 2002-08-26 13:20:05 eku Exp $
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
|
@ -20,7 +20,7 @@
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
* $Id: srvrmgr.cpp,v 1.4 2002-08-26 12:18:12 eku Exp $
|
||||
* $Id: srvrmgr.cpp,v 1.5 2002-09-18 12:50:05 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -32,7 +32,15 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
|
||||
#include "../jrd/common.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
/*
|
||||
$Id: util.cpp,v 1.6 2002-09-11 11:30:45 eku Exp $
|
||||
$Id: util.cpp,v 1.7 2002-09-18 12:50:05 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -47,8 +47,14 @@ $Id: util.cpp,v 1.6 2002-09-11 11:30:45 eku Exp $
|
||||
#include <wait.h> /* for waitpid() */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h> /* for waitpid() */
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -21,13 +21,22 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
/*
|
||||
$Id: apifull.c,v 1.1 2001-07-23 16:05:46 skywalker Exp $
|
||||
$Id: apifull.c,v 1.2 2002-09-18 12:50:05 eku Exp $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <ibase.h>
|
||||
#include "align.h"
|
||||
|
@ -23,7 +23,16 @@
|
||||
====================================================================== */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <ibase.h>
|
||||
|
@ -30,11 +30,31 @@
|
||||
#include <string.h>
|
||||
#include "../jrd/common.h"
|
||||
|
||||
#if !(defined WIN_NT)
|
||||
#include <sys/time.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WIN_NT
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
|
@ -48,8 +48,14 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
#ifndef NETWARE_386
|
||||
|
Loading…
Reference in New Issue
Block a user