8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:43:03 +01:00

Autoconf enhancements:

o autoconf v2.53 and later is now required to generate configure
   (sorry, but it makes many tasks easier)
 o improved tests for mmap, socklen_t and offt_64
 o added tests for atexit, on_exit, (v)fork, set(p)grp, setpgid and flock
 o added test for the keyword 'volatile'
 o fixed errors in configure.in
 o updated config.h.in and autoconfig_msvc.h (the latter may be incorrect)
 o replaced VOLATILE by volatile
 o removed SETPGRP and ATEXIT
 o replaced NO_FLOCK by HAVE_FLOCK
 o SIG_FPTR cleanup
 o vfork cleanup
This commit is contained in:
eku 2002-09-11 11:30:50 +00:00
parent a16ee60900
commit da93f6697f
33 changed files with 394 additions and 386 deletions

View File

@ -2,19 +2,23 @@
#
# Run this to generate all the initial makefiles, etc.
#
# $Id: autogen.sh,v 1.3 2002-08-14 11:13:56 eku Exp $
# $Id: autogen.sh,v 1.4 2002-09-11 11:30:43 eku Exp $
PKG_NAME=Firebird2
SRCDIR=`dirname $0`
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
VER=` autoconf --version | grep '^[Aa]utoconf'|sed 's/^[^0-9]*//'`
case "$VER" in
0* | 1\.* | 2\.[0-9] | 2\.[0-9][a-z]* | \
2\.[1-4][0-9] | 2\.5[0-2][a-z]* )
echo
echo "**Error**: You must have \`autoconf' installed to."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
echo "**Error**: You must have autoconf 2.53 or later installed."
echo "Download the appropriate package for your distribution/OS,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
DIE=1
}
;;
esac
# Put other tests for programs here!
@ -47,4 +51,4 @@ else
echo Skipping configure process.
fi
# EOF
# EOF

View File

@ -1,4 +1,4 @@
dnl $Id: configure.in,v 1.42 2002-09-10 07:56:02 eku Exp $
dnl $Id: configure.in,v 1.43 2002-09-11 11:30:43 eku Exp $
dnl ############################# INITIALISATION ###############################
@ -127,7 +127,7 @@ AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(varargs.h)
dnl Check for libraries
dnl Check for libraries
AC_CHECK_LIB(dl, main)
AC_CHECK_LIB(c,main)
AC_CHECK_LIB(m, main)
@ -185,27 +185,24 @@ if test "$ac_cv_func_dirname" = "no"; then
fi
AC_CHECK_FUNCS(sigaction)
AC_CHECK_FUNCS(snprintf)
AC_CHECK_FUNCS(mmap)
AC_FUNC_MMAP
AC_CHECK_FUNCS(atexit on_exit)
AC_FUNC_FORK
AC_CHECK_FUNCS(setgrp setpgid)
AC_FUNC_SETPGRP
AC_CHECK_FUNCS(flock)
dnl Check for other things
AC_C_BIGENDIAN
AC_C_CONST dnl EKU: we should replace the CONST define in the source!!!
AC_C_VOLATILE
AC_TYPE_SIGNAL
AC_MSG_CHECKING(for socklen_t type)
AC_TRY_COMPILE([#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>],
[socklen_t a;],
[AC_MSG_RESULT(yes)],
[AC_DEFINE(socklen_t, int) AC_MSG_RESULT(no)])
UNIX_64_BIT_IO=N
AC_MSG_CHECKING(for 64 bit I/O support)
AC_TRY_COMPILE([#include <sys/types.h>],
[off64_t a;],
[UNIX_64_BIT_IO=Y AC_DEFINE(UNIX_64_BIT_IO) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
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])
dnl ##################### DO NOT ADD ANY TESTS BELOW ###########################
@ -246,154 +243,144 @@ dnl AC_DEFINE_UNQUOTED(FILE_VER_STRING, "$FILE_VER_STRING")
dnl AC_DEFINE_UNQUOTED(LICENSE_VER_STRING, "$FILE_VER_STRING")
AC_CONFIG_COMMANDS_PRE([
mkdir -p gen/csv
mkdir -p gen/dudley
mkdir -p gen/isql
mkdir -p gen/lock
mkdir -p gen/gpre
mkdir -p gen/pipe
mkdir -p gen/remote
mkdir -p gen/wal
mkdir -p gen/alice
mkdir -p gen/refDatabases
mkdir -p gen/v5_examples
mkdir -p gen/journal
mkdir -p gen/msgs
mkdir -p gen/burp
mkdir -p gen/dsql
mkdir -p gen/extlib
mkdir -p gen/intl
mkdir -p gen/jrd
mkdir -p gen/qli
mkdir -p gen/utilities
mkdir -p gen/fbutil
dnl These AC_OUTPUT_COMMANDS should be replaced by AC_CONFIG_COMMANDS_PRE
dnl by that version of autoconf is fresh off the shelf, and for now although
dnl these cause an error it's acceptable.
AC_OUTPUT_COMMANDS([mkdir -p gen/csv])
AC_OUTPUT_COMMANDS([mkdir -p gen/dudley])
AC_OUTPUT_COMMANDS([mkdir -p gen/isql])
AC_OUTPUT_COMMANDS([mkdir -p gen/lock])
AC_OUTPUT_COMMANDS([mkdir -p gen/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/pipe])
AC_OUTPUT_COMMANDS([mkdir -p gen/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/wal])
AC_OUTPUT_COMMANDS([mkdir -p gen/alice])
AC_OUTPUT_COMMANDS([mkdir -p gen/refDatabases])
AC_OUTPUT_COMMANDS([mkdir -p gen/v5_examples])
AC_OUTPUT_COMMANDS([mkdir -p gen/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/journal])
AC_OUTPUT_COMMANDS([mkdir -p gen/msgs])
AC_OUTPUT_COMMANDS([mkdir -p gen/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/dsql])
AC_OUTPUT_COMMANDS([mkdir -p gen/extlib])
AC_OUTPUT_COMMANDS([mkdir -p gen/intl])
AC_OUTPUT_COMMANDS([mkdir -p gen/jrd])
AC_OUTPUT_COMMANDS([mkdir -p gen/qli])
AC_OUTPUT_COMMANDS([mkdir -p gen/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/fbutil])
mkdir -p gen/install
mkdir -p gen/install/scripts
mkdir -p gen/install/sinixz
AC_OUTPUT_COMMANDS([mkdir -p gen/install])
AC_OUTPUT_COMMANDS([mkdir -p gen/install/scripts])
AC_OUTPUT_COMMANDS([mkdir -p gen/install/sinixz])
mkdir -p gen/common
mkdir -p gen/common/memory
AC_OUTPUT_COMMANDS([mkdir -p gen/common])
AC_OUTPUT_COMMANDS([mkdir -p gen/common/memory])
mkdir -p gen/firebird/include
mkdir -p gen/firebird/intl
mkdir -p gen/firebird/UDF
mkdir -p gen/firebird/bin
mkdir -p gen/firebird/examples/v5
mkdir -p gen/firebird/lib
mkdir -p gen/firebird/misc
mkdir -p gen/firebird/help
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/include])
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/intl])
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/UDF])
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/bin])
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/examples/v5])
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/lib])
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/misc])
AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/help])
src/misc/writeBuildNum.sh rebuildHeader
AC_OUTPUT_COMMANDS([chmod a+x gen/install/install.sh])
AC_OUTPUT_COMMANDS([chmod a+x gen/install/scripts/*.sh])
mkdir -p gen/jrd/os
mkdir -p gen/jrd/os/darwin
mkdir -p gen/jrd/os/posix
mkdir -p gen/jrd/os/win32
AC_OUTPUT_COMMANDS([src/misc/writeBuildNum.sh rebuildHeader])
mkdir -p gen/libfbcommon
mkdir -p gen/libfbcommon/memory
dnl mkdir -p gen/libdsqlserver
mkdir -p gen/libfbserver
mkdir -p gen/libfbserver/jrd
mkdir -p gen/libfbserver/dsql
mkdir -p gen/libfbserver/lock
mkdir -p gen/libfbserver/remote
mkdir -p gen/libfbserver/pipe
mkdir -p gen/libfbserver/gpre
mkdir -p gen/libfbserver/alice
mkdir -p gen/libfbserver/burp
mkdir -p gen/libfbserver/utilities
mkdir -p gen/libfbserver/fbutil
mkdir -p gen/libfbserver/wal
mkdir -p gen/libfbserver/common/memory
mkdir -p gen/libfbserver/jrd/os/posix
mkdir -p gen/fbserver/remote
mkdir -p gen/libfbclient/jrd
mkdir -p gen/libfbclient/dsql
mkdir -p gen/libfbclient/remote
mkdir -p gen/libfbclient/utilities
mkdir -p gen/libfbclient/fbutil
mkdir -p gen/libfbclient/common/memory
mkdir -p gen/client.gbak/burp
mkdir -p gen/client.gfix/alice
mkdir -p gen/client.gpre/gpre
mkdir -p gen/client.isql/isql
mkdir -p gen/client.util/utilities
mkdir -p gen/intl/intl
AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os])
AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os/darwin])
AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os/posix])
AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os/win32])
mkdir -p gen/libfbcommon/common/memory
mkdir -p gen/libfbcommon/fbutil
mkdir -p gen/boot.gpre/jrd
mkdir -p gen/boot.gpre/gpre
mkdir -p gen/static.gpre
mkdir -p gen/static.gpre/jrd
mkdir -p gen/static.gpre/dsql
mkdir -p gen/static.gpre/lock
mkdir -p gen/static.gpre/remote
mkdir -p gen/static.gpre/pipe
mkdir -p gen/static.gpre/gpre
mkdir -p gen/static.gpre/alice
mkdir -p gen/static.gpre/utilities
mkdir -p gen/static.gpre/fbutil
mkdir -p gen/static.gpre/jrd/os/posix
mkdir -p gen/static.gpre/burp
mkdir -p gen/static.gpre/wal
mkdir -p gen/static.gbak/burp
mkdir -p gen/static.isql/isql
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon/memory])
dnl AC_OUTPUT_COMMANDS([mkdir -p gen/libdsqlserver])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/jrd])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/dsql])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/lock])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/pipe])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/alice])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/fbutil])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/wal])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/common/memory])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/jrd/os/posix])
AC_OUTPUT_COMMANDS([mkdir -p gen/fbserver/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/jrd])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/dsql])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/fbutil])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/common/memory])
AC_OUTPUT_COMMANDS([mkdir -p gen/client.gbak/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/client.gfix/alice])
AC_OUTPUT_COMMANDS([mkdir -p gen/client.gpre/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/client.isql/isql])
AC_OUTPUT_COMMANDS([mkdir -p gen/client.util/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/intl/intl])
mkdir -p gen/libfbstatic
mkdir -p gen/libfbstatic/jrd
mkdir -p gen/libfbstatic/dsql
mkdir -p gen/libfbstatic/lock
mkdir -p gen/libfbstatic/remote
mkdir -p gen/libfbstatic/pipe
mkdir -p gen/libfbstatic/gpre
mkdir -p gen/libfbstatic/alice
mkdir -p gen/libfbstatic/utilities
mkdir -p gen/libfbstatic/fbutil
mkdir -p gen/libfbstatic/jrd/os/posix
mkdir -p gen/libfbstatic/burp
mkdir -p gen/libfbstatic/wal
mkdir -p gen/embed.lockmgr/lock
mkdir -p gen/embed.util/utilities
mkdir -p gen/embed.gbak/burp
mkdir -p gen/embed.gfix/alice
mkdir -p gen/embed.isql/isql
mkdir -p gen/embed.gdef/dudley
mkdir -p gen/embed.qli/qli
mkdir -p gen/embed.gpre/gpre
mkdir -p gen/inet_server/remote
mkdir -p gen/msgs/msgs
mkdir -p gen/extlib/extlib/fbudf
mkdir -p gen/v5_examples/v5_examples
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon/common/memory])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon/fbutil])
AC_OUTPUT_COMMANDS([mkdir -p gen/boot.gpre/jrd])
AC_OUTPUT_COMMANDS([mkdir -p gen/boot.gpre/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/jrd])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/dsql])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/lock])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/pipe])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/alice])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/fbutil])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/jrd/os/posix])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/wal])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.gbak/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/static.isql/isql])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/jrd])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/dsql])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/lock])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/pipe])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/alice])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/fbutil])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/jrd/os/posix])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/wal])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.lockmgr/lock])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.util/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gbak/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gfix/alice])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.isql/isql])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gdef/dudley])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.qli/qli])
AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gpre/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/inet_server/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/msgs/msgs])
AC_OUTPUT_COMMANDS([mkdir -p gen/extlib/extlib/fbudf])
AC_OUTPUT_COMMANDS([mkdir -p gen/v5_examples/v5_examples])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/jrd])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/dsql])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/lock])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/remote])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/pipe])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/gpre])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/alice])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/utilities])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/fbutil])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/jrd/os/posix])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/burp])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/wal])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/common/memory])
AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/fbutil])
mkdir -p gen/libfbembed
mkdir -p gen/libfbembed/jrd
mkdir -p gen/libfbembed/dsql
mkdir -p gen/libfbembed/lock
mkdir -p gen/libfbembed/remote
mkdir -p gen/libfbembed/pipe
mkdir -p gen/libfbembed/gpre
mkdir -p gen/libfbembed/alice
mkdir -p gen/libfbembed/utilities
mkdir -p gen/libfbembed/fbutil
mkdir -p gen/libfbembed/jrd/os/posix
mkdir -p gen/libfbembed/burp
mkdir -p gen/libfbembed/wal
mkdir -p gen/libfbembed/common/memory
])
MAKE_SRC_DIR=builds/posix
@ -452,6 +439,10 @@ gen/install/sinixz/postremove:src/install/arch-specific/sinixz/postremove.in
dnl SINIX-Z end
)
dnl EKU: must be executed after AC_OUTPUT
chmod a+x gen/install/install.sh gen/install/scripts/*.sh
dnl Print out the build configuration (the most interesting thing)
echo
echo

View File

@ -24,7 +24,7 @@
//
//____________________________________________________________
//
// $Id: alice.cpp,v 1.14 2002-07-29 15:37:51 skywalker Exp $
// $Id: alice.cpp,v 1.15 2002-09-11 11:30:43 eku Exp $
//
// 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
// conditionals, as the engine now fully supports
@ -223,7 +223,7 @@ int DLL_EXPORT ALICE_gfix( int argc,
fAnsiCP = (GetConsoleCP() == GetACP());
#endif
VOLATILE tgbl* tdgbl = (struct tgbl*) gds__alloc(sizeof(*tdgbl));
volatile tgbl* tdgbl = (struct tgbl*) gds__alloc(sizeof(*tdgbl));
if (!tdgbl) {
// NOMEM: return error, FREE: during function exit in the SETJMP
return FINI_ERROR;

View File

@ -143,7 +143,7 @@ struct tgbl *gdgbl;
#define OUTPUT_SUPPRESS "SUPPRESS"
#define BURP_MSG_FAC 12
static void close_out_transaction(VOLATILE SSHORT, isc_tr_handle *);
static void close_out_transaction(volatile SSHORT, isc_tr_handle *);
static void enable_signals(void);
static void excp_handler(void);
static SLONG get_number(SCHAR *);
@ -465,7 +465,7 @@ int DLL_EXPORT BURP_gbak(int argc,
for AIX PowerPC because of the problem (see comments below). So
whoever will do a port on AIX, must reconsider a static definition */
#ifdef AIX_PPC
static TEXT *file2; /* SomeHow, making this VOLATILE does'nt give the
static TEXT *file2; /* SomeHow, making this volatile does'nt give the
desired value in case of AIX PowerPC */
#else
TEXT *file2;
@ -477,11 +477,11 @@ int DLL_EXPORT BURP_gbak(int argc,
int temp, result;
SLONG clock;
SLONG redir_in, redir_out, redir_err;
VOLATILE SSHORT action = QUIT;
volatile SSHORT action = QUIT;
BOOLEAN sw_ods7 = FALSE;
USHORT sw_replace;
USHORT sw_tape;
VOLATILE struct tgbl* tdgbl;
volatile struct tgbl* tdgbl;
JMP_BUF env;
IB_FILE* tmp_outfile;
@ -1454,7 +1454,7 @@ void BURP_verbose(USHORT number,
} // extern "C"
static void close_out_transaction(VOLATILE SSHORT action,
static void close_out_transaction(volatile SSHORT action,
isc_tr_handle* handle)
{
/**************************************

View File

@ -27,7 +27,7 @@
* Mark O'Donohue <mark.odonohue@ludwig.edu.au>
*
*
* $Id: fb_types.h,v 1.7 2002-08-27 11:47:11 dimitr Exp $
* $Id: fb_types.h,v 1.8 2002-09-11 11:30:44 eku Exp $
*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "OS/2" port
*
@ -42,10 +42,6 @@
# define CONST const
#endif
#ifndef VOLATILE
# define VOLATILE volatile
#endif
#if (defined(_MSC_VER) && defined(_WIN32)) || \
(defined(__BORLANDC__) && defined(__WIN32__))

View File

@ -1,4 +1,4 @@
#ident "$Id: autoconfig_msvc.h,v 1.26 2002-09-03 17:29:53 dimitr Exp $"
#ident "$Id: autoconfig_msvc.h,v 1.27 2002-09-11 11:30:44 eku Exp $"
/*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
@ -52,6 +52,7 @@
#undef HAVE_READLINE_READLINE_H
#undef HAVE_UNISTD_H
#undef HAVE_VARARGS_H
#undef HAVE_VFORK_H
/* Functions */
#undef HAVE_STRLCPY
@ -65,6 +66,13 @@
#undef HAVE_SIGACTION
#define HAVE_SNPRINTF
#undef HAVE_MMAP
#undef HAVE_ATEXIT
#undef HAVE_ON_EXIT
#undef HAVE_WORKING_VFORK
#undef HAVE_SETPGRP
#undef HAVE_SETPGID
#undef SETPGRP_VOID
#undef HAVE_FLOCK
/* Types */
#undef socklen_t

View File

@ -35,7 +35,7 @@
* 2002.04.16 Paul Beach - HP10 and unistd.h
*/
/*
$Id: common.h,v 1.25 2002-08-31 09:25:13 fsg Exp $
$Id: common.h,v 1.26 2002-09-11 11:30:44 eku Exp $
*/
#ifndef JRD_COMMON_H
@ -102,14 +102,12 @@ $Id: common.h,v 1.25 2002-08-31 09:25:13 fsg Exp $
#define IMPLEMENTATION isc_info_db_impl_i386 /* 60 next higher unique number, See you later */
#endif /* i386 */
#define SETPGRP setpgrp ()
#define ATEXIT(c) atexit (c)
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
#define MOVE_FAST(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
typedef RETSIGTYPE (*SIG_FPTR) (int);
#endif /* LINUX */
/* SINIX-Z 5.42 */
@ -178,11 +176,8 @@ int shutdown(int s, int how);
#define IMPLEMENTATION isc_info_db_impl_sinixz /* 64 */
#endif /* i386 */
#define SETPGRP setpgrp ()
#define ATEXIT(c) atexit (c)
#define setreuid(ruid,euid) setuid(euid)
#define setregid(rgid,egid) setgid(egid)
#define NO_FLOCK
#define NO_PYXIS
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
@ -190,6 +185,7 @@ int shutdown(int s, int how);
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* SINIXZ */
/* Darwin Platforms */
@ -202,10 +198,8 @@ int shutdown(int s, int how);
#define ALIGNMENT 4
#define DOUBLE_ALIGN 4
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define SETPGRP setpgrp (0, 0)
#define BSD_UNIX 1
#define UNIX 1
#define ATEXIT(c) atexit (c)
#define IMPLEMENTATION 63
#define IEEE
#define QUADCONST(n) (n##LL)
@ -230,6 +224,7 @@ int shutdown(int s, int how);
#endif
#endif
typedef RETSIGTYPE (*SIG_FPTR) (int);
#endif /* Darwin Platforms */
@ -245,8 +240,6 @@ int shutdown(int s, int how);
#define I386 1
#define VAX 1
#define IMPLEMENTATION isc_info_db_impl_freebsd /* 61 */
#define SETPGRP setpgrp ()
#define ATEXIT(c) atexit(c)
#define QUADFORMAT "ll"
#define QUADCONST(n) (n##LL)
@ -258,8 +251,7 @@ int shutdown(int s, int how);
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
#define VOLATILE volatile
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* FREEBSD */
/* NetBSD */
@ -282,8 +274,6 @@ int shutdown(int s, int how);
#endif
#define UNIX 1
#define SETPGRP setpgrp ()
#define ATEXIT(c) atexit(c)
#define KILLER_SIGNALS
#define NO_NFS /* no MTAB_OPEN or MTAB_CLOSE in isc_file.c */
@ -293,8 +283,7 @@ int shutdown(int s, int how);
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
#define VOLATILE volatile
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* NETBSD */
@ -335,9 +324,6 @@ int shutdown(int s, int how);
#define LSEEK_OFFSET_CAST (off_t)
#endif
#define ATEXIT(c) atexit (c)
#define SETPGRP setpgrp ()
#define NO_FLOCK
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
/********* Reason for introducing MEMMOVE macro.
@ -385,9 +371,7 @@ int shutdown(int s, int how);
#else /* SOLARIS */
#define ATEXIT(c) on_exit (c, 0)
#define BSD_UNIX 1
#define SETPGRP setpgrp (0, 0)
#endif /* SOLARIS */
@ -416,6 +400,8 @@ int shutdown(int s, int how);
#define MOVE_FAST(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* sun */
@ -427,13 +413,10 @@ int shutdown(int s, int how);
#define hpux
#endif
#define ATEXIT(c) atexit (c)
#define KILLER_SIGNALS
#define SETPGRP setpgid (0, 0)
#define UNIX 1
#define CURSES_KEYPAD 1
#define INTL
#define NO_FLOCK
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define ALIGNMENT 8
@ -458,6 +441,8 @@ int shutdown(int s, int how);
#define MOVE_FAST(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* hpux */
@ -471,7 +456,6 @@ int shutdown(int s, int how);
#define UNIX 1
#define VAX 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
#define SETPGRP setpgrp (0, 0)
#ifdef mips
#define IMPLEMENTATION isc_info_db_impl_isc_mips_ult /* 36 */
@ -484,6 +468,7 @@ int shutdown(int s, int how);
#define SHMEM_PICKY
#endif
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* ultrix */
@ -498,7 +483,6 @@ int shutdown(int s, int how);
#define NO_PYXIS
#define I386 1
#define VAX /* Use VAX style byte swapping */
#define ATEXIT(c)
#define NO_NFS
#undef LINKS_EXIST
#define IEEE /* IEEE floating point arith. */
@ -522,6 +506,7 @@ int shutdown(int s, int how);
#define DLL_EXPORT API_ROUTINE
#endif
typedef RETSIGTYPE (API_ROUTINE * SIG_FPTR) ();
#endif /* ifndef NETWARE_386 */
@ -566,6 +551,7 @@ typedef unsigned int64 UATOM;
#define STARTUP_ERROR 46 /* this is also used in iscguard.h, make sure these match */
#define INTL
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* VMS */
@ -576,10 +562,6 @@ typedef unsigned int64 UATOM;
#ifndef _POWER /* IBM RS/6000 */
#define AIX
#define KILLER_SIGNALS
#define NO_FLOCK
#define SETPGRP setpgid (0, 0)
#define ATEXIT(c) atexit (c)
#define vfork fork
#define UNIX 1
#define CURSES_KEYPAD 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
@ -592,14 +574,9 @@ typedef unsigned int64 UATOM;
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
#define SYSCALL_INTERRUPTED(err) (((err) == EINTR) || ((err) == ERESTART)) /* pjpg 20001102 */
#define INTL
#define VOLATILE volatile
#else /* AIX PowerPC */
#define AIX_PPC
#define KILLER_SIGNALS
#define NO_FLOCK
#define SETPGRP setpgid (0, 0)
#define ATEXIT(c) atexit (c)
#define vfork fork
#define UNIX 1
#define CURSES_KEYPAD 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
@ -612,13 +589,14 @@ typedef unsigned int64 UATOM;
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
#define SYSCALL_INTERRUPTED(err) (((err) == EINTR) || ((err) == ERESTART)) /* pjpg 20001102 */
#define INTL
#define VOLATILE volatile
#define VA_START(list,parmN) va_start (list, parmN) /* TMC 081700 */
#define QUADFORMAT "ll" /* TMC 081700 */
#define QUADCONST(n) (n##LL) /* TMC 081700 */
#endif /* IBM PowerPC */
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* IBM AIX */
@ -664,7 +642,6 @@ typedef unsigned __int64 UINT64;
#define IMPLEMENTATION isc_info_db_impl_isc_winnt_x86 /* 50 */
#endif
#define ATEXIT(c) atexit (c)
#define IEEE
#define INTL
#define VA_START(list,parmN) va_start (list, parmN)
@ -692,6 +669,7 @@ typedef unsigned __int64 UINT64;
#define MAXPATHLEN 260
#endif
typedef RETSIGTYPE (CLIB_ROUTINE * SIG_FPTR) ();
#endif /* WIN_NT */
@ -706,8 +684,6 @@ typedef unsigned __int64 UINT64;
#define NOHOSTNAME
#define KILLER_SIGNALS
#define SYSV_SIGNALS
#define ATEXIT(c) atexit (c)
#define vfork fork
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
@ -721,19 +697,18 @@ typedef unsigned __int64 UINT64;
#ifdef M_UNIX
#define SCO_UNIX 1
#define SETPGRP setpgid (0, 0)
#define IMPLEMENTATION isc_info_db_impl_isc_sco_unix /* 42 */
#define INTL
#define INTL_BACKEND
#else
#define FB_ALIGN(n,b) ((n+1) & ~1)
#define SETPGRP
#define IMPLEMENTATION isc_info_db_impl_isc_xenix /* 37 */
#endif
#define IEEE
#undef LINKS_EXIST
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* M_I386 */
#else /* ifndef SCO_EV */
@ -745,9 +720,6 @@ typedef unsigned __int64 UINT64;
#define UNIX 1
#define SCO_UNIX 1
#define IEEE
#define SETPGRP setpgrp()
#define NO_FLOCK
#define ATEXIT(c) atexit (c)
/*
#define KILLER_SIGNALS
*/
@ -758,7 +730,6 @@ typedef unsigned __int64 UINT64;
#define MOVE_FASTER(from,to,length) memcpy (to, from, (unsigned int) (length))
#define MOVE_CLEAR(to,length) memset (to, 0, (unsigned int) (length))
#define VOLATILE volatile /* 5.5 SCO Port */
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
@ -767,6 +738,7 @@ typedef unsigned __int64 UINT64;
#define setregid(rgid,egid) setgid(egid)
*/
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* ifndef SCO_EV */
@ -774,9 +746,6 @@ typedef unsigned __int64 UINT64;
#ifdef DGUX
#define UNIX 1
#define KILLER_SIGNALS
#define NO_FLOCK
#define SETPGRP setpgid (0, 0)
#define ATEXIT(c) atexit (c)
#define CURSES_KEYPAD 1
#ifndef DG_X86
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
@ -796,6 +765,7 @@ typedef unsigned __int64 UINT64;
#define MAXPATHLEN 1024
#endif
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* DGUX */
@ -807,7 +777,6 @@ typedef unsigned __int64 UINT64;
#define NO_PYXIS
#define KILLER_SIGNALS
#define HAS_64BIT_POINTERS /* if a machine has 64 bit pointers you need this */
#define SETPGRP setpgrp (0, 0)
#define UNIX 1
#define VAX 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
@ -815,11 +784,9 @@ typedef unsigned __int64 UINT64;
#define DOUBLE_ALIGN 8
#define IMPLEMENTATION isc_info_db_impl_alpha_osf /* 52 */
#define IEEE
#define ATEXIT(c) atexit (c)
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#define VOLATILE volatile
#endif
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
@ -832,14 +799,13 @@ typedef unsigned __int64 UINT64;
typedef long SATOM; /* 64 bit */
typedef unsigned long UATOM;
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* DECOSF */
#ifdef sgi
#define vfork fork
#define KILLER_SIGNALS
#define SETPGRP setpgid (0, 0)
#define UNIX 1
#define CURSES_KEYPAD 1
#define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
@ -847,15 +813,14 @@ typedef unsigned long UATOM;
#define IMPLEMENTATION isc_info_db_impl_isc_sgi /* 41 */
#define DOUBLE_ALIGN 8
#define IEEE
#define NO_FLOCK
#define INTL
#define VOLATILE volatile
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* sgi */
@ -880,7 +845,6 @@ typedef unsigned long DWORD;
#define SMALL_FILE_NAMES
#define NOHOSTNAME
#define ATEXIT(c) atexit (c)
#define SYS_ARG isc_arg_dos
#ifndef MAXPATHLEN
@ -893,7 +857,6 @@ typedef unsigned long DWORD;
#define FB_ALIGN(n,b) ((n+1) & ~1)
#define OLD_ALIGNMENT
#define NO_NFS
#define SETPGRP
#define IMPLEMENTATION isc_info_db_impl_netware_386, /* 54 */
#undef LINKS_EXIST
#define VA_START(list,parmN) va_start (list, parmN)
@ -908,14 +871,13 @@ typedef unsigned long DWORD;
#define STACK_REDUCTION
typedef RETSIGTYPE (CLIB_ROUTINE * SIG_FPTR) ();
#endif /* NETWARE_386 */
#ifdef UNIXWARE
#define INTL
#define SETPGRP setpgrp()
#define KILLER_SIGNALS
#define NO_FLOCK
#define NO_PYXIS
#define I386 1
#define VAX 1
@ -923,8 +885,6 @@ typedef unsigned long DWORD;
#define CURSES_KEYPAD 1
#define IMPLEMENTATION isc_info_db_impl_unixware, /* 49 */
#define IEEE
#define ATEXIT(c) atexit (c)
#define vfork fork
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
@ -936,6 +896,7 @@ typedef unsigned long DWORD;
#define setreuid(ruid,euid) setuid (euid)
#define setregid(rgid,egid) setgid (egid)
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif /* UNIXWARE */
@ -1334,20 +1295,8 @@ typedef struct in_sw_tab_t {
/* Just to be safe we will still define READONLY_DATABASE as it gets phased out */
#define READONLY_DATABASE 1
/* CLIB_ROUNTINE macro is already defined here,
so we can safely declare SIG_FPTR type */
#ifdef SUN3_3
typedef RETSIGTYPE (*CLIB_ROUTINE SIG_FPTR) ();
#else
#if ((defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER))
typedef RETSIGTYPE (CLIB_ROUTINE * SIG_FPTR) ();
#else
#if (defined(DARWIN) || defined(LINUX))
typedef RETSIGTYPE (*CLIB_ROUTINE SIG_FPTR) (int);
#else
typedef RETSIGTYPE (*SIG_FPTR) ();
#endif
#endif
#ifndef HAVE_WORKING_VFORK
#define vfork fork
#endif
#endif /* JRD_COMMON_H */

View File

@ -134,7 +134,15 @@ void divorce_terminal(int mask)
/* Finally, get out of the process group */
#if (!defined(VMS) && !defined(NETWARE_386) && !defined(WIN_NT))
s = SETPGRP;
#endif
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
s = setpgrp();
#else
s = setpgrp(0, 0);
#endif /* SETPGRP_VOID */
#else
#ifdef HAVE_SETPGID
s = setpgid(0, 0);
#endif /* HAVE_SETPGID */
#endif /* HAVE_SETPGRP */
}

View File

@ -1078,8 +1078,8 @@ static void grant( GBL gbl, UCHAR ** ptr)
**************************************/
BLK request;
//VOLATILE SSHORT err_num;
VOLATILE SSHORT id;
//volatile SSHORT err_num;
volatile SSHORT id;
TEXT privileges[16];
TEXT object[32];
TEXT field[32];
@ -1431,7 +1431,7 @@ static bool grantor_can_grant( GBL gbl,
BOOLEAN relation_exists = FALSE;
BOOLEAN field_exists = FALSE;
BOOLEAN grantor_is_owner = FALSE;
VOLATILE USHORT err_num;
volatile USHORT err_num;
tdbb = GET_THREAD_DATA;
dbb = tdbb->tdbb_database;
@ -1800,7 +1800,7 @@ static void revoke_permission(GBL gbl, UCHAR ** ptr)
DBB dbb;
BLK request;
//BLK old_request;
VOLATILE USHORT old_id, id;
volatile USHORT old_id, id;
UCHAR verb;
SSHORT user_type, obj_type;
TEXT privileges[16], object[32], field[32], user[32], *p, *q, temp[2];

View File

@ -153,9 +153,9 @@ void DYN_define_cache( GBL gbl, UCHAR ** ptr)
TDBB tdbb;
DBB dbb;
UCHAR verb;
VOLATILE BLK request;
volatile BLK request;
USHORT found = FALSE;
VOLATILE SSHORT id;
volatile SSHORT id;
tdbb = GET_THREAD_DATA;
dbb = tdbb->tdbb_database;
@ -254,9 +254,9 @@ void DYN_define_constraint(GBL gbl,
**************************************/
TDBB tdbb;
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
BLK old_request;
VOLATILE SSHORT id, old_id;
volatile SSHORT id, old_id;
UCHAR verb;
TEXT constraint_name[32], index_name[32], referred_index_name[32];
TEXT null_field_name[32], trigger_name[32];
@ -654,7 +654,7 @@ void DYN_define_dimension(GBL gbl,
DBB dbb = tdbb->tdbb_database;
UCHAR verb;
VOLATILE BLK request;
volatile BLK request;
request = (BLK) CMP_find_request(tdbb, drq_s_dims, DYN_REQUESTS);
@ -729,7 +729,7 @@ void DYN_define_exception( GBL gbl, UCHAR ** ptr)
*
**************************************/
VOLATILE BLK request;
volatile BLK request;
UCHAR verb;
TEXT exception_name[32];
@ -814,11 +814,11 @@ void DYN_define_file(GBL gbl,
TDBB tdbb;
DBB dbb;
UCHAR verb;
VOLATILE BLK request;
volatile BLK request;
SLONG temp;
USHORT man_auto;
TEXT temp_f1[MAXPATHLEN], temp_f[MAXPATHLEN];
VOLATILE SSHORT id;
volatile SSHORT id;
tdbb = GET_THREAD_DATA;
dbb = tdbb->tdbb_database;
@ -923,7 +923,7 @@ void DYN_define_filter( GBL gbl, UCHAR ** ptr)
UCHAR verb;
TEXT filter_name[32];
VOLATILE BLK request;
volatile BLK request;
TDBB tdbb = GET_THREAD_DATA;
DBB dbb = tdbb->tdbb_database;
@ -1024,7 +1024,7 @@ void DYN_define_function( GBL gbl, UCHAR ** ptr)
UCHAR verb;
TEXT function_name[32];
VOLATILE BLK request;
volatile BLK request;
TDBB tdbb = GET_THREAD_DATA;
DBB dbb = tdbb->tdbb_database;
@ -1131,7 +1131,7 @@ void DYN_define_function_arg(GBL gbl, UCHAR** ptr, TEXT* function_name)
TDBB tdbb;
DBB dbb;
UCHAR verb;
VOLATILE BLK request = NULL;
volatile BLK request = NULL;
tdbb = GET_THREAD_DATA;
dbb = tdbb->tdbb_database;
@ -1257,7 +1257,7 @@ void DYN_define_generator( GBL gbl, UCHAR ** ptr)
TDBB tdbb = GET_THREAD_DATA;
DBB dbb = tdbb->tdbb_database;
VOLATILE BLK request;
volatile BLK request;
TEXT generator_name[32];
generator_name[0] = 0;
@ -1325,7 +1325,7 @@ void DYN_define_global_field(GBL gbl,
UCHAR verb;
TEXT global_field_name[32];
VOLATILE BLK request;
volatile BLK request;
USHORT dtype;
global_field_name[0] = 0;
@ -1609,9 +1609,9 @@ void DYN_define_index(GBL gbl,
*
**************************************/
VOLATILE BLK request;
volatile BLK request;
BLK old_request;
VOLATILE SSHORT id, old_id;
volatile SSHORT id, old_id;
const size_t field_name_size = 32;
TEXT index_name[32];
TEXT referenced_relation[32];
@ -2176,9 +2176,9 @@ void DYN_define_local_field(GBL gbl,
**************************************/
TDBB tdbb;
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
BLK old_request;
VOLATILE SSHORT id, old_id;
volatile SSHORT id, old_id;
UCHAR verb, *blr;
TEXT local_field_name[32];
USHORT dtype, length,
@ -2533,9 +2533,9 @@ void DYN_define_log_file(
TDBB tdbb;
DBB dbb;
UCHAR verb;
VOLATILE BLK request;
volatile BLK request;
USHORT found = FALSE;
VOLATILE SSHORT id;
volatile SSHORT id;
STR db_filename;
tdbb = GET_THREAD_DATA;
@ -2673,12 +2673,12 @@ void DYN_define_parameter( GBL gbl, UCHAR ** ptr, TEXT * procedure_name)
DBB dbb;
UCHAR verb;
TEXT parameter_name[32];
VOLATILE BLK request;
volatile BLK request;
BLK request2;
USHORT f_length, f_type, f_charlength, f_seg_length,
f_scale_null, f_subtype_null, f_seg_length_null,
f_charlength_null, f_precision_null, f_charset_null, f_collation_null;
VOLATILE SSHORT id;
volatile SSHORT id;
SSHORT f_subtype, f_scale, f_precision;
SSHORT f_charset, f_collation;
@ -2909,10 +2909,10 @@ void DYN_define_procedure( GBL gbl, UCHAR ** ptr)
**************************************/
TDBB tdbb;
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
UCHAR verb;
USHORT sql_prot;
VOLATILE SSHORT id;
volatile SSHORT id;
TEXT procedure_name[PROC_NAME_SIZE], owner_name[32], *p;
tdbb = GET_THREAD_DATA;
@ -3080,11 +3080,11 @@ void DYN_define_relation( GBL gbl, UCHAR ** ptr)
BOOLEAN found_dir;
TDBB tdbb;
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
BLK old_request;
UCHAR verb;
USHORT sql_prot, is_a_view, priv;
VOLATILE SSHORT id, old_id;
volatile SSHORT id, old_id;
STATUS *s;
TEXT relation_name[32], owner_name[32], field_name[32], *p;
@ -3336,7 +3336,7 @@ void DYN_define_role( GBL gbl, UCHAR ** ptr)
**************************************/
TDBB tdbb;
DBB dbb;
VOLATILE BLK request = NULL;
volatile BLK request = NULL;
TEXT dummy_name[32], owner_name[32], role_name[32], *p;
tdbb = GET_THREAD_DATA;
@ -3451,7 +3451,7 @@ void DYN_define_security_class( GBL gbl, UCHAR ** ptr)
TDBB tdbb = GET_THREAD_DATA;
DBB dbb = tdbb->tdbb_database;
VOLATILE BLK request;
volatile BLK request;
UCHAR verb;
request = (BLK) CMP_find_request(tdbb, drq_s_classes, DYN_REQUESTS);
@ -3528,9 +3528,9 @@ void DYN_define_sql_field(GBL gbl,
**************************************/
TDBB tdbb;
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
BLK old_request;
VOLATILE SSHORT id, old_id;
volatile SSHORT id, old_id;
UCHAR verb;
TEXT sql_field_name[32];
USHORT dtype;
@ -3832,7 +3832,7 @@ void DYN_define_shadow( GBL gbl, UCHAR ** ptr)
DBB dbb = tdbb->tdbb_database;
UCHAR verb;
VOLATILE BLK request;
volatile BLK request;
bool found = false;
SLONG shadow_number = DYN_get_number(ptr);
@ -3908,7 +3908,7 @@ void DYN_define_trigger(GBL gbl,
TDBB tdbb = GET_THREAD_DATA;
DBB dbb = tdbb->tdbb_database;
VOLATILE BLK request;
volatile BLK request;
UCHAR verb;
TEXT t[32];
@ -4091,7 +4091,7 @@ void DYN_define_trigger_msg(GBL gbl, UCHAR** ptr, TEXT* trigger_name)
TDBB tdbb = GET_THREAD_DATA;
DBB dbb = tdbb->tdbb_database;
VOLATILE BLK request;
volatile BLK request;
UCHAR verb;
request = (BLK) CMP_find_request(tdbb, drq_s_trg_msgs, DYN_REQUESTS);
@ -4173,9 +4173,9 @@ void DYN_define_view_relation( GBL gbl, UCHAR ** ptr, TEXT * view)
TDBB tdbb = GET_THREAD_DATA;
DBB dbb = tdbb->tdbb_database;
VOLATILE BLK request, old_request;
volatile BLK request, old_request;
UCHAR verb;
VOLATILE SSHORT id, old_id;
volatile SSHORT id, old_id;
MET_exact_name(view);
if (!view[0])
@ -4279,7 +4279,7 @@ static void check_unique_name( TDBB tdbb,
*
**************************************/
VOLATILE BLK request;
volatile BLK request;
bool found;
SET_TDBB(tdbb);
@ -4357,7 +4357,7 @@ static BOOLEAN find_field_source(TDBB tdbb,
*
**************************************/
VOLATILE BLK request;
volatile BLK request;
BOOLEAN found;
SET_TDBB(tdbb);
@ -4415,7 +4415,7 @@ static BOOLEAN get_who( TDBB tdbb, GBL gbl, SCHAR * name)
* Get user name
*
**************************************/
VOLATILE BLK request;
volatile BLK request;
SET_TDBB(tdbb);
@ -4454,9 +4454,9 @@ BOOLEAN is_it_user_name(GBL gbl, TEXT* role_name, TDBB tdbb)
*
**************************************/
VOLATILE BLK request;
volatile BLK request;
BOOLEAN found = FALSE;
VOLATILE USHORT request_id;
volatile USHORT request_id;
SET_TDBB(tdbb);
DBB dbb = tdbb->tdbb_database;

View File

@ -272,7 +272,7 @@ void DYN_delete_function( GBL gbl, UCHAR ** ptr)
TDBB tdbb;
DBB dbb;
BLK request;
VOLATILE USHORT id, found;
volatile USHORT id, found;
TEXT f[32];
tdbb = GET_THREAD_DATA;
@ -409,7 +409,7 @@ void DYN_delete_global_field( GBL gbl, UCHAR ** ptr)
TDBB tdbb;
DBB dbb;
BLK request;
VOLATILE USHORT id, found;
volatile USHORT id, found;
TEXT f[32];
tdbb = GET_THREAD_DATA;
@ -599,7 +599,7 @@ void DYN_delete_local_field(
TDBB tdbb;
DBB dbb;
BLK request, old_request;
VOLATILE USHORT id, found;
volatile USHORT id, found;
TEXT tbl_nm[32], col_nm[32], constraint[32], index_name[32];
tdbb = GET_THREAD_DATA;
@ -811,7 +811,7 @@ void DYN_delete_parameter( GBL gbl, UCHAR ** ptr, TEXT * proc_name)
**************************************/
BLK old_request, request;
VOLATILE USHORT old_id, id, found;
volatile USHORT old_id, id, found;
TEXT name[32];
GET_STRING(ptr, name);
@ -905,7 +905,7 @@ void DYN_delete_procedure( GBL gbl, UCHAR ** ptr)
TDBB tdbb;
DBB dbb;
BLK old_request, request;
VOLATILE USHORT old_id, id, found;
volatile USHORT old_id, id, found;
TEXT name[32];
GET_STRING(ptr, name);
@ -1063,7 +1063,7 @@ void DYN_delete_relation( GBL gbl, UCHAR ** ptr, TEXT * relation)
TDBB tdbb;
DBB dbb;
BLK request;
VOLATILE USHORT id, found;
volatile USHORT id, found;
TEXT relation_name[32];
tdbb = GET_THREAD_DATA;
@ -1310,8 +1310,8 @@ void DYN_delete_role( GBL gbl, UCHAR ** ptr)
TDBB tdbb;
DBB dbb;
BLK request;
VOLATILE USHORT id;
//VOLATILE USHORT err_num;
volatile USHORT id;
//volatile USHORT err_num;
TEXT role_name[32], role_owner[32], user[32];
//TEXT security_class[32];
TEXT *ptr1, *ptr2;

View File

@ -1988,7 +1988,7 @@ static void modify_lfield_position(TDBB tdbb,
* if new_position == original_position -- no_op
*
***********************************************************/
VOLATILE BLK request = NULL;
volatile BLK request = NULL;
USHORT new_pos = 0;
SLONG max_position = -1;
BOOLEAN move_down = FALSE;

View File

@ -172,9 +172,9 @@ void DYN_UTIL_generate_constraint_name( TDBB tdbb, GBL gbl, TEXT * buffer)
*
**************************************/
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
USHORT found;
VOLATILE SSHORT id;
volatile SSHORT id;
SET_TDBB(tdbb);
dbb = tdbb->tdbb_database;
@ -233,9 +233,9 @@ void DYN_UTIL_generate_field_name( TDBB tdbb, GBL gbl, TEXT * buffer)
*
**************************************/
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
USHORT found;
VOLATILE SSHORT id;
volatile SSHORT id;
SET_TDBB(tdbb);
dbb = tdbb->tdbb_database;
@ -296,7 +296,7 @@ void DYN_UTIL_generate_field_position(
*
**************************************/
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
SLONG field_position = -1;
if (!relation_name)
@ -349,9 +349,9 @@ void DYN_UTIL_generate_index_name(TDBB tdbb,
*
**************************************/
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
USHORT found;
VOLATILE SSHORT id;
volatile SSHORT id;
SCHAR *format;
SET_TDBB(tdbb);
@ -415,9 +415,9 @@ void DYN_UTIL_generate_trigger_name( TDBB tdbb, GBL gbl, TEXT * buffer)
*
**************************************/
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
USHORT found;
VOLATILE SSHORT id;
volatile SSHORT id;
SET_TDBB(tdbb);
dbb = tdbb->tdbb_database;
@ -477,7 +477,7 @@ BOOLEAN DYN_UTIL_get_prot(TDBB tdbb,
* Get protection mask for relation or relation_field
*
**************************************/
VOLATILE REQ request;
volatile REQ request;
struct
{
SCHAR relation_name[32];
@ -535,7 +535,7 @@ void DYN_UTIL_store_check_constraints(TDBB tdbb,
*
**************************************/
DBB dbb;
VOLATILE BLK request;
volatile BLK request;
SET_TDBB(tdbb);
dbb = tdbb->tdbb_database;

View File

@ -31,7 +31,7 @@
* to count virtual operations, not real I/O on the underlying tables.
*/
/*
$Id: exe.cpp,v 1.13 2002-08-22 08:20:26 dimitr Exp $
$Id: exe.cpp,v 1.14 2002-09-11 11:30:44 eku Exp $
*/
#include "firebird.h"
@ -1512,7 +1512,7 @@ static REQ execute_triggers(TDBB tdbb,
*
**************************************/
VOLATILE REQ trigger = NULL;
volatile REQ trigger = NULL;
DEV_BLKCHK(*triggers, type_vec);
DEV_BLKCHK(old_rec, type_rec);
@ -1750,8 +1750,8 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node)
SSHORT which_erase_trig = 0;
SSHORT which_sto_trig = 0;
SSHORT which_mod_trig = 0;
VOLATILE NOD top_node = 0;
VOLATILE NOD prev_node;
volatile NOD top_node = 0;
volatile NOD prev_node;
TRA transaction;
/* If an error happens during the backout of a savepoint, then the transaction
@ -1791,7 +1791,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node)
SLONG save_point_number = (transaction->tra_save_point) ?
transaction->tra_save_point->sav_number : 0;
VOLATILE NOD node = in_node;
volatile NOD node = in_node;
// Catch errors so we can unwind cleanly
@ -1816,7 +1816,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node)
switch (node->nod_type) {
case nod_asn_list:
if (request->req_operation == req::req_evaluate) {
VOLATILE NOD *ptr, *end;
volatile NOD *ptr, *end;
for (ptr = node->nod_arg, end = ptr + node->nod_count;
ptr < end; ptr++)
@ -2006,7 +2006,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node)
case req::req_unwind:
{
VOLATILE NOD *ptr, *end;
volatile NOD *ptr, *end;
if (request->req_flags & req_leave)
{
@ -2034,7 +2034,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node)
}
}
VOLATILE NOD handlers = node->nod_arg[e_blk_handlers];
volatile NOD handlers = node->nod_arg[e_blk_handlers];
if (handlers)
{
ULONG prev_req_error_handler;

View File

@ -4781,8 +4781,12 @@ static void init(void)
#endif /* SUPERSERVER */
#endif /* UNIX */
#ifdef ATEXIT
ATEXIT(gds__cleanup);
#ifdef HAVE_ATEXIT
atexit(gds__cleanup);
#else
#ifdef HAVE_ON_EXIT
on_exit(gds__cleanup, 0);
#endif
#endif
initialized = 1;

View File

@ -26,7 +26,7 @@
*
*/
/* $Id: isc_ipc.cpp,v 1.16 2002-08-26 12:13:21 eku Exp $ */
/* $Id: isc_ipc.cpp,v 1.17 2002-09-11 11:30:44 eku Exp $ */
#ifdef SHLIB_DEFS
#define LOCAL_SHLIB_DEFS
@ -44,11 +44,13 @@
#include "../jrd/isc_s_proto.h"
#include "../jrd/thd_proto.h"
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
#ifdef sparc
#ifdef SOLARIS
#define HANDLER_ADDR_ARG
#else
#include <vfork.h>
#endif
#endif
@ -95,18 +97,18 @@ typedef struct sig {
#ifndef REQUESTER
static USHORT initialized_signals = FALSE;
static SIG VOLATILE signals = NULL;
static USHORT VOLATILE inhibit_count = 0;
static SLONG VOLATILE overflow_count = 0;
static SIG volatile signals = NULL;
static USHORT volatile inhibit_count = 0;
static SLONG volatile overflow_count = 0;
#ifdef MULTI_THREAD
static MUTX_T sig_mutex;
#endif
#ifdef GT_32_SIGNALS
static SLONG VOLATILE pending_signals[2];
static SLONG volatile pending_signals[2];
#else
static SLONG VOLATILE pending_signals = 0;
static SLONG volatile pending_signals = 0;
#endif
static int process_id = 0;
@ -167,7 +169,7 @@ static int process_id = 0;
#define SHMEM_DELTA (1 << 22)
#endif
static int VOLATILE relay_pipe = 0;
static int volatile relay_pipe = 0;
#endif

View File

@ -2222,7 +2222,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
USHORT trunc_flag;
struct stat file_stat;
union semun arg;
#ifdef NO_FLOCK
#ifndef HAVE_FLOCK
struct flock lock;
#endif
@ -2259,7 +2259,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
return NULL;
}
#ifdef NO_FLOCK
#ifndef HAVE_FLOCK
/* get an exclusive lock on the INIT file with a block */
lock.l_type = F_WRLCK;
lock.l_whence = 0;
@ -2285,7 +2285,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
if (fd == -1) {
error(status_vector, "open", errno);
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
/* unlock init file */
flock(fd_init, LOCK_UN);
#else
@ -2305,7 +2305,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
if (fstat(fd, &file_stat) == -1) {
error(status_vector, "fstat", errno);
close(fd);
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
/* unlock init file */
flock(fd_init, LOCK_UN);
#else
@ -2341,7 +2341,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
flock(fd, LOCK_UN);
#endif
close(fd);
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
/* unlock init file */
flock(fd_init, LOCK_UN);
#else
@ -2367,7 +2367,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
flock(fd, LOCK_UN);
#endif
close(fd);
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
/* unlock init file */
flock(fd_init, LOCK_UN);
#else
@ -2396,7 +2396,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
/* Try to get an exclusive lock on the lock file. This will
fail if somebody else has the exclusive lock */
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
#ifndef DECOSF
if (!flock(fd, LOCK_EX | LOCK_NB))
#else
@ -2438,7 +2438,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
if (trunc_flag)
ftruncate(fd, length);
(*init_routine) (init_arg, shmem_data, TRUE);
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
if (flock(fd, LOCK_SH)) {
error(status_vector, "flock", errno);
flock(fd, LOCK_UN);
@ -2494,7 +2494,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
}
}
else {
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
if (flock(fd, LOCK_SH)) {
error(status_vector, "flock", errno);
flock(fd, LOCK_UN);
@ -2529,7 +2529,7 @@ UCHAR *ISC_map_file(STATUS * status_vector,
(*init_routine) (init_arg, shmem_data, FALSE);
}
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
/* unlock the init file to release the other process */
flock(fd_init, LOCK_UN);
#else

View File

@ -3645,7 +3645,7 @@ STATUS DLL_EXPORT GDS_START_MULTIPLE(STATUS * user_status,
* Start a transaction.
*
**************************************/
VOLATILE TRA transaction, prior;
volatile TRA transaction, prior;
STATUS temp_status[ISC_STATUS_LENGTH];
TEB *v, *end;
ATT attachment;

View File

@ -35,7 +35,7 @@
*
*/
/*
$Id: met.epp,v 1.14 2002-09-01 15:44:46 dimitr Exp $
$Id: met.epp,v 1.15 2002-09-11 11:30:44 eku Exp $
*/
// This MUST be at the top of the file
#ifdef DARWIN
@ -3046,7 +3046,7 @@ void MET_scan_relation( TDBB tdbb, REL relation)
UCHAR *p, *q, *buffer, temp[256];
STR name, string;
JrdMemoryPool* old_pool;
VOLATILE BOOLEAN dependencies, sys_triggers;
volatile BOOLEAN dependencies, sys_triggers;
SET_TDBB(tdbb);
dbb = tdbb->tdbb_database;

View File

@ -210,7 +210,7 @@ void SCL_check_index( TDBB tdbb, TEXT * index_name, UCHAR index_id, USHORT mask)
* becomes relation_name since index ids are relative to tables.
*
*******************************************************/
VOLATILE BLK request;
volatile BLK request;
SCL s_class, default_s_class;
TEXT reln_name[32], aux_idx_name[32];
TEXT *idx_name_ptr = index_name, *relation_name_ptr = index_name;
@ -589,7 +589,7 @@ void SCL_init(BOOLEAN create,
**************************************/
DBB dbb;
BLK handle, handle1;
VOLATILE BLK request;
volatile BLK request;
USR user;
TEXT name[129], project[33], organization[33], *p;
USHORT length;
@ -1130,7 +1130,7 @@ static SLONG compute_access(TDBB tdbb,
SLONG privileges;
TEXT *acl;
TEXT *buffer;
VOLATILE STR str_buffer = NULL;
volatile STR str_buffer = NULL;
SLONG length = BLOB_BUFFER_SIZE, *length_ptr = &length;
SET_TDBB(tdbb);
@ -1261,7 +1261,7 @@ static SLONG walk_acl(TDBB tdbb,
TEXT c;
TEXT* p;
//BOOLEAN is_member = FALSE;
VOLATILE BLK request;
volatile BLK request;
DBB dbb;
TEXT* role_name;

View File

@ -932,7 +932,7 @@ void SDW_start(
FIL dbb_file, shadow_file = 0;
WIN window;
HDR database_header, shadow_header;
VOLATILE USHORT header_fetched = 0;
volatile USHORT header_fetched = 0;
SLONG *spare_buffer = NULL, *spare_page;
tdbb = GET_THREAD_DATA;

View File

@ -74,11 +74,13 @@
#include <unistd.h>
#endif
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
#ifdef sparc
#ifdef SOLARIS
#include <fcntl.h>
#else
#include <vfork.h>
#endif
#endif

View File

@ -102,7 +102,7 @@ extern "C" {
#define SYNC O_SYNC
#endif
/* CHanged to not redfine SYNC if O_SYNC already exists
/* Changed to not redfine SYNC if O_SYNC already exists
they seem to be the same values anyway. MOD 13-07-2001 */
#if (!(defined SYNC) && (defined O_FSYNC))
#define SYNC O_FSYNC

View File

@ -24,7 +24,7 @@
*
*/
/*
$Id: lock.cpp,v 1.10 2002-08-26 12:10:18 eku Exp $
$Id: lock.cpp,v 1.11 2002-09-11 11:30:44 eku Exp $
*/
#include "firebird.h"
@ -70,11 +70,9 @@ $Id: lock.cpp,v 1.10 2002-08-26 12:10:18 eku Exp $
#include <string.h>
#endif
#ifdef sparc
#ifndef SOLARIS
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
#endif
#if ( defined DELTA || defined IMP )
#define waitpid(x,y,z) wait (y)
@ -260,10 +258,10 @@ static void wakeup_action(PTR *);
static struct own LOCK_process_owner; /* Place holder */
static SSHORT LOCK_bugcheck = 0;
static LHB VOLATILE LOCK_header = NULL;
static LHB volatile LOCK_header = NULL;
static PTR LOCK_owner_offset = 0;
static OWN LOCK_owner = 0;
static SSHORT VOLATILE LOCK_asts = -1;
static SSHORT volatile LOCK_asts = -1;
static int LOCK_pid = 0, LOCK_version = 0;
static SLONG LOCK_shm_size = 0, LOCK_sem_count = 0;

View File

@ -1,4 +1,4 @@
#ident "$Id: config.h.in,v 1.31 2002-09-03 13:24:20 eku Exp $"
#ident "$Id: config.h.in,v 1.32 2002-09-11 11:30:44 eku Exp $"
/*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
@ -42,6 +42,7 @@
#undef HAVE_READLINE_READLINE_H
#undef HAVE_UNISTD_H
#undef HAVE_VARARGS_H
#undef HAVE_VFORK_H
/* Functions */
#undef HAVE_STRLCPY
@ -55,6 +56,13 @@
#undef HAVE_SIGACTION
#undef HAVE_SNPRINTF
#undef HAVE_MMAP
#undef HAVE_ATEXIT
#undef HAVE_ON_EXIT
#undef HAVE_WORKING_VFORK
#undef HAVE_SETPGRP
#undef HAVE_SETPGID
#undef SETPGRP_VOID
#undef HAVE_FLOCK
/* Types */
#undef socklen_t

View File

@ -361,8 +361,18 @@ fprintf (stderr, "gds_pipe here argc = %d argv[1] = '%s' getpid = %d\n",
*/
#ifndef DEBUG
SETPGRP;
#endif
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
(void)setpgrp();
#else
(void)setpgrp(0, 0);
#endif /* SETPGRP_VOID */
#else
#ifdef HAVE_SETPGID
(void)setpgid(0, 0);
#endif /* HAVE_SETPGID */
#endif /* HAVE_SETPGRP */
#endif /*!DEBUG */
signal (SIGINT, SIG_IGN);
signal (SIGQUIT, SIG_IGN);

View File

@ -28,7 +28,7 @@
*
*/
/* $Id: head.cpp,v 1.10 2002-08-22 10:57:37 dimitr Exp $ */
/* $Id: head.cpp,v 1.11 2002-09-11 11:30:45 eku Exp $ */
#include "firebird.h"
#include "../jrd/ib_stdio.h"
@ -59,11 +59,13 @@
#include <unistd.h>
#endif
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
#ifdef sparc
#ifdef SOLARIS
#include <fcntl.h>
#else
#include <vfork.h>
#endif
#endif

View File

@ -45,11 +45,9 @@
#include <unistd.h>
#endif
#ifdef sparc
#ifndef SOLARIS
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
#endif
#ifndef FOPEN_WRITE_TYPE
#define FOPEN_WRITE_TYPE "w"

View File

@ -95,7 +95,15 @@ void divorce_terminal( fd_set * mask)
/* Finally, get out of the process group */
#ifndef NETWARE_386
setpgrp(0, 0);
#endif
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
(void)setpgrp();
#else
(void)setpgrp(0, 0);
#endif /* SETPGRP_VOID */
#else
#ifdef HAVE_SETPGID
(void)setpgid(0, 0);
#endif /* HAVE_SETPGID */
#endif /* HAVE_SETPGRP */
}

View File

@ -255,7 +255,7 @@ void SRVR_multi_thread( PORT main_port, USHORT flags)
#else
SERVER_REQ request = NULL, active;
VOLATILE PORT port = NULL;
volatile PORT port = NULL;
SLONG pending_requests;
P_OP operation;
#ifdef DEV_BUILD

View File

@ -94,7 +94,17 @@ int CLIB_ROUTINE main( int argc, char **argv)
if (setreuid(0, 0) < 0)
ib_printf("Shared cache manager: couldn't set uid to superuser\n");
SETPGRP;
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
(void)setpgrp();
#else
(void)setpgrp(0, 0);
#endif /* SETPGRP_VOID */
#else
#ifdef HAVE_SETPGID
(void)setpgid(0, 0);
#endif /* HAVE_SETPGID */
#endif /* HAVE_SETPGRP */
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);

View File

@ -63,10 +63,20 @@ int CLIB_ROUTINE main( int argc, char **argv)
#ifndef DEBUG
if (setreuid(0, 0) < 0)
ib_printf("gds_relay: couldn't set uid to superuser\n");
SETPGRP;
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
(void)setpgrp();
#else
(void)setpgrp(0, 0);
#endif /* SETPGRP_VOID */
#else
#ifdef HAVE_SETPGID
(void)setpgid(0, 0);
#endif /* HAVE_SETPGID */
#endif /* HAVE_SETPGRP */
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
#endif
#endif /* !DEBUG */
/* Get the file descriptor ID - if it is present - make sure it's valid */
if (argc < 2 || (!(fd = atoi(argv[1])) && strcmp(argv[1], "0")))

View File

@ -21,7 +21,7 @@
* Contributor(s): ______________________________________.
*/
/*
$Id: util.cpp,v 1.5 2002-09-08 07:56:50 dimitr Exp $
$Id: util.cpp,v 1.6 2002-09-11 11:30:45 eku Exp $
*/
#include "firebird.h"
@ -31,7 +31,7 @@ $Id: util.cpp,v 1.5 2002-09-08 07:56:50 dimitr Exp $
#include <fcntl.h> /* for open() and fcntl() */
#include <errno.h>
#ifndef NO_FLOCK
#ifdef HAVE_FLOCK
#include <sys/file.h> /* for flock() */
#endif
@ -175,7 +175,7 @@ int UTIL_ex_lock( TEXT * file)
TEXT expanded_filename[MAXPATHLEN], tmp[MAXPATHLEN], hostname[64];
int fd_file; /* file fd for the opened and locked file */
#ifdef NO_FLOCK
#ifndef HAVE_FLOCK
struct flock lock;
#endif
@ -191,7 +191,7 @@ int UTIL_ex_lock( TEXT * file)
assert(fd_file != -2);
#ifdef NO_FLOCK
#ifndef HAVE_FLOCK
/* get an exclusive lock on the GUARD file without blocking on the call */
lock.l_type = F_WRLCK;
lock.l_whence = 0;
@ -224,7 +224,7 @@ void UTIL_ex_unlock( int fd_file)
**************************************/
#ifdef NO_FLOCK
#ifndef HAVE_FLOCK
struct flock lock;