8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00

Merged change from fb1.

This commit is contained in:
skywalker 2002-07-01 16:59:09 +00:00
parent ed27d8ed15
commit 82d8017317
23 changed files with 1598 additions and 1561 deletions

325
configure vendored
View File

@ -1474,7 +1474,7 @@ else
fi
done
for ac_hdr in libio.h
for ac_hdr in pwd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1514,7 +1514,7 @@ else
fi
done
for ac_hdr in sys/types.h
for ac_hdr in libio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1554,7 +1554,7 @@ else
fi
done
for ac_hdr in sys/stat.h
for ac_hdr in locale.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1594,7 +1594,7 @@ else
fi
done
for ac_hdr in sys/uio.h
for ac_hdr in math.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1634,7 +1634,7 @@ else
fi
done
for ac_hdr in sys/wait.h
for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1674,7 +1674,7 @@ else
fi
done
for ac_hdr in time.h
for ac_hdr in sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1714,7 +1714,7 @@ else
fi
done
for ac_hdr in sys/time.h
for ac_hdr in sys/stat.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1754,7 +1754,7 @@ else
fi
done
for ac_hdr in sys/param.h
for ac_hdr in sys/uio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1794,7 +1794,7 @@ else
fi
done
for ac_hdr in varargs.h
for ac_hdr in sys/wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1834,7 +1834,7 @@ else
fi
done
for ac_hdr in stdarg.h
for ac_hdr in time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1874,7 +1874,7 @@ else
fi
done
for ac_hdr in stdlib.h
for ac_hdr in sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1914,7 +1914,7 @@ else
fi
done
for ac_hdr in ctype.h
for ac_hdr in sys/timeb.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1954,7 +1954,7 @@ else
fi
done
for ac_hdr in string.h
for ac_hdr in sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1994,7 +1994,7 @@ else
fi
done
for ac_hdr in signal.h
for ac_hdr in varargs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2034,7 +2034,7 @@ else
fi
done
for ac_hdr in readline/readline.h
for ac_hdr in stdarg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2074,12 +2074,251 @@ else
fi
done
for ac_hdr in stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2082: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2087 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in ctype.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2122: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2127 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in string.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2162: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2167 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in signal.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2202: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2207 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in readline/readline.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2242: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2247 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in pwd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2282: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2287 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking Checking for socklen_t type""... $ac_c" 1>&6
echo "configure:2081: checking Checking for socklen_t type" >&5
echo "configure:2320: checking Checking for socklen_t type" >&5
cat > conftest.$ac_ext <<EOF
#line 2083 "configure"
#line 2322 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/types.h>
@ -2089,7 +2328,7 @@ int main() {
socklen_t a;
; return 0; }
EOF
if { (eval echo configure:2093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@ -2104,15 +2343,21 @@ fi
rm -f conftest*
cat >> confdefs.h <<\EOF
#define UNIX_64_BIT_IO 1
EOF
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:2109: checking whether byte ordering is bigendian" >&5
echo "configure:2354: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 2116 "configure"
#line 2361 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@ -2123,11 +2368,11 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 2131 "configure"
#line 2376 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@ -2138,7 +2383,7 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:2142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@ -2158,7 +2403,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 2162 "configure"
#line 2407 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@ -2171,7 +2416,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@ -2195,12 +2440,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2199: checking for working const" >&5
echo "configure:2444: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2204 "configure"
#line 2449 "configure"
#include "confdefs.h"
int main() {
@ -2249,7 +2494,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:2253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -2296,6 +2541,10 @@ EOF
;;
*-*-hpux*) MAKEFILE_PREFIX=hpux ; PLATFORM=hpux ; cat >> confdefs.h <<\EOF
#define hpux 1
EOF
;;
i386-pc-solaris*) MAKEFILE_PREFIX=solx86 ; PLATFORM=solx86 ; cat >> confdefs.h <<\EOF
#define solx86 1
EOF
;;
esac
@ -2341,7 +2590,7 @@ FIREBIRD_LIBGDS_SO_X_LNK=libgds.so.${MajorVer}
PROD_BUILD_FLG=
PROD_BUILD_FLG=
#PROD_BUILD_FLG=Y
@ -2380,6 +2629,12 @@ PROD_BUILD_FLG=
@ -2501,6 +2756,7 @@ src/dsql/Makefile:src/make.new/Makefile.in.dsql \
src/dudley/Makefile:src/make.new/Makefile.in.dudley \
src/v5_examples/Makefile:src/make.new/Makefile.in.example5 \
src/extlib/Makefile:src/make.new/Makefile.in.extlib \
src/extlib/fbudf/Makefile:src/make.new/Makefile.in.fbudf \
src/gpre/Makefile:src/make.new/Makefile.in.gpre \
src/intl/Makefile:src/make.new/Makefile.in.intl \
src/isql/Makefile:src/make.new/Makefile.in.isql \
@ -2645,6 +2901,7 @@ src/dsql/Makefile:src/make.new/Makefile.in.dsql \
src/dudley/Makefile:src/make.new/Makefile.in.dudley \
src/v5_examples/Makefile:src/make.new/Makefile.in.example5 \
src/extlib/Makefile:src/make.new/Makefile.in.extlib \
src/extlib/fbudf/Makefile:src/make.new/Makefile.in.fbudf \
src/gpre/Makefile:src/make.new/Makefile.in.gpre \
src/intl/Makefile:src/make.new/Makefile.in.intl \
src/isql/Makefile:src/make.new/Makefile.in.isql \
@ -2862,6 +3119,11 @@ cat >> $CONFIG_STATUS <<EOF
@ -2906,6 +3168,11 @@ mkdir -p gen/firebird/misc
mkdir -p gen/firebird/help
chmod a+x gen/install/install.sh
chmod a+x gen/install/scripts/*.sh
src/misc/writeBuildNum.sh rebuildHeader
mkdir -p gen/jrd/os
mkdir -p gen/jrd/os/darwin
mkdir -p gen/jrd/os/posix
mkdir -p gen/jrd/os/win32
exit 0
EOF

View File

@ -54,6 +54,9 @@ AC_TRY_COMPILE([#include <stdlib.h>
[AC_DEFINE(socklen_t, int) AC_MSG_RESULT(no)])
AC_DEFINE(UNIX_64_BIT_IO)
AC_C_BIGENDIAN
AC_C_CONST

File diff suppressed because it is too large Load Diff

View File

@ -77,7 +77,7 @@ HWND hPSDlg, hWndGbl;
static DWORD ServerPid = 0;
static int nRestarts = 0; /* the number of times the server was restarted */
unsigned short service_flag = TRUE;
unsigned short shutdown_flag = FALSE;
/* unsigned short shutdown_flag = FALSE; */
struct log_info *log_entry;
/* contains the guardian service */
@ -157,6 +157,7 @@ static unsigned short parse_args(LPSTR lpszArgs, unsigned short *pserver_flag)
* set the options.
* Returns
* A value of TRUE or FALSE depending on if -s is specified.
* CVC: Service is the default for NT, use -a for application.
*
*
**************************************/
@ -207,7 +208,7 @@ static int WINDOW_main(int option)
if (hWnd) {
char szMsgString[256];
LoadString(hInstance_gbl, IDS_ALREADYSTARTED, szMsgString, 256);
MessageBox(NULL, szMsgString, APP_NAME, MB_OK | MB_ICONHAND);
MessageBox(NULL, szMsgString, APP_LABEL, MB_OK | MB_ICONHAND);
gds__log(szMsgString);
return 0;
}
@ -227,7 +228,7 @@ static int WINDOW_main(int option)
if (!RegisterClass(&wcl)) {
char szMsgString[256];
LoadString(hInstance_gbl, IDS_REGERROR, szMsgString, 256);
MessageBox(NULL, szMsgString, APP_NAME, MB_OK);
MessageBox(NULL, szMsgString, APP_LABEL, MB_OK);
return 0;
}
@ -253,7 +254,7 @@ static int WINDOW_main(int option)
/* error starting server thread */
char szMsgString[256];
LoadString(hInstance_gbl, IDS_CANT_START_THREAD, szMsgString, 256);
MessageBox(NULL, szMsgString, APP_NAME, MB_OK);
MessageBox(NULL, szMsgString, APP_LABEL, MB_OK);
gds__log(szMsgString);
DestroyWindow(hWnd);
return (FALSE);
@ -428,7 +429,7 @@ static LRESULT CALLBACK WindowFunc(
nid.uFlags = NIF_TIP | NIF_ICON | NIF_MESSAGE;
nid.uCallbackMessage = ON_NOTIFYICON;
nid.hIcon = hIcon;
lstrcpy(nid.szTip, APP_NAME);
lstrcpy(nid.szTip, APP_LABEL);
/* This will be true if we are using the explorer interface */
bInTaskBar = Shell_NotifyIcon(NIM_ADD, &nid);
@ -545,7 +546,7 @@ void start_and_watch_server(char *server_name)
char szMsgString[256];
LoadString(hInstance_gbl, IDS_REGISTRY_INFO_MISSING, szMsgString,
256);
MessageBox(NULL, szMsgString, APP_NAME, MB_OK | MB_ICONSTOP);
MessageBox(NULL, szMsgString, APP_LABEL, MB_OK | MB_ICONSTOP);
write_log(IDS_REGISTRY_INFO_MISSING, szMsgString);
PostMessage(hWndGbl, WM_CLOSE, 0, 0);
Sleep(100);
@ -778,7 +779,7 @@ HWND DisplayPropSheet(HWND hParentWnd, HINSTANCE hInst)
PSHdr.hwndParent = hParentWnd;
PSHdr.hInstance = hInstance;
PSHdr.pszIcon = MAKEINTRESOURCE(IDI_IBGUARD);
PSHdr.pszCaption = (LPSTR) APP_NAME;
PSHdr.pszCaption = (LPSTR) APP_LABEL;
PSHdr.nPages = sizeof(PSPages) / sizeof(PROPSHEETPAGE);
PSHdr.nStartPage = 0;
PSHdr.ppsp = (LPCPROPSHEETPAGE) & PSPages;
@ -1057,7 +1058,7 @@ void write_log(int log_action, char *buff)
if (service_flag == TRUE) { /* on NT */
HANDLE hLog;
hLog = RegisterEventSource(NULL, "InterBase Guardian");
hLog = RegisterEventSource(NULL, ISCGUARD_SERVICE);
if (!hLog)
gds__log("Error opening Windows NT Event Log");
else {
@ -1099,7 +1100,7 @@ void write_log(int log_action, char *buff)
}
}
/* Write to the interbase log */
/* Write to the Firebird log */
if (*buff)
gds__log(buff);
}

View File

@ -16,7 +16,8 @@
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#define APP_NAME "InterBase Guardian"
#define APP_NAME "Firebird Guardian"
#define APP_LABEL "Firebird Guardian"
#define CLASS_NAME "IB_Guard"
#define IBSERVER "ibserver.exe"
#define GUARDIAN_HELP_FILE "ibserver.hlp"

View File

@ -25,13 +25,13 @@ STRINGTABLE
{
IDS_QUIT, "connections active; Are you sure you want to exit?"
IDS_REGERROR, "Error registering main window class"
IDS_ALREADYSTARTED, "The InterBase Guardian failed to startup\r\nbecause another instance of the guardian\r\nis already running."
IDS_INTRSVRPROPERTIES, "InterServer Properties..."
IDS_SVRPROPERTIES, "InterBase Properties..."
IDS_ALREADYSTARTED, "The Firebird Guardian failed to startup\r\nbecause another instance of the guardian\r\nis already running."
IDS_INTRSVRPROPERTIES, "Firebird Properties..."
IDS_SVRPROPERTIES, "Firebird Properties..."
IDS_PROPERTIES, "P&roperties"
IDS_SHUTDOWN, "&Shutdown"
IDS_CANT_START_THREAD, "The guardian was unable to launch the server thread."
IDS_REGISTRY_INFO_MISSING, "The registry information is missing.\r\nPlease run the InterBase Configuration Utility"
IDS_REGISTRY_INFO_MISSING, "The registry information is missing.\r\nPlease run the Firebird Configuration Utility"
IDS_STARTING_GUARD, "Guardian starting"
IDS_STARTUP_ERROR, "terminated because of startup errors"
IDS_ABNORMAL_TERM, "terminated abnormally"
@ -63,7 +63,7 @@ FONT 8, "MS Sans Serif"
CONTROL IDI_IBGUARD, IDI_IBGUARD, "static", SS_ICON | SS_REALSIZEIMAGE | WS_CHILD | WS_VISIBLE, 12, 9, 21, 20, 0
CONTROL "", IDC_RESTARTS, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 96, 80, 60, 8, 0
CONTROL "", IDC_LOCATION, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 44, 49, 144, 8, 0
CONTROL "InterBase Guardian for Windows", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 44, 12, 144, 8, 0
CONTROL "Firebird Guardian for Windows", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 44, 12, 144, 8, 0
CONTROL "Text7", IDC_VERSION, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 44, 61, 144, 8, 0
CONTROL "ListView1", IDC_LOG, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOLABELWRAP | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_BORDER, 12, 99, 184, 81
}

View File

@ -31,6 +31,7 @@
#include <stdlib.h>
#include <windows.h>
#include "../iscguard/iscguard.h"
#include "../utilities/registry.h"
int GetGuardStartupInfo(char *svrpath, char *opt)
{
@ -50,20 +51,26 @@ int GetGuardStartupInfo(char *svrpath, char *opt)
**************************************/
HKEY hKeyResult;
LPCSTR lpSubKey = "Software\\Borland\\InterBase\\CurrentVersion";
// LPCSTR lpSubKey = "Software\\Borland\\InterBase\\CurrentVersion";
DWORD buffSize, retval;
buffSize = MAX_PATH - 2; /* reserve place for null and the \ */
retval =
RegOpenKeyEx(HKEY_LOCAL_MACHINE, lpSubKey, 0, KEY_QUERY_VALUE,
&hKeyResult);
retval =
RegQueryValueEx(hKeyResult, "ServerDirectory", NULL, NULL,
retval = RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_KEY_ROOT_CUR_VER,
0, KEY_QUERY_VALUE, &hKeyResult);
if (retval != ERROR_SUCCESS) {
return 0;
}
retval = RegQueryValueEx(hKeyResult, "ServerDirectory", NULL, NULL,
reinterpret_cast < LPBYTE > (svrpath), &buffSize);
/* if there is a value check for the last charecter if it is not a \ then
* add a \
*/
if (retval != ERROR_SUCCESS) {
return 0;
}
/* if there is a value check for the last charecter if it is not a \ then
* add a \
*/
if (buffSize) {
/* buffSize includes the null character in its size hence it is strlen + 1 */
if (svrpath[buffSize - 2] != '\\') {

View File

@ -64,7 +64,7 @@ static int translate_status(STATUS *, STATUS *, SCHAR **);
static SLONG user_codes[] = {
1,
#include "../jrd/rdb_codes.h"
#include "../include/gen/rdb_codes.h"
};
static SCHAR workbuf[1024];

View File

@ -21,10 +21,21 @@
* Contributor(s): ______________________________________.
*
* 2002-02-24 Sean Leyne - Code Cleanup of old Win 3.1 port (WINDOWS_ONLY)
* 2001.6.25 Claudio Valderrama: Finish MET_lookup_generator_id() by
* assigning it a number in the compiled requests table.
*
* 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
* conditionals, as the engine now fully supports
* readonly databases.
* 2001.10.03 Claudio Valderrama: MET_relation_owns_trigger() determines if
* there's a row in rdb$triggers with the given relation's and trigger's names.
* 2001.10.04 Claudio Valderrama: MET_relation_default_class() determines if the
* given security class name is the default security class for a relation.
* Modify MET_lookup_field() so it can verify the field's security class, too.
*
*/
/*
$Id: met.epp,v 1.10 2002-06-14 12:09:36 dimitr Exp $
$Id: met.epp,v 1.11 2002-07-01 16:59:09 skywalker Exp $
*/
// This MUST be at the top of the file
#ifdef DARWIN
@ -955,8 +966,7 @@ void MET_load_trigger(
void DLL_EXPORT MET_lookup_cnstrt_for_index(
TDBB tdbb,
void DLL_EXPORT MET_lookup_cnstrt_for_index(TDBB tdbb,
TEXT * constraint_name,
TEXT * index_name)
{
@ -1156,7 +1166,7 @@ SLONG MET_lookup_exception_number(TDBB tdbb, TEXT * name)
}
int MET_lookup_field(TDBB tdbb, REL relation, CONST TEXT* name)
int MET_lookup_field(TDBB tdbb, REL relation, CONST TEXT* name, CONST TEXT* security_name)
{
/**************************************
*
@ -1166,6 +1176,9 @@ int MET_lookup_field(TDBB tdbb, REL relation, CONST TEXT* name)
*
* Functional description
* Look up a field name.
* Additinally, if security_name is a not null pointer,
* it's used to include the condition that it should match
* the field's security class name, too.
*
**************************************/
DBB dbb;
@ -1185,21 +1198,28 @@ int MET_lookup_field(TDBB tdbb, REL relation, CONST TEXT* name)
if ( (vector = relation->rel_fields) )
{
length = strlen(name);
for (field = vector->begin(),
id = 0,
end = vector->end();
field < end;
field++, id++)
{
if (*field &&
((FLD)(*field))->fld_length == length &&
(p = ((FLD)(*field))->fld_name))
{
for (field = vector->begin(), id = 0, end = vector->end(); field < end; field++, id++) {
if (*field && ((FLD)(*field))->fld_length == length &&
(p = ((FLD)(*field))->fld_name)) {
q = name;
while (*p++ == *q)
{
while (*p++ == *q) {
if (!*q++) {
return id;
USHORT nl, nl2;
if (!security_name) {
return id;
}
nl2 = name_length (security_name);
if ((*field)->fld_security_name
&& (nl = name_length ((*field)->fld_security_name)) == nl2
&& !strncmp ((*field)->fld_security_name, security_name, nl)) {
return id;
}
}
}
}
@ -1222,15 +1242,27 @@ int MET_lookup_field(TDBB tdbb, REL relation, CONST TEXT* name)
X.RDB$RELATION_NAME EQ relation->rel_name AND
X.RDB$FIELD_NAME EQ name
if (!REQUEST(irq_l_field))
{
if (!REQUEST(irq_l_field)) {
REQUEST(irq_l_field) = request;
}
id = X.RDB$FIELD_ID;
if (!security_name) {
id = X.RDB$FIELD_ID;
}
else {
USHORT nl, nl2;
nl2 = name_length (security_name);
if (!X.RDB$SECURITY_CLASS.NULL
&& (nl = name_length (X.RDB$SECURITY_CLASS)) == nl2
&& !strncmp (X.RDB$SECURITY_CLASS, security_name, nl)) {
id = X.RDB$FIELD_ID;
}
}
END_FOR;
if (!REQUEST(irq_l_field))
{
if (!REQUEST(irq_l_field)) {
REQUEST(irq_l_field) = request;
}
@ -1252,7 +1284,6 @@ BLF MET_lookup_filter(TDBB tdbb, SSHORT from, SSHORT to)
DBB dbb;
BLK request;
PTR filter;
//TEXT *p;
MOD module;
LLS stack;
BLF blf_;
@ -1338,6 +1369,8 @@ SLONG MET_lookup_generator(TDBB tdbb, TEXT * name)
*
* Functional description
* Lookup generator (aka gen_id). If we can't find it, make a new one.
* CVC: I don't see how this function "makes" a new generator; it simply
* returns -1 if the name is not found.
*
**************************************/
DBB dbb;
@ -1369,9 +1402,47 @@ SLONG MET_lookup_generator(TDBB tdbb, TEXT * name)
return gen_id;
}
void MET_lookup_generator_id (TDBB tdbb, SLONG gen_id, TEXT *name)
{
/**************************************
*
* M E T _ l o o k u p _ g e n e r a t o r _ i d
*
**************************************
*
* Functional description
* Lookup generator (aka gen_id) by ID. It will load
* the name in the third parameter.
*
**************************************/
DBB dbb;
BLK request;
void DLL_EXPORT MET_lookup_index(
TDBB tdbb,
SET_TDBB (tdbb);
dbb = tdbb->tdbb_database;
if (!gen_id) {
strcpy (name, "RDB$GENERATORS");
return;
}
*name = 0;
request = (BLK) CMP_find_request (tdbb, irq_r_gen_id_num, IRQ_REQUESTS);
FOR (REQUEST_HANDLE request)
X IN RDB$GENERATORS WITH X.RDB$GENERATOR_ID EQ gen_id
if (!REQUEST (irq_r_gen_id_num))
REQUEST (irq_r_gen_id_num) = request;
name_copy (name, X.RDB$GENERATOR_NAME);
END_FOR;
if (!REQUEST (irq_r_gen_id_num))
REQUEST (irq_r_gen_id_num) = request;
}
void DLL_EXPORT MET_lookup_index(TDBB tdbb,
TEXT * index_name,
TEXT * relation_name, USHORT number)
{
@ -2638,6 +2709,114 @@ REL MET_relation(TDBB tdbb, USHORT id)
}
BOOLEAN MET_relation_owns_trigger (TDBB tdbb, TEXT *relation_name,
TEXT *trigger_name)
{
/**************************************
*
* M E T _ r e l a t i o n _ o w n s _ t r i g g e r
*
**************************************
*
* Functional description
* Checks that a given trigger is defined for a
* given relation, returning TRUE if there's a match.
* It's almost a subset of MET_load_trigger().
*
**************************************/
DBB dbb;
BLK trigger_request;
BOOLEAN found = FALSE;
SET_TDBB (tdbb);
dbb = tdbb->tdbb_database;
CHECK_DBB (dbb);
/* No need to load triggers for ReadOnly databases,
since INSERT/DELETE/UPDATE statements are not going to be allowed;
but we do not care of this flag here. We do not load, we only check. */
/*if (dbb->dbb_flags & DBB_read_only)
return;*/
/* Scan RDB$TRIGGERS next */
/* CVC: Notice that we'll use the request irq_s_triggers2 that was found
to be unused at this time. */
trigger_request = (BLK) CMP_find_request (tdbb, irq_s_triggers2, IRQ_REQUESTS);
FOR (REQUEST_HANDLE trigger_request)
TRG IN RDB$TRIGGERS WITH TRG.RDB$RELATION_NAME = relation_name AND
TRG.RDB$TRIGGER_NAME EQ trigger_name
if (!REQUEST (irq_s_triggers2))
REQUEST (irq_s_triggers2) = trigger_request;
found = TRUE;
/* Notice we do not care whether the trigger is valid or not. We assume
the caller wants to verify already validated entities.
if (TRG.RDB$TRIGGER_TYPE > 0 && TRG.RDB$TRIGGER_TYPE < TRIGGER_MAX)
*/
END_FOR;
if (!REQUEST (irq_s_triggers2))
REQUEST (irq_s_triggers2) = trigger_request;
return found;
}
BOOLEAN MET_relation_default_class (TDBB tdbb, TEXT *relation_name,
TEXT *default_security_class_name)
{
/**************************************
*
* M E T _ r e l a t i o n _ d e f a u l t _ c l a s s
*
**************************************
*
* Functional description
* Checks that a given security class is the default for
* a given relation, returning TRUE if there's a match.
* It can be made obsolete in the future if REL struct
* gets another field, although metadata loading order
* would not be safe when compared with this function.
*
**************************************/
DBB dbb;
BLK request;
BOOLEAN found = FALSE;
SET_TDBB (tdbb);
dbb = tdbb->tdbb_database;
CHECK_DBB (dbb);
request = (BLK) CMP_find_request (tdbb, irq_l_relation_defsec, IRQ_REQUESTS);
FOR (REQUEST_HANDLE request)
REL IN RDB$RELATIONS WITH REL.RDB$RELATION_NAME EQ relation_name
if (!REQUEST (irq_l_relation_defsec))
REQUEST (irq_l_relation_defsec) = request;
if (!REL.RDB$DEFAULT_CLASS.NULL) {
USHORT nl = name_length (REL.RDB$DEFAULT_CLASS),
nl2 = name_length (default_security_class_name);
if (nl == nl2 && !strncmp (REL.RDB$DEFAULT_CLASS, default_security_class_name, nl)) {
found = TRUE;
}
}
END_FOR;
if (!REQUEST (irq_l_relation_defsec))
REQUEST (irq_l_relation_defsec) = request;
return found;
}
void MET_release_existence( REL relation)
{
/**************************************
@ -3053,6 +3232,14 @@ void MET_scan_relation( TDBB tdbb, REL relation)
*/
strcpy((char*)field->fld_name, (char*)p);
field->fld_length = strlen(field->fld_name);
// CVC: Be paranoid and allow the possible trigger(s) to have a
// not null security class to work on, even if we only take it
// from the relation itself.
if (!field->fld_security_name && !REL.RDB$DEFAULT_CLASS.NULL) {
field->fld_security_name = MET_save_name (tdbb, REL.RDB$DEFAULT_CLASS);
}
break;
case RSR_view_context:
@ -3681,7 +3868,6 @@ static BOOLEAN par_messages(TDBB tdbb,
* a format (fmt) block.
*
**************************************/
//UCHAR *end;
fmt::fmt_desc_iterator desc;
FMT format;
USHORT count, offset, align, msg_number;
@ -3992,30 +4178,35 @@ static void store_dependencies(TDBB tdbb,
if (!node->nod_arg[e_dep_object])
continue;
dpdo_type = (SSHORT) node->nod_arg[e_dep_object_type];
if (dpdo_type == obj_relation)
{
relation = NULL;
procedure = NULL;
switch (dpdo_type) {
case obj_relation:
relation = (REL) node->nod_arg[e_dep_object];
dpdo_name = relation->rel_name;
}
else
{
relation = NULL;
}
if (dpdo_type == obj_procedure)
{
procedure = (PRC) node->nod_arg[e_dep_object];
dpdo_name = (TEXT*) procedure->prc_name->str_data;
}
else
{
procedure = NULL;
}
if (dpdo_type == obj_exception)
{
number = (SLONG) node->nod_arg[e_dep_object];
MET_lookup_exception(tdbb, number, name, NULL);
dpdo_name = name;
}
break;
case obj_procedure:
procedure = (PRC) node->nod_arg [e_dep_object];
dpdo_name = procedure->prc_name->str_data;
break;
case obj_exception:
number = (SLONG) node->nod_arg [e_dep_object];
MET_lookup_exception (tdbb, number, name, NULL);
dpdo_name = name;
break;
/* CVC: Here I'm going to track those pesky things named generators and UDFs. */
case obj_generator:
number = (SLONG) node->nod_arg [e_dep_object];
MET_lookup_generator_id (tdbb, number, name);
dpdo_name = name;
break;
case obj_udf: {
FUN udf = (FUN) node->nod_arg [e_dep_object];
dpdo_name = udf->fun_symbol->sym_string;
}
break;
}
field_node = node->nod_arg[e_dep_field];
field_name = NULL;

View File

@ -54,9 +54,10 @@ void DLL_EXPORT MET_lookup_cnstrt_for_index(TDBB, TEXT *, TEXT *);
void MET_lookup_cnstrt_for_trigger(TDBB, TEXT *, TEXT *, TEXT *);
void MET_lookup_exception(TDBB, SLONG, /* INOUT */ TEXT*, /* INOUT */ TEXT*);
SLONG MET_lookup_exception_number(TDBB, TEXT*);
int MET_lookup_field(TDBB, struct rel*, CONST TEXT*);
int MET_lookup_field(TDBB, struct rel*, CONST TEXT*, CONST TEXT*);
BLF MET_lookup_filter(TDBB, SSHORT, SSHORT);
SLONG MET_lookup_generator(TDBB, TEXT *);
void MET_lookup_generator_id(TDBB, SLONG, TEXT *);
void DLL_EXPORT MET_lookup_index(TDBB, TEXT *, TEXT *, USHORT);
SLONG MET_lookup_index_name(TDBB, TEXT *, SLONG *, SSHORT *);
int MET_lookup_partner(TDBB, struct rel *, struct idx *, UCHAR *);
@ -71,6 +72,8 @@ int MET_post_existence(TDBB, struct rel *);
void MET_prepare(TDBB, struct tra *, USHORT, UCHAR *);
struct prc *MET_procedure(TDBB, int, USHORT);
struct rel *MET_relation(TDBB, USHORT);
extern BOOLEAN MET_relation_owns_trigger (TDBB, TEXT *, TEXT *);
extern BOOLEAN MET_relation_default_class (TDBB, TEXT *, TEXT *);
void MET_release_existence(struct rel *);
void MET_release_triggers(TDBB, VEC *);
void MET_remove_procedure(TDBB, int, PRC);

View File

@ -189,6 +189,9 @@ NODE(nod_asn_list, asn_list, "")
NODE(nod_set_generator2, set_generator, "")
NODE(nod_total2, total, "SUM")
NODE (nod_current_role, current_role, "")
NODE (nod_breakleave, breakleave, "")
/* EXECUTE VARCHAR */
NODE(nod_exec_sql, exec_sql, "EXECUTE VARCHAR")

View File

@ -41,5 +41,8 @@
#define obj_count 11
#define obj_user_group 12
#define obj_sql_role 13
#define obj_generator 14
#define obj_udf 15
#define obj_blob_filter 16
#endif /* _JRD_OBJ_H_ */

View File

@ -19,9 +19,15 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* 2001.07.28: John Bellardo: Added code to handle rse_skip nodes.
* 2001.07.17 Claudio Valderrama: Stop crash with indices and recursive calls
* of OPT_compile: indicator csb_indices set to zero after used memory is
* returned to the free pool.
* 2001.02.15: Claudio Valderrama: Don't obfuscate the plan output if a selectable
* stored procedure doesn't access tables, views or other procedures directly.
*/
/*
$Id: opt.cpp,v 1.8 2002-06-20 10:10:27 dimitr Exp $
$Id: opt.cpp,v 1.9 2002-07-01 16:59:09 skywalker Exp $
*/
#include "firebird.h"
@ -104,6 +110,7 @@ static RSB gen_residual_boolean(TDBB, register OPT, RSB);
static RSB gen_retrieval(TDBB, OPT, SSHORT, NOD *, NOD *, BOOLEAN, BOOLEAN,
NOD *);
static RSB gen_rsb(TDBB, OPT, RSB, NOD, SSHORT, REL, STR, NOD, float);
static RSB gen_skip (TDBB, OPT, RSB, NOD);
static RSB gen_sort(TDBB, OPT, UCHAR *, UCHAR *, RSB, NOD, USHORT);
static BOOLEAN gen_sort_merge(TDBB, OPT, LLS *);
static RSB gen_union(TDBB, OPT, NOD, UCHAR *, USHORT);
@ -595,7 +602,14 @@ RSB OPT_compile(TDBB tdbb,
rsb = gen_sort(tdbb, opt_, beds, key_streams, rsb, sort, FALSE);
}
/* If there's a FIRST n clause, handle it */
/* Handle first and/or skip. The skip MUST (if present)
* appear in the rsb list AFTER the first. Since the gen_first and gen_skip
* functions add their nodes at the beginning of the rsb list we MUST call
* gen_skip before gen_first.
**/
if (rse->rse_skip)
rsb = gen_skip(tdbb, opt_, rsb, rse->rse_skip);
if (rse->rse_first)
rsb = gen_first(tdbb, opt_, rsb, rse->rse_first);
@ -607,6 +621,13 @@ RSB OPT_compile(TDBB tdbb,
if (csb->csb_rpt[stream].csb_idx_allocation)
delete csb->csb_rpt[stream].csb_idx_allocation;
csb->csb_rpt[stream].csb_idx_allocation = 0;
// CVC: The following line added because OPT_compile is recursive, both directly
// and through gen_union(), too. Otherwise, we happen to step on deallocated memory
// and this is the cause of the crashes with indices that have plagued IB since v4.
csb->csb_rpt [stream].csb_indices = 0;
}
DEBUG
@ -1458,6 +1479,9 @@ static BOOLEAN computable(CSB csb,
if ((sub = rse->rse_first) && !computable(csb, sub, stream, idx_use))
return FALSE;
if ((sub = rse->rse_skip) && !computable (csb, sub, stream, idx_use))
return FALSE;
/* Set sub-streams of rse active */
for (ptr = rse->rse_relation, end = ptr + rse->rse_count; ptr < end;
@ -2035,6 +2059,30 @@ static BOOLEAN dump_rsb(REQ request,
procedure = rsb->rsb_procedure;
if (!procedure || !procedure->prc_request)
return FALSE;
/* CVC: This is becoming trickier. There are procedures that don't have a plan
because they don't access tables. In this case, the engine gives up and swallows
the whole plan. Not acceptable. */
if (!procedure->prc_request->req_fors) {
STR n = procedure->prc_name;
length = (n && n->str_data) ? n->str_length : 0;
*buffer_length -= 5 + length;
if (*buffer_length < 0)
return FALSE;
*buffer++ = gds_info_rsb_begin;
*buffer++ = gds_info_rsb_relation;
*buffer++ = (SCHAR) length;
name = (SCHAR*) n->str_data;
while (length--)
*buffer++ = *name++;
*buffer++ = gds_info_rsb_type;
*buffer++ = gds_info_rsb_sequential;
/* *buffer++ = gds__info_rsb_unknown; */
*buffer++ = gds_info_rsb_end;
break;
}
if (!OPT_access_path
(procedure->prc_request, buffer, *buffer_length,
reinterpret_cast < USHORT * >(&return_length)))
@ -2048,6 +2096,10 @@ static BOOLEAN dump_rsb(REQ request,
*buffer++ = gds_info_rsb_first;
break;
case rsb_skip:
*buffer++ = gds_info_rsb_skip;
break;
case rsb_boolean:
*buffer++ = gds_info_rsb_boolean;
break;
@ -3065,6 +3117,11 @@ static RSB gen_first(TDBB tdbb, register OPT opt, RSB prior_rsb, NOD node)
* Compile and optimize a record selection expression into a
* set of record source blocks (rsb's).
*
*
* NOTE: The rsb_first node MUST appear in the rsb list before the
* rsb_skip node. The calling code MUST call gen_first after
* gen_skip.
*
**************************************/
register CSB csb;
register RSB rsb;
@ -3867,6 +3924,43 @@ static RSB gen_rsb(TDBB tdbb,
return rsb;
}
static RSB gen_skip (TDBB tdbb, register OPT opt, RSB prior_rsb, NOD node)
{
/**************************************
*
* g e n _ s k i p
*
**************************************
*
* Functional description
* Compile and optimize a record selection expression into a
* set of record source blocks (rsb's).
*
* NOTE: The rsb_skip node MUST appear in the rsb list after the
* rsb_first node. The calling code MUST call gen_skip before
* gen_first.
*
**************************************/
register CSB csb;
register RSB rsb;
DEV_BLKCHK (opt, type_opt);
DEV_BLKCHK (prior_rsb, type_rsb);
DEV_BLKCHK (node, type_nod);
SET_TDBB (tdbb);
csb = opt->opt_csb;
rsb = new(*tdbb->tdbb_default, 0) Rsb(); // was : rsb = (RSB) ALLOCDV (type_rsb, 1);
rsb->rsb_count = 1;
rsb->rsb_type = rsb_skip;
rsb->rsb_next = prior_rsb;
rsb->rsb_arg [0] = (RSB) node;
rsb->rsb_impure = CMP_impure (csb, sizeof (struct irsb_skip_n));
return rsb;
}
static RSB gen_sort(TDBB tdbb,
OPT opt,

View File

@ -121,7 +121,7 @@ static BOOLEAN find_type(SLONG, WIN *, PAG *, USHORT, USHORT, UCHAR **,
20 LINUX on sparc systems
21 FreeBSD/i386
22 NetBSD/i386
23 Darwin/PowerPC
23 Darwin/PowerPC
*/

View File

@ -19,9 +19,13 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*
* 27-May-2001 Claudio Valderrama: par_plan() no longer uppercases
* an index's name before doing a lookup of such index.
* 2001.07.28: Added parse code for blr_skip to support LIMIT.
*/
/*
$Id: par.cpp,v 1.8 2002-06-14 12:09:37 dimitr Exp $
$Id: par.cpp,v 1.9 2002-07-01 16:59:09 skywalker Exp $
*/
#include "firebird.h"
@ -385,7 +389,7 @@ NOD PAR_make_field(TDBB tdbb, CSB csb, USHORT context, TEXT * base_field)
**************************************/
SSHORT id;
USHORT stream;
TEXT name[32], *p;
TEXT name[32];
FLD field;
REL temp_rel;
NOD temp_node;
@ -394,11 +398,19 @@ NOD PAR_make_field(TDBB tdbb, CSB csb, USHORT context, TEXT * base_field)
stream = csb->csb_rpt[context].csb_stream;
for (p = name; *base_field && *base_field != ' ';)
*p++ = *base_field++;
*p = 0;
/* CVC: This is just another case of a custom function that isn't prepared
for quoted identifiers and that causes views with fields names like "z x"
to fail miserably. Since this function was truncating field names like "z x",
MET_lookup_field() call below failed and hence the function returned NULL
so only caller MET_scan_relation() did field->fld_source = 0;
This means a field without entry in rdb$fields. This is the origin of the
mysterious message "cannot access column z x in view VF" when selecting from
such view that has field "z x". This closes Firebird Bug #227758. */
id = MET_lookup_field(tdbb, csb->csb_rpt[stream].csb_relation, name);
strcpy (name, base_field);
MET_exact_name (name);
id = MET_lookup_field (tdbb, csb->csb_rpt [stream].csb_relation, name, 0);
if (id < 0)
return NULL;
@ -1163,7 +1175,7 @@ static NOD par_field(TDBB tdbb, CSB * csb, SSHORT operator_)
MET_scan_relation(tdbb, relation);
par_name(csb, name);
if ((id = MET_lookup_field(tdbb, relation, name)) < 0)
if ((id = MET_lookup_field(tdbb, relation, name, 0)) < 0)
if ((*csb)->csb_g_flags & csb_validation) {
id = 0;
flags |= nod_id;
@ -1273,6 +1285,15 @@ static NOD par_function(TDBB tdbb, CSB * csb)
node->nod_arg[e_fun_function] = (NOD) function;
node->nod_arg[e_fun_args] = par_args(tdbb, csb, VALUE);
/* CVC: I will track ufds only if a proc is not being dropped. */
if ((*csb)->csb_g_flags & csb_get_dependencies) {
NOD dep_node = PAR_make_node (tdbb, e_dep_length);
dep_node->nod_type = nod_dependency;
dep_node->nod_arg [e_dep_object] = (NOD) function;
dep_node->nod_arg [e_dep_object_type] = (NOD) obj_udf;
LLS_PUSH (dep_node, &(*csb)->csb_dependencies);
}
return node;
}
@ -1630,10 +1651,11 @@ static NOD par_plan(TDBB tdbb, CSB * csb)
/* pick up the index name and look up the appropriate ids */
par_name(csb, name);
for (p = name; *p; *p++)
*p = UPPER(*p);
index_id =
MET_lookup_index_name(tdbb, name, &relation_id, &idx_status);
/* CVC: We can't do this. Index names are identifiers.
for (p = name; *p; *p++)
*p = UPPER (*p);
*/
index_id = MET_lookup_index_name(tdbb, name, &relation_id, &idx_status);
if (idx_status == MET_object_unknown ||
idx_status == MET_object_inactive)
@ -2014,6 +2036,12 @@ static NOD par_rse(TDBB tdbb, CSB * csb, SSHORT rse_op)
rse->rse_first = parse(tdbb, csb, VALUE);
break;
case blr_skip:
if (rse_op == blr_rs_stream)
syntax_error (*csb, "rse stream clause");
rse->rse_skip = parse (tdbb, csb, VALUE);
break;
case blr_sort:
if (rse_op == blr_rs_stream)
syntax_error(*csb, "rse stream clause");
@ -2222,11 +2250,10 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected)
operator_ = BLR_BYTE;
if (!
(operator_ >= 0
&& operator_ <
sizeof(type_table) / sizeof(type_table[0]))) syntax_error(*csb,
"Invalid BLR code");
if (! (operator_ >= 0 &&
operator_ < sizeof(type_table) / sizeof(type_table[0]))) {
syntax_error(*csb, "Invalid BLR code");
}
sub_type = sub_type_table[operator_];
@ -2322,6 +2349,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected)
case blr_null:
case blr_agg_count:
case blr_user_name:
case blr_current_role:
case blr_current_date:
case blr_current_time:
case blr_current_timestamp:
@ -2456,6 +2484,19 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected)
gds_arg_string, ERR_cstring(name), 0);
node->nod_arg[e_gen_relation] = (NOD) tmp;
node->nod_arg[e_gen_value] = parse(tdbb, csb, VALUE);
/* CVC: There're thousand ways to go wrong, but I don't see any value
in posting dependencies with set generator since it's DDL, so I will
track only gen_id() in both dialects. */
if ((operator_ == blr_gen_id || operator_ == blr_gen_id2)
&& ((*csb)->csb_g_flags & csb_get_dependencies)) {
NOD dep_node = PAR_make_node (tdbb, e_dep_length);
dep_node->nod_type = nod_dependency;
dep_node->nod_arg [e_dep_object] = (NOD) tmp;
dep_node->nod_arg [e_dep_object_type] = (NOD) obj_generator;
LLS_PUSH (dep_node, &(*csb)->csb_dependencies);
}
}
break;
#else

View File

@ -1,689 +0,0 @@
/*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL/
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* Copyright (C) 2000 Inprise Corporation
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
/*
*
* File generated by codes.e - do not edit!
*
*/
195919882,
195919890,
195919898,
195919906,
195919914,
195919922,
195919930,
195919938,
195919946,
195919954,
195919962,
195919970,
195919978,
195919987,
195919995,
195920002,
195920011,
195920019,
20480152,
195920027,
195920036,
195920044,
195920051,
20480196,
195920059,
195920066,
195920074,
195920082,
195920090,
195920098,
195920106,
195920114,
195920122,
195920130,
195920139,
20480290,
20480298,
20480306,
20480314,
20480322,
20480330,
20480338,
20480346,
20480354,
20480362,
20480369,
20480378,
20480386,
20480394,
20480402,
20480410,
20480418,
20480436,
20480426,
195920146,
195920154,
195920162,
195920170,
20480546,
195920186,
195920195,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
20480498,
20480504,
20480516,
20480524,
20480530,
20480538,
20480554,
20480562,
0,
0,
195920202,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

View File

@ -19,10 +19,14 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*
* $Id: rse.cpp,v 1.6 2002-07-01 16:59:09 skywalker Exp $
*
* 2001.07.28: John Bellardo: Implemented rse_skip and made rse_first work with
* seekable streams.
* 2002.02.22 Claudio Valderrama: Fix SF Bugs #225283, #518279, #514186 & #221925.
*
*/
/*
$Id: rse.cpp,v 1.5 2001-12-28 05:16:31 tamlin Exp $
*/
#include "firebird.h"
#include <errno.h>
@ -183,6 +187,7 @@ void RSE_close(TDBB tdbb, RSB rsb)
#endif
case rsb_first:
case rsb_skip:
case rsb_boolean:
case rsb_aggregate:
rsb = rsb->rsb_next;
@ -714,12 +719,27 @@ void RSE_open(TDBB tdbb, RSB rsb)
open_procedure(tdbb, rsb, (IRSB_PROCEDURE) impure);
return;
case rsb_first:
impure->irsb_number =
MOV_get_long(EVL_expr(tdbb, (NOD) rsb->rsb_arg[0]), 0);
rsb = rsb->rsb_next;
break;
case rsb_first:
((IRSB_FIRST)impure)->irsb_count =
MOV_get_int64 (EVL_expr (tdbb, (NOD) rsb->rsb_arg [0]), 0);
if (((IRSB_FIRST)impure)->irsb_count < 1)
ERR_post (gds_bad_limit_param, 0);
rsb = rsb->rsb_next;
break;
case rsb_skip:
((IRSB_SKIP)impure)->irsb_count =
MOV_get_int64 (EVL_expr (tdbb, (NOD) rsb->rsb_arg [0]), 0);
if (((IRSB_SKIP)impure)->irsb_count < 0)
ERR_post (gds_bad_skip_param, 0);
((IRSB_SKIP)impure)->irsb_count++;
rsb = rsb->rsb_next;
break;
case rsb_boolean:
rsb = rsb->rsb_next;
break;
@ -2565,13 +2585,79 @@ static BOOLEAN get_record(TDBB tdbb,
}
}
/******
*** IMPORTANT!!
*
* If the RSB list contains both a rsb_first node and a rsb_skip node
* the rsb_skip node MUST be after the rsb_first node in the list.
* The reason is the rsb_skip calls get_record in a loop to skip
* over the first n records in the stream. If the rsb_first node
* was down stream the counter associated with rsb_first would
* be decremented by the calls to get_record that never return a
* record to the user. Possible symptoms of this are erroneous
* empty result sets (when skip >= first) and too small result sets
* (when first > skip, first - skip records will be returned).
*******/
case rsb_first:
if ((--((IRSB_FIRST) impure)->irsb_number) < 0)
return FALSE;
if (!get_record(tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
switch(mode) {
case RSE_get_forward:
if (((IRSB_FIRST) impure)->irsb_count <= 0)
return FALSE;
((IRSB_FIRST) impure)->irsb_count--;
if (!get_record (tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
break;
case RSE_get_current:
if (((IRSB_FIRST) impure)->irsb_count <= 0)
return FALSE;
if (!get_record (tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
break;
case RSE_get_backward:
((IRSB_FIRST) impure)->irsb_count++;
if (!get_record (tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
break;
}
break;
case rsb_skip:
switch(mode) {
case RSE_get_backward:
if (((IRSB_SKIP) impure)->irsb_count > 0)
return FALSE;
if (((IRSB_SKIP) impure)->irsb_count == 0) {
((IRSB_SKIP) impure)->irsb_count++;
get_record (tdbb, rsb->rsb_next, NULL, mode);
return FALSE;
}
((IRSB_SKIP) impure)->irsb_count++;
if (!get_record (tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
break;
case RSE_get_forward:
while(((IRSB_SKIP) impure)->irsb_count > 1) {
((IRSB_SKIP) impure)->irsb_count--;
if (!get_record (tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
}
((IRSB_SKIP) impure)->irsb_count--;
if (!get_record (tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
break;
case RSE_get_current:
if (((IRSB_SKIP) impure)->irsb_count >= 1)
return FALSE;
else if (!get_record (tdbb, rsb->rsb_next, NULL, mode))
return FALSE;
}
break;
case rsb_merge:
if (!get_merge_join(tdbb, rsb, (IRSB_MRG) impure
#ifdef SCROLLABLE_CURSORS
@ -2864,6 +2950,7 @@ static void join_to_nulls(TDBB tdbb, RSB rsb, USHORT streams)
}
#ifndef GATEWAY
record->rec_fmt_bk = record->rec_format;
record->rec_format = NULL;
#else
/* A null format pointer in the record block is used to indicate
@ -2934,7 +3021,13 @@ static void map_sort_data(REQ request, SMB map, UCHAR * data)
continue;
}
record = rpb->rpb_record;
if (record && !flag && !record->rec_format && record->rec_fmt_bk) {
record->rec_format = record->rec_fmt_bk; // restore the format
}
EVL_field(0, record, id, &to);
if (flag)
SET_NULL(record, id);
else {
@ -3371,6 +3464,7 @@ static void pop_rpbs(REQ request, RSB rsb)
}
case rsb_first:
case rsb_skip:
case rsb_boolean:
pop_rpbs(request, rsb->rsb_next);
return;
@ -3484,6 +3578,7 @@ static void push_rpbs(TDBB tdbb, REQ request, RSB rsb)
}
case rsb_first:
case rsb_skip:
case rsb_boolean:
push_rpbs(tdbb, request, rsb->rsb_next);
return;

View File

@ -35,7 +35,21 @@
/* Record Source Block (RSB) types */
typedef ENUM rsb_t { rsb_boolean, rsb_cross, rsb_dbkey, rsb_first, rsb_skip, rsb_indexed, rsb_merge, rsb_multiple, rsb_project, rsb_sequential, rsb_sort, rsb_union, rsb_aggregate, rsb_ext_sequential, /* External sequential access */
typedef ENUM rsb_t {
rsb_boolean,
rsb_cross,
rsb_dbkey,
rsb_first,
rsb_skip,
rsb_indexed,
rsb_merge,
rsb_multiple,
rsb_project,
rsb_sequential,
rsb_sort,
rsb_union,
rsb_aggregate,
rsb_ext_sequential, /* External sequential access */
rsb_ext_indexed, /* External indexed access */
rsb_ext_dbkey, /* External dbkey access */
rsb_navigate, /* Walk navigational index */

View File

@ -1,4 +1,4 @@
#
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
@ -26,7 +26,7 @@
# Contributor(s):
#
#
# $Id: make.defaults,v 1.3 2002-01-06 13:06:35 skywalker Exp $
# $Id: make.defaults,v 1.4 2002-07-01 16:59:09 skywalker Exp $
#
@ -180,7 +180,9 @@ ja_JA_MSG = $(FIREBIRD)/ja_JA.msg
LIBGDSINTL_LA = $(FIREBIRD)/intl/libgdsintl.so
#Platform Manager
#For want of a better suggestion we may as well default to posix
PLATFORM_PATH = jrd/os/posix

View File

@ -42,6 +42,8 @@
/* types */
#undef socklen_t
/* Are we doing 64bit IO on unix */
#undef UNIX_64_BIT_IO
/* Is the platform big endian? */
#define WORDS_BIGENDIAN 0

View File

@ -15,9 +15,10 @@
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Start of file prefix.linux: $(VERSION) $(PLATFORM)
#$Id: make.platform,v 1.3 2002-01-06 13:06:35 skywalker Exp $
#$Id: make.platform,v 1.4 2002-07-01 16:59:09 skywalker Exp $
#Revision 1.6 2000/12/01 11:20:31 fsg
#Added SHRLIB_EXT to prefix.linux
#Added Platform Manager rules PR 2002-06-22
# use the following to define conditional DEV/PROD compile
@ -127,11 +128,13 @@ LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1
SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR)
SUPER_BACKEND= source/jrd/gds_ss.a
SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldl -lcrypt -lpthread
SUPER_SERVER=
UTILITIES=
SUPER_SERVER=
UTILITIES=
#------------------------------------
# Platform Manager stuff
PLATFORM_PATH= jrd/os/posix
# End of file prefix.linux: $(VERSION) $(PLATFORM)

View File

@ -1,4 +1,4 @@
#
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
@ -8,26 +8,26 @@
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. You may obtain a copy of the Licence at
# http://www.gnu.org/copyleft/gpl.html
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Relevant for more details.
#
#
# This file was created by members of the firebird development team.
# All individual contributions remain the Copyright (C) of those
# individuals. Contributors to this file are either listed here or
# can be obtained from a CVS history command.
#
#
# All rights reserved.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
#
# Contributor(s):
#
#
# $Id: make.rules,v 1.3 2002-01-06 13:06:35 skywalker Exp $
#
#
#
# $Id: make.rules,v 1.4 2002-07-01 16:59:09 skywalker Exp $
#
#____________________________________________________________________________
@ -36,11 +36,11 @@
UseSharedLibraries = Yes # If empty then we build static linked exe's
# which are useful for debugging.
# This variable is used to determined flags for
# This variable is used to determined flags for
# libtool/ar/ld we define the gds.a/so library name
# in LIBGDS_LA and in Makefile.in.jrd where we do the
# creation of the libgds.a/so library.
#UseLibToolForLink = Yes # Currently we do not use it - but may in the future
#IsProdTypeBuild = Yes # If this is defined then we are building a production
@ -85,7 +85,7 @@ SOURCE=$(ROOT)/src
CFLAGS:= $(CFLAGS) -g -pipe -MMD -p -fPIC -Wall -I$(ROOT)/src -I$(ROOT)/src/include
CXXFLAGS:= $(CXXFLAGS) $(CFLAGS)
CXXFLAGS:= $(CXXFLAGS) $(CFLAGS)
#CC = libtool gcc
#CXX = libtool c++
@ -97,11 +97,11 @@ CXX = c++
# Most of the libraries and programs are linked using the dynamic linker
# We default to using the dynamic linker and have a special link macros for
# using the static linker.
# using the static linker.
#
# Also libtool looks like the future in cross platform shared object compile
# and linking, but unfortunately it does not yet work for us, as a
# libtool gcc -o $(BIN)/fred fred.o libzzz.la
# and linking, but unfortunately it does not yet work for us, as a
# libtool gcc -o $(BIN)/fred fred.o libzzz.la
# command will generate incorrect relative addresses in the wrapper script in
# $(BIN)/fred as it required the exe file fred to be in the directory from
# which the command is run from.
@ -115,7 +115,7 @@ CXX = c++
ifdef UseLibToolForLink
LIB_LINK= libtool gcc
LIB_LINK= libtool gcc
STATICLIB_LINK = libtool gcc -all-static
LIB_LINK_OPTIONS = -version-info 0:0:0 -release 1.5.0.0 -rpath /usr/lib
@ -124,7 +124,7 @@ ifdef UseLibToolForLink
else
LIB_LINK= g++ -shared
STATICLIB_LINK= ar cruvs
STATICLIB_LINK= ar cruvs
# LIB_LINK_OPTIONS = -soname libgds.so -rpath /usr/lib
# LIB_LINK_OPTIONS = -soname libgds.so.2 -rpath /usr/lib
LIB_LINK_OPTIONS =
@ -139,8 +139,12 @@ endif
LINK_OPTIONS=
ReadlineLibs = -lreadline -ltermcap
# ReadlineLibs - choose one of the following depending upon your
# OS and distribution. SuSE is happy with just -lreadline
# This is something that we should pick up with autoconf.
#ReadlineLibs = -lreadline -ltermcap
#ReadlineLibs = -lreadline -lncurses
ReadlineLibs = -lreadline
LINK_LIBS= -lm -lstdc++ $(ReadlineLibs) -lc -ldl -lcrypt
STATICLINK_LIBS = -lm -lstdc++ $(ReadlineLibs) -lc -ldl -lcrypt
@ -151,8 +155,8 @@ STATICLINK_LIBS = -lm -lstdc++ $(ReadlineLibs) -lc -ldl -lcrypt
# These should no longer be required but I've left here
# in case someone needs to know what they were
#STATICLIBTOOL= libtool gcc -static
#STATIC_LINK_OPTIONS= -static
#STATICLIBTOOL= libtool gcc -static
#STATIC_LINK_OPTIONS= -static
#STATIC_LINK_LIBS= -lm -lc -mieee-fp -ldl -lcrypt
#SHLIB_LINK_OPTIONS = -shared
@ -167,10 +171,10 @@ endif
# Here we have definitions for using the preprocessor.
# The GPRE_FLAGS is overwritten in Makefile.in.jrd Makefile.in.gpre and
# The GPRE_FLAGS is overwritten in Makefile.in.jrd Makefile.in.gpre and
# since they do something extra to allow the boot build to work.
#
# One other point is that sometimes a failure in compile with gpre does not
# One other point is that sometimes a failure in compile with gpre does not
# result in an error being generated. The generated source file still
# compiles and throws the make off the path.
#

View File

@ -4,8 +4,8 @@
#
# jrd
# to get at the database. why.cpp is the normal one whybk.cpp is the one
# compiled with a BACKEND flag, it seems to be (from a quick look at
# to get at the database. why.cpp is the normal one whybk.cpp is the one
# compiled with a BACKEND flag, it seems to be (from a quick look at
# the code) to allow the use of another library to talk to data from
# and earlier version data file. (Good way to achieve back portability)
# In the current builds only why.cpp is used, to build using whybk.cpp you
@ -17,19 +17,21 @@ WHY_BACKEND_Sources= whybk.c
# why.c does the switch to determine the actual implementation to use
JRD_Sources= ail.cpp all.cpp alt.cpp bookmark.cpp blb.cpp blob_filter.cpp btr.cpp builtin.cpp \
cch.cpp cmp.cpp cvt.cpp cvt2.cpp \
cch.cpp cmp.cpp cvt.cpp cvt2.cpp db_alias.cpp \
dfw.cpp divorce.cpp dls.cpp dpm.cpp dsc.cpp dyn.cpp dyn_def.cpp dyn_del.cpp \
dyn_mod.cpp dyn_util.cpp enc.cpp err.cpp iberr.cpp \
event.cpp evl.cpp exe.cpp ext.cpp filters.cpp flu.cpp fun.cpp functions.cpp \
gds.cpp grant.cpp idx.cpp inf.cpp ini.cpp intl.cpp inuse.cpp \
gds.cpp grant.cpp idx.cpp inf.cpp ini.cpp intl.cpp intl_builtin.cpp inuse.cpp \
isc.cpp isc_file.cpp isc_ipc.cpp isc_sync.cpp \
jrd.cpp jrn.cpp lck.cpp llio.cpp log.cpp met.cpp \
misc.cpp mov.cpp nav.cpp old.cpp opt.cpp pag.cpp par.cpp pcmet.cpp \
perf.cpp pwd.cpp rec.cpp rlck.cpp \
perf.cpp plugin_manager.cpp pwd.cpp rec.cpp rlck.cpp \
rng.cpp rse.cpp sbm.cpp sch.cpp scl.cpp \
sdl.cpp sdw.cpp shut.cpp sort.cpp sqz.cpp status.cpp svc.cpp sym.cpp thd.cpp tpc.cpp \
tra.cpp utl.cpp val.cpp vio.cpp \
$(IO_Sources) $(DEBUG_Sources) $(WHY_Sources)
sdl.cpp sdw.cpp shut.cpp sort.cpp sort_mem.cpp sqz.cpp status.cpp svc.cpp sym.cpp \
thd.cpp tpc.cpp tra.cpp utl.cpp val.cpp vio.cpp \
$(IO_Sources) $(DEBUG_Sources) $(WHY_Sources) \
../common/fb_exception.cpp
JRD_ObjectsX = $(JRD_Sources:%.cpp=$(GEN_ROOT)/jrd/%.o)
JRD_Objects = $(JRD_ObjectsX:%.c=$(GEN_ROOT)/jrd/%.o) # One extra rule for why.c
@ -146,9 +148,18 @@ FBUTIL_SharedObjects = $(FBUTIL_Objects:.o=.lo)
FBMemory_Sources=allocators.cpp memory_pool.cpp
FBMemory_Objects = $(FBMemory_Sources:%.cpp=$(GEN_ROOT)/common/memory/%.o)
FBMemory_SharedObjects = $(FB_Objects:.o=.lo)
FBMemory_SharedObjects = $(FB_MemoryObjects:.o=.lo)
#________________________________________________________________________
#
# Platform Manager
OS_SPECIFIC_Sources= $(PLATFORM_PATH)/path_utils.cpp $(PLATFORM_PATH)/mod_loader.cpp
OS_SPECIFIC_Objects =$(OS_SPECIFIC_Sources:%.cpp=$(GEN_ROOT)/%.o)
OS_SPECIFIC_SharedObjects =$(OS_SPECIFIC_Objects:.o=.lo)
#________________________________________________________________________
#
@ -156,7 +167,8 @@ FBMemory_SharedObjects = $(FB_Objects:.o=.lo)
# These are the lists of object/shared object files that will go into libgds.a
# and libgds.so.
GDSLIB_Objects = $(JRD_Objects) \
GDSLIB_Objects =$(OS_SPECIFIC_Objects) \
$(JRD_Objects) \
$(DSQL_Objects) \
$(LOCK_Objects) \
$(INTERFACE_Objects) \
@ -170,7 +182,8 @@ GDSLIB_Objects = $(JRD_Objects) \
# Notice that $(SECURITY_Objects) are missing, because that file can't be
# compiled until later in the build process.
BOOT_GDSLIB_Objects = $(JRD_Objects) \
BOOT_GDSLIB_Objects = $(OS_SPECIFIC_Objects) \
$(JRD_Objects) \
$(DSQL_Objects) \
$(LOCK_Objects) \
$(INTERFACE_Objects) \
@ -178,4 +191,5 @@ BOOT_GDSLIB_Objects = $(JRD_Objects) \
$(WAL_Objects) \
$(GPRELIB_Objects) \
$(FBUTIL_Objects) \
$(FBMemory_Objects)
$(FBMemory_Objects)\