8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +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:
eku 2002-09-18 12:50:13 +00:00
parent 5e3a6fea4a
commit ef2ff91438
35 changed files with 408 additions and 122 deletions

View File

@ -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 ############################### dnl ############################# INITIALISATION ###############################
@ -110,9 +110,8 @@ AC_CHECK_HEADERS(pthread.h)
AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/types.h)
AC_CHECK_HEADERS(sys/stat.h) AC_CHECK_HEADERS(sys/stat.h)
AC_CHECK_HEADERS(sys/uio.h) AC_CHECK_HEADERS(sys/uio.h)
AC_CHECK_HEADERS(sys/wait.h) AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(time.h) AC_HEADER_TIME
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_HEADERS(sys/timeb.h) AC_CHECK_HEADERS(sys/timeb.h)
AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/param.h)
AC_CHECK_HEADERS(sys/ioctl.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) AC_CHECK_LIB(socket, connect, XE_APPEND(-lsocket,LIBS),, $LIBS)
fi fi
AC_CHECK_FUNCS(strcasecmp stricmp) 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. dnl EKU: On SINIX-Z strcasecmp is in libresolv.
AC_CHECK_LIB(resolv, strcasecmp, AC_CHECK_LIB(resolv, strcasecmp,
[XE_APPEND(-lresolv,LIBS) [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_C_VOLATILE
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_CHECK_TYPE(socklen_t,int) AC_CHECK_TYPE(socklen_t,int)
AC_CHECK_TYPE(off64_t, AC_SYS_LARGEFILE
[UNIX_64_BIT_IO=Y
AC_DEFINE(UNIX_64_BIT_IO)],
[UNIX_64_BIT_IO=N])
AC_CHECK_SIZEOF(void*) 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 ##################### DO NOT ADD ANY TESTS BELOW ###########################
dnl The following file defines the version number strings dnl The following file defines the version number strings
@ -460,9 +491,9 @@ case $PROD_BUILD_FLG in
N) echo " Debug : enabled";; N) echo " Debug : enabled";;
esac esac
case $UNIX_64_BIT_IO in case $ac_cv_sys_file_offset_bits in
Y) echo " 64 bit I/O : enabled";; no) echo " 64 bit I/O : disabled";;
N) echo " 64 bit I/O : disabled";; 64) echo " 64 bit I/O : enabled";;
esac esac
if test "$FIREBIRD_ARCH_TYPE" = "classic"; then if test "$FIREBIRD_ARCH_TYPE" = "classic"; then

View File

@ -26,7 +26,16 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.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" #include "../burp/burp.h"
#ifdef WIN_NT #ifdef WIN_NT
#include <windows.h> #include <windows.h>

View File

@ -37,7 +37,16 @@
#include <fcntl.h> #include <fcntl.h>
#include <ctype.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/spit.h"
#include "../burp/burpswi.h" #include "../burp/burpswi.h"

View File

@ -64,12 +64,19 @@
#include <string.h> #include <string.h>
#endif #endif
#ifdef HAVE_TIME_H #if TIME_WITH_SYS_TIME
#include <time.h> # include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif #endif
#ifdef HAVE_SYS_TIMEB_H #ifdef HAVE_SYS_TIMEB_H
#include <sys/timeb.h> # include <sys/timeb.h>
#endif #endif
#ifdef HAVE_LOCALE_H #ifdef HAVE_LOCALE_H
@ -83,8 +90,15 @@
//} //}
//#endif //#endif
#ifdef HAVE_SYS_TIME_H #if TIME_WITH_SYS_TIME
#include <sys/time.h> # include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif #endif

View File

@ -23,7 +23,16 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.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_util.h"
#include "ib_udf.h" #include "ib_udf.h"

View File

@ -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: * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
@ -39,6 +39,7 @@
#define HAVE_SYS_STAT_H #define HAVE_SYS_STAT_H
#undef HAVE_SYS_UIO_H #undef HAVE_SYS_UIO_H
#undef HAVE_SYS_WAIT_H #undef HAVE_SYS_WAIT_H
#undef TIME_WITH_SYS_TIME
#define HAVE_TIME_H #define HAVE_TIME_H
#undef HAVE_SYS_TIME_H #undef HAVE_SYS_TIME_H
#define HAVE_SYS_TIMEB_H #define HAVE_SYS_TIMEB_H
@ -81,11 +82,18 @@
#undef GETTIMEOFDAY_RETURNS_TIMEZONE #undef GETTIMEOFDAY_RETURNS_TIMEZONE
/* Are we doing 64bit IO on unix */ /* 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 */ /* sizeof(void *) = 8 ==> HAS_64BIT_POINTERS */
#define SIZEOF_VOID_P 4 #define SIZEOF_VOID_P 4
/* alignment of long */
#define ALIGNMENT 4
/* alignment of double */
#define DOUBLE_ALIGN 4
/* Functions */ /* Functions */
#define snprintf _snprintf #define snprintf _snprintf

View File

@ -24,7 +24,16 @@
#include <shellapi.h> #include <shellapi.h>
#include <prsht.h> #include <prsht.h>
#include <commctrl.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.rh"
#include "../iscguard/iscguard.h" #include "../iscguard/iscguard.h"
#include "../iscguard/cntlg_proto.h" #include "../iscguard/cntlg_proto.h"

View File

@ -28,7 +28,16 @@
#include "../jrd/ib_stdio.h" #include "../jrd/ib_stdio.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.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 <bios.h>
#include <ctype.h> #include <ctype.h>
#include <io.h> #include <io.h>

View File

@ -31,7 +31,9 @@
#include "../jrd/common.h" #include "../jrd/common.h"
#ifdef WIN_NT #ifdef WIN_NT
#include <sys/timeb.h> #ifdef HAVE_SYS_TIMEB_H
# include <sys/timeb.h>
#endif
#include <winsock2.h> #include <winsock2.h>
#define TEXT SCHAR #define TEXT SCHAR
#endif #endif

View File

@ -35,7 +35,7 @@
* 2002.04.16 Paul Beach - HP10 and unistd.h * 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 #ifndef JRD_COMMON_H
@ -117,7 +117,6 @@ typedef RETSIGTYPE (*SIG_FPTR) (int);
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <string.h> #include <string.h>
#include <sys/time.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -154,8 +153,8 @@ int shutdown(int s, int how);
#define QUADFORMAT "ll" #define QUADFORMAT "ll"
#define QUADCONST(n) (n##LL) #define QUADCONST(n) (n##LL)
#define ALIGNMENT 4 /*#define ALIGNMENT 4*/
#define DOUBLE_ALIGN 8 /*#define DOUBLE_ALIGN 8*/
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#ifdef SUPERSERVER #ifdef SUPERSERVER
@ -194,8 +193,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#endif #endif
#define __LINE__IS_INT #define __LINE__IS_INT
#define SLONGFORMAT "ld" #define SLONGFORMAT "ld"
#define ALIGNMENT 4 /*#define ALIGNMENT 4*/
#define DOUBLE_ALIGN 4 /*#define DOUBLE_ALIGN 4*/
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define BSD_UNIX 1 #define BSD_UNIX 1
#define UNIX 1 #define UNIX 1
@ -231,8 +230,8 @@ typedef RETSIGTYPE (*SIG_FPTR) (int);
#ifdef FREEBSD #ifdef FREEBSD
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define ALIGNMENT 4 /*#define ALIGNMENT 4*/
#define DOUBLE_ALIGN 4 /*#define DOUBLE_ALIGN 4*/
#define UNIX 1 #define UNIX 1
#define IEEE 1 #define IEEE 1
@ -257,8 +256,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#if defined(__i386__) #if defined(__i386__)
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define ALIGNMENT 4 /*#define ALIGNMENT 4*/
#define DOUBLE_ALIGN 4 /*#define DOUBLE_ALIGN 4*/
#define IEEE 1 #define IEEE 1
#define I386 1 #define I386 1
@ -377,9 +376,9 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#ifdef sparc #ifdef sparc
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #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 IMPLEMENTATION isc_info_db_impl_isc_sun4 /* 30 */
#define DOUBLE_ALIGN 8
#define INTL #define INTL
#else /* sparc */ #else /* sparc */
@ -415,8 +414,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#define INTL #define INTL
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define ALIGNMENT 8 /*#define ALIGNMENT 8*/
#define DOUBLE_ALIGN 8 /*#define DOUBLE_ALIGN 8*/
#define IMPLEMENTATION isc_info_db_impl_isc_hp_ux /* 31 */ #define IMPLEMENTATION isc_info_db_impl_isc_hp_ux /* 31 */
#define IEEE #define IEEE
@ -455,8 +454,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#ifdef mips #ifdef mips
#define IMPLEMENTATION isc_info_db_impl_isc_mips_ult /* 36 */ #define IMPLEMENTATION isc_info_db_impl_isc_mips_ult /* 36 */
#define IEEE #define IEEE
#define ALIGNMENT 4 /*#define ALIGNMENT 4*/
#define DOUBLE_ALIGN 8 /*#define DOUBLE_ALIGN 8*/
#else #else
#define CTO32L(p) (*(long*) p) #define CTO32L(p) (*(long*) p)
#define IMPLEMENTATION isc_info_db_impl_isc_vax_ultr /* 26 */ #define IMPLEMENTATION isc_info_db_impl_isc_vax_ultr /* 26 */
@ -522,7 +521,7 @@ typedef RETSIGTYPE (API_ROUTINE * SIG_FPTR) ();
#ifdef VMS #ifdef VMS
#define VAX_FLOAT 1 #define VAX_FLOAT 1
#define FB_ALIGN(n,b) (n) #define FB_ALIGN(n,b) (n)
#define ALIGNMENT 4 /*#define ALIGNMENT 4*/
#define NO_NFS #define NO_NFS
#define CTO32L(p) (*(long*)p) #define CTO32L(p) (*(long*)p)
#define NO_CHECKSUM 1 #define NO_CHECKSUM 1
@ -558,7 +557,7 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#define UNIX 1 #define UNIX 1
#define CURSES_KEYPAD 1 #define CURSES_KEYPAD 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 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 IMPLEMENTATION isc_info_db_impl_isc_rt_aix /* 35 */
#define IEEE #define IEEE
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length) #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 UNIX 1
#define CURSES_KEYPAD 1 #define CURSES_KEYPAD 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 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 IMPLEMENTATION isc_info_db_impl_isc_rt_aix /* 35 */
#define IEEE #define IEEE
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length) #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 #define CURSES_KEYPAD 1
#ifndef DG_X86 #ifndef DG_X86
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 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_dg /* 38 */ #define IMPLEMENTATION isc_info_db_impl_isc_dg /* 38 */
#define DOUBLE_ALIGN 8
#else #else
#define IMPLEMENTATION isc_info_db_impl_dg_x86 /* 58 */ #define IMPLEMENTATION isc_info_db_impl_dg_x86 /* 58 */
#define I386 1 #define I386 1
@ -767,8 +766,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#define KILLER_SIGNALS #define KILLER_SIGNALS
#define UNIX 1 #define UNIX 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define ALIGNMENT 8 /*#define ALIGNMENT 8*/
#define DOUBLE_ALIGN 8 /*#define DOUBLE_ALIGN 8*/
#define IMPLEMENTATION isc_info_db_impl_alpha_osf /* 52 */ #define IMPLEMENTATION isc_info_db_impl_alpha_osf /* 52 */
#define IEEE #define IEEE
@ -796,9 +795,9 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#define UNIX 1 #define UNIX 1
#define CURSES_KEYPAD 1 #define CURSES_KEYPAD 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 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 IMPLEMENTATION isc_info_db_impl_isc_sgi /* 41 */
#define DOUBLE_ALIGN 8
#define IEEE #define IEEE
#define INTL #define INTL
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length) #define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
@ -927,14 +926,15 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#ifdef I386 #ifdef I386
/* Using internal alignment optimal for 386 processor and above /* Using internal alignment optimal for 386 processor and above
*/ */
#define ALIGNMENT 4 /*#define ALIGNMENT 4*/
#define DOUBLE_ALIGN 8 /*#define DOUBLE_ALIGN 8*/
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1)) #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#endif #endif
#endif #endif
#ifndef ALIGNMENT #ifndef ALIGNMENT
#define ALIGNMENT 2 /*#define ALIGNMENT 2*/
#error must define ALIGNMENT for your system
#endif #endif
#ifndef SHIFTLONG #ifndef SHIFTLONG
@ -945,7 +945,8 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#endif #endif
#ifndef DOUBLE_ALIGN #ifndef DOUBLE_ALIGN
#define DOUBLE_ALIGN 4 /*#define DOUBLE_ALIGN 4*/
#error must define DOUBLE_ALIGN for your system
#endif #endif
@ -973,12 +974,6 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#define FAILURE 1 #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 */ /* data type definitions */

View File

@ -58,8 +58,18 @@
#include <sys/types.h> #include <sys/types.h>
#endif #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 #ifdef HAVE_TIME_H
#include <time.h>
#ifdef DARWIN #ifdef DARWIN
#include </usr/include/time.h> #include </usr/include/time.h>
#endif #endif

View File

@ -31,11 +31,20 @@
* to count virtual operations, not real I/O on the underlying tables. * 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 "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/common.h"
#include "../jrd/ibsetjmp.h" #include "../jrd/ibsetjmp.h"

View File

@ -4768,7 +4768,8 @@ static void init(void)
if (!getrlimit(RLIMIT_NOFILE, &old) && old.rlim_cur < old.rlim_max) { if (!getrlimit(RLIMIT_NOFILE, &old) && old.rlim_cur < old.rlim_max) {
new_.rlim_cur = new_.rlim_max = old.rlim_max; new_.rlim_cur = new_.rlim_max = old.rlim_max;
if (!setrlimit(RLIMIT_NOFILE, &new_)) 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("64 bit i/o support is on.");
gds__log("Open file limit increased from %lld to %lld", gds__log("Open file limit increased from %lld to %lld",
old.rlim_cur, new_.rlim_cur); old.rlim_cur, new_.rlim_cur);
@ -4777,6 +4778,7 @@ static void init(void)
gds__log("Open file limit increased from %d to %d", gds__log("Open file limit increased from %d to %d",
old.rlim_cur, new_.rlim_cur); old.rlim_cur, new_.rlim_cur);
#endif #endif
}
} }
} }
#endif #endif

View File

@ -42,8 +42,19 @@
#include "../jrd/ib_stdio.h" #include "../jrd/ib_stdio.h"
#include <assert.h> #include <assert.h>
#include "../jrd/mov.c" #include "../jrd/mov.c"
#include <sys/time.h> #if TIME_WITH_SYS_TIME
#include <sys/timeb.h> # 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 */ #define TEST_REPEATS 6 /* Number of times to repeat timing */

View File

@ -35,7 +35,16 @@
#include "firebird.h" #include "firebird.h"
#include <dos.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
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*

View File

@ -36,12 +36,12 @@
#include "../jrd/perf_proto.h" #include "../jrd/perf_proto.h"
#include "../jrd/gdsassert.h" #include "../jrd/gdsassert.h"
#ifdef HAVE_SYS_TIMEB_H
#include <sys/timeb.h>
#endif
#ifdef HAVE_SYS_TIMES_H #ifdef HAVE_SYS_TIMES_H
#include <sys/times.h> #include <sys/times.h>
#endif #endif
#ifdef HAVE_SYS_TIMEB_H
# include <sys/timeb.h>
#endif
extern "C" { extern "C" {

View File

@ -70,7 +70,16 @@ struct tms {
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #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 #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -21,13 +21,22 @@
* Contributor(s): ______________________________________. * 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 "firebird.h"
#include <string.h> #include <string.h>
#include <stdlib.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/gds.h"
#include "../jrd/jrd.h" #include "../jrd/jrd.h"
#include "../jrd/pwd.h" #include "../jrd/pwd.h"

View File

@ -66,8 +66,14 @@
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#ifdef HAVE_SYS_WAIT_H #if HAVE_SYS_WAIT_H
#include <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 #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H

View File

@ -26,17 +26,23 @@
#define _JRD_TIME_H_ #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 #ifdef HAVE_TIME_H
#include <time.h>
#ifdef DARWIN #ifdef DARWIN
#include </usr/include/time.h> #include </usr/include/time.h>
#endif #endif
#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*/ #ifdef HAVE_LIBIO_H /* was linux only - I really wonder if it is actuall y needed*/
#include <libio.h> #include <libio.h>
#endif #endif

View File

@ -935,7 +935,7 @@ static FIL seek_file(FIL file, BDB bdb, UINT64 * offset, STATUS * status_vector)
lseek_offset = page; lseek_offset = page;
lseek_offset *= dbb->dbb_page_size; lseek_offset *= dbb->dbb_page_size;
#ifndef UNIX_64_BIT_IO #if _FILE_OFFSET_BITS != 64
if (lseek_offset > MAX_SLONG) { if (lseek_offset > MAX_SLONG) {
return (FIL) unix_error ("lseek", file, isc_io_32bit_exceeded_err, status_vector); return (FIL) unix_error ("lseek", file, isc_io_32bit_exceeded_err, status_vector);
} }

View File

@ -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" #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> #include <sys/types.h>
#endif #endif
#ifdef HAVE_SYS_WAIT_H #if HAVE_SYS_WAIT_H
#include <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 #endif
#ifdef HAVE_TIME_H #if TIME_WITH_SYS_TIME
#include <time.h> # include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H

View File

@ -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: * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
@ -29,6 +29,7 @@
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H
#undef HAVE_SYS_UIO_H #undef HAVE_SYS_UIO_H
#undef HAVE_SYS_WAIT_H #undef HAVE_SYS_WAIT_H
#undef TIME_WITH_SYS_TIME
#undef HAVE_TIME_H #undef HAVE_TIME_H
#undef HAVE_SYS_TIME_H #undef HAVE_SYS_TIME_H
#undef HAVE_SYS_TIMEB_H #undef HAVE_SYS_TIMEB_H
@ -71,11 +72,18 @@
#undef GETTIMEOFDAY_RETURNS_TIMEZONE #undef GETTIMEOFDAY_RETURNS_TIMEZONE
/* Are we doing 64bit IO on unix */ /* 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 */ /* sizeof(void *) = 8 ==> HAS_64BIT_POINTERS */
#define SIZEOF_VOID_P 4 #define SIZEOF_VOID_P 4
/* alignment of long */
#define ALIGNMENT 4
/* alignment of double */
#define DOUBLE_ALIGN 4
/* Is the platform big endian? */ /* Is the platform big endian? */
#undef WORDS_BIGENDIAN #undef WORDS_BIGENDIAN

View File

@ -32,19 +32,21 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#endif #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/common.h"
#include "../jrd/gds.h" #include "../jrd/gds.h"
#include "../jrd/gds_proto.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"; DATABASE DB = "msg.gdb";

View File

@ -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 "firebird.h"
#include "../jrd/ib_stdio.h" #include "../jrd/ib_stdio.h"
@ -281,7 +281,9 @@ static struct ipccfg INET_tcp_delay[] =
#ifndef REQUESTER #ifndef REQUESTER
#ifdef DEBUG #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_packets (1 << 0) /* bit 0 */
#define TRACE_operations (1 << 1) /* bit 1 */ #define TRACE_operations (1 << 1) /* bit 1 */
#define TRACE_summary (1 << 2) /* bit 2 */ #define TRACE_summary (1 << 2) /* bit 2 */

View File

@ -23,7 +23,7 @@
* FSG 16.03.2001 * 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 "firebird.h"
#include "../jrd/ib_stdio.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> #include <sys/types.h>
#endif #endif
#ifdef HAVE_SYS_TIME_H #if TIME_WITH_SYS_TIME
#include <sys/time.h> # include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_SYS_WAIT_H #if HAVE_SYS_WAIT_H
#include <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 #endif
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H

View File

@ -18,7 +18,16 @@
*/ */
#include "firebird.h" #include "firebird.h"
#include <nwsnut.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 <signal.h>
#include <process.h> #include <process.h>
#include <conio.h> #include <conio.h>

View File

@ -30,7 +30,16 @@
#else #else
#include <sys/types.h> #include <sys/types.h>
#include <sys/times.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 #endif
#include "../jrd/ib_stdio.h" #include "../jrd/ib_stdio.h"

View File

@ -21,7 +21,7 @@
* Contributor(s): ______________________________________. * 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" #include "firebird.h"
@ -50,8 +50,14 @@ $Id: drop.cpp,v 1.8 2002-08-26 13:20:05 eku Exp $
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_SYS_WAIT_H #if HAVE_SYS_WAIT_H
#include <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 #endif
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H

View File

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * All Rights Reserved.
* Contributor(s): ______________________________________. * 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" #include "firebird.h"
@ -32,7 +32,15 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <sys/types.h> #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" #include "../jrd/common.h"

View File

@ -21,7 +21,7 @@
* Contributor(s): ______________________________________. * 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" #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() */ #include <wait.h> /* for waitpid() */
#endif #endif
#ifdef HAVE_SYS_WAIT_H #if HAVE_SYS_WAIT_H
#include <sys/wait.h> /* for waitpid() */ # 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 #endif

View File

@ -21,13 +21,22 @@
* Contributor(s): ______________________________________. * 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 <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.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 <ctype.h>
#include <ibase.h> #include <ibase.h>
#include "align.h" #include "align.h"

View File

@ -23,7 +23,16 @@
====================================================================== */ ====================================================================== */
#include <stdlib.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 <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include <ibase.h> #include <ibase.h>

View File

@ -30,11 +30,31 @@
#include <string.h> #include <string.h>
#include "../jrd/common.h" #include "../jrd/common.h"
#if !(defined WIN_NT) #if TIME_WITH_SYS_TIME
#include <sys/time.h> # include <sys/time.h>
# include <time.h>
#else #else
#include <sys/timeb.h> # if HAVE_SYS_TIME_H
#include <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> #include <io.h>
#endif #endif

View File

@ -48,8 +48,14 @@
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#ifdef HAVE_SYS_WAIT_H #if HAVE_SYS_WAIT_H
#include <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 #endif
#ifndef NETWARE_386 #ifndef NETWARE_386