mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 09:20:39 +01:00
Merge pull request #7399 from FirebirdSQL/work/client-build
Simplify client library build
This commit is contained in:
commit
41df3a0cd9
@ -248,7 +248,7 @@ copyFiles() {
|
||||
chown root:wheel ${TargetDir}@FB_PLUGDIR@/*.so*
|
||||
chmod 0755 ${TargetDir}@FB_PLUGDIR@/*.so*
|
||||
|
||||
makeDirs ${TargetDir}@FB_TZDATADIR@
|
||||
makeDirs @FB_TZDATADIR@
|
||||
cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@
|
||||
chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res
|
||||
|
||||
|
@ -42,6 +42,8 @@ include $(ROOT)/gen/make.shared.variables
|
||||
# root of the build tree.
|
||||
|
||||
BuildRoot=$(GEN_ROOT)
|
||||
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
|
||||
WITH_TOMCRYPT=@WITH_TOMCRYPT@
|
||||
|
||||
InstallRoot=.
|
||||
|
||||
@ -112,8 +114,10 @@ buildImageDir: buildDebugInfo
|
||||
|
||||
buildTarDir: buildImageDir
|
||||
mkdir -p $(GEN_ROOT)/$(TarDir)
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
cp -r $(GEN_ROOT)/install/install.sh $(GEN_ROOT)/$(TarDir)
|
||||
chmod a+x $(GEN_ROOT)/$(TarDir)/*.sh
|
||||
endif
|
||||
(cd $(GEN_ROOT)/$(TarDir); tar -C ../buildroot -czf buildroot.tar.gz . )
|
||||
(cd $(GEN_ROOT)/$(TarDir); tar -tzf buildroot.tar.gz > manifest.txt )
|
||||
|
||||
|
@ -38,6 +38,8 @@ SecurityDatabase=security5.fdb
|
||||
TomMathBuild="@TOMMATH_BUILD@"
|
||||
TomCryptBuild="@TOMCRYPT_BUILD@"
|
||||
OBJDUMP=@OBJDUMP@
|
||||
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
|
||||
WITH_TOMCRYPT=@WITH_TOMCRYPT@
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# addLibs
|
||||
@ -161,89 +163,102 @@ copyFiles() {
|
||||
fi
|
||||
|
||||
#directories
|
||||
makeDirs "@FB_BINDIR@ @FB_SBINDIR@ @FB_CONFDIR@ @FB_LIBDIR@ @FB_INCDIR@/firebird @FB_DOCDIR@/sql.extensions \
|
||||
@FB_SAMPLEDIR@ @FB_SAMPLEDBDIR@ @FB_INTLDIR@ @FB_MISCDIR@ @FB_SECDBDIR@ @FB_MSGDIR@ @FB_LOGDIR@ \
|
||||
@FB_GUARDDIR@ @FB_PLUGDIR@ @FB_TZDATADIR@"
|
||||
|
||||
for i in udf; do
|
||||
makeDirs @FB_MISCDIR@/upgrade/$i
|
||||
done
|
||||
makeDirs "@FB_CONFDIR@ @FB_LIBDIR@ @FB_INCDIR@/firebird @FB_MSGDIR@ @FB_TZDATADIR@"
|
||||
|
||||
makeDirs /usr/include
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
|
||||
makeDirs "@FB_PLUGDIR@"
|
||||
fi
|
||||
|
||||
#bin
|
||||
cp $BuiltFBDir/bin/gbak ${TargetDir}@FB_BINDIR@/gbak
|
||||
cp $BuiltFBDir/bin/gfix ${TargetDir}@FB_BINDIR@/gfix
|
||||
cp $BuiltFBDir/bin/gpre ${TargetDir}@FB_BINDIR@/gpre
|
||||
cp $BuiltFBDir/bin/gsec ${TargetDir}@FB_BINDIR@/gsec
|
||||
cp $BuiltFBDir/bin/nbackup ${TargetDir}@FB_BINDIR@/nbackup
|
||||
copyIfExists $BuiltFBDir/bin/gsplit ${TargetDir}@FB_BINDIR@
|
||||
cp $BuiltFBDir/bin/gstat ${TargetDir}@FB_BINDIR@/gstat
|
||||
copyIfExists $BuiltFBDir/bin/fbsvcmgr ${TargetDir}@FB_BINDIR@
|
||||
copyIfExists $BuiltFBDir/bin/fbtracemgr ${TargetDir}@FB_BINDIR@
|
||||
cp $BuiltFBDir/bin/isql ${TargetDir}@FB_BINDIR@/isql
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
|
||||
makeDirs "@FB_BINDIR@ @FB_SBINDIR@ @FB_DOCDIR@/sql.extensions @FB_SAMPLEDIR@ @FB_SAMPLEDBDIR@ @FB_INTLDIR@ \
|
||||
@FB_MISCDIR@ @FB_SECDBDIR@ @FB_LOGDIR@ @FB_GUARDDIR@"
|
||||
|
||||
chmod 0755 ${TargetDir}@FB_BINDIR@/*
|
||||
for i in udf; do
|
||||
makeDirs @FB_MISCDIR@/upgrade/$i
|
||||
done
|
||||
fi
|
||||
|
||||
#sbin
|
||||
cp -f $BuiltFBDir/bin/firebird ${TargetDir}@FB_SBINDIR@/firebird
|
||||
cp -f $BuiltFBDir/bin/fbguard ${TargetDir}@FB_SBINDIR@
|
||||
copyIfExists $BuiltFBDir/bin/fb_lock_print ${TargetDir}@FB_SBINDIR@
|
||||
makeDirs /usr/include
|
||||
|
||||
addLibs $BuiltFBDir/bin changeServerMode.sh ${TargetDir}@FB_SBINDIR@
|
||||
cp $BuiltFBDir/bin/registerDatabase.sh ${TargetDir}@FB_SBINDIR@
|
||||
cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@
|
||||
addLibs $BuiltFBDir/bin FirebirdUninstall.sh ${TargetDir}@FB_SBINDIR@
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
|
||||
#bin
|
||||
cp $BuiltFBDir/bin/gbak ${TargetDir}@FB_BINDIR@/gbak
|
||||
cp $BuiltFBDir/bin/gfix ${TargetDir}@FB_BINDIR@/gfix
|
||||
cp $BuiltFBDir/bin/gpre ${TargetDir}@FB_BINDIR@/gpre
|
||||
cp $BuiltFBDir/bin/gsec ${TargetDir}@FB_BINDIR@/gsec
|
||||
cp $BuiltFBDir/bin/nbackup ${TargetDir}@FB_BINDIR@/nbackup
|
||||
copyIfExists $BuiltFBDir/bin/gsplit ${TargetDir}@FB_BINDIR@
|
||||
cp $BuiltFBDir/bin/gstat ${TargetDir}@FB_BINDIR@/gstat
|
||||
copyIfExists $BuiltFBDir/bin/fbsvcmgr ${TargetDir}@FB_BINDIR@
|
||||
copyIfExists $BuiltFBDir/bin/fbtracemgr ${TargetDir}@FB_BINDIR@
|
||||
cp $BuiltFBDir/bin/isql ${TargetDir}@FB_BINDIR@/isql
|
||||
|
||||
chmod 0755 ${TargetDir}@FB_SBINDIR@/*
|
||||
chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
|
||||
chmod 0755 ${TargetDir}@FB_BINDIR@/*
|
||||
|
||||
#install script
|
||||
addLibs $BuiltFBDir/bin install.sh $BuildRootDir/gen/install
|
||||
#sbin
|
||||
cp -f $BuiltFBDir/bin/firebird ${TargetDir}@FB_SBINDIR@/firebird
|
||||
cp -f $BuiltFBDir/bin/fbguard ${TargetDir}@FB_SBINDIR@
|
||||
copyIfExists $BuiltFBDir/bin/fb_lock_print ${TargetDir}@FB_SBINDIR@
|
||||
|
||||
#examples - copy only if we have them
|
||||
exampleFiles=`find $BuiltFBDir/examples/README -type f -print`
|
||||
if [ -z "$exampleFiles" ]; then
|
||||
echo "Example files have not been built!"
|
||||
else
|
||||
(cd $BuiltFBDir/examples; tar cf - .) | (cd ${TargetDir}@FB_SAMPLEDIR@; tar xf -)
|
||||
rm -rf ${TargetDir}@FB_SAMPLEDIR@/empbuild
|
||||
addLibs $BuiltFBDir/bin changeServerMode.sh ${TargetDir}@FB_SBINDIR@
|
||||
cp $BuiltFBDir/bin/registerDatabase.sh ${TargetDir}@FB_SBINDIR@
|
||||
cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@
|
||||
addLibs $BuiltFBDir/bin FirebirdUninstall.sh ${TargetDir}@FB_SBINDIR@
|
||||
|
||||
makeDirs @FB_SAMPLEDBDIR@
|
||||
cp $BuiltFBDir/examples/empbuild/*.fdb ${TargetDir}@FB_SAMPLEDBDIR@
|
||||
chmod 0755 ${TargetDir}@FB_SBINDIR@/*
|
||||
chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
|
||||
|
||||
ReadOnlyTree ${TargetDir}@FB_SAMPLEDIR@
|
||||
chmod 0664 ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb
|
||||
#install script
|
||||
addLibs $BuiltFBDir/bin install.sh $BuildRootDir/gen/install
|
||||
|
||||
#plugins samples
|
||||
makeDirs ${TargetDir}@FB_SAMPLEDIR@/prebuilt
|
||||
cp $BuiltFBDir/plugins/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins
|
||||
cp $BuiltFBDir/bin/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin
|
||||
chmod 0644 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins/*
|
||||
#examples - copy only if we have them
|
||||
exampleFiles=`find $BuiltFBDir/examples/README -type f -print`
|
||||
if [ -z "$exampleFiles" ]; then
|
||||
echo "Example files have not been built!"
|
||||
else
|
||||
(cd $BuiltFBDir/examples; tar cf - .) | (cd ${TargetDir}@FB_SAMPLEDIR@; tar xf -)
|
||||
rm -rf ${TargetDir}@FB_SAMPLEDIR@/empbuild
|
||||
|
||||
# exec bit for sample binaries
|
||||
chmod 0755 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin/*
|
||||
fi
|
||||
makeDirs @FB_SAMPLEDBDIR@
|
||||
cp $BuiltFBDir/examples/empbuild/*.fdb ${TargetDir}@FB_SAMPLEDBDIR@
|
||||
|
||||
ReadOnlyTree ${TargetDir}@FB_SAMPLEDIR@
|
||||
chmod 0664 ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb
|
||||
|
||||
#plugins samples
|
||||
makeDirs @FB_SAMPLEDIR@/prebuilt
|
||||
cp $BuiltFBDir/plugins/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins
|
||||
cp $BuiltFBDir/bin/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin
|
||||
chmod 0644 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins/*
|
||||
|
||||
# exec bit for sample binaries
|
||||
chmod 0755 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin/*
|
||||
fi
|
||||
|
||||
#secureDB (access rights will be set at install time)
|
||||
cp $BuiltFBDir/$SecurityDatabase ${TargetDir}@FB_SECDBDIR@
|
||||
fi
|
||||
|
||||
#message file
|
||||
cp $BuiltFBDir/*.msg ${TargetDir}@FB_MSGDIR@
|
||||
|
||||
cp $BuiltFBDir/*.msg ${TargetDir}@FB_MSGDIR@
|
||||
chmod 0444 ${TargetDir}@FB_MSGDIR@/*.msg
|
||||
|
||||
#secureDB (access rights will be set at install time)
|
||||
cp $BuiltFBDir/$SecurityDatabase ${TargetDir}@FB_SECDBDIR@
|
||||
|
||||
#include (.h .pas files)
|
||||
cp $BuiltFBDir/include/*.h ${TargetDir}@FB_INCDIR@
|
||||
cp $BuildRootDir/src/include/firebird/*.h ${TargetDir}@FB_INCDIR@/firebird
|
||||
tar -C $BuildRootDir/src/include/firebird -cf - impl | tar -C ${TargetDir}@FB_INCDIR@/firebird -x
|
||||
cp $BuildRootDir/src/include/gen/Firebird.pas ${TargetDir}@FB_INCDIR@/firebird
|
||||
cp $BuiltFBDir/include/*.h ${TargetDir}@FB_INCDIR@
|
||||
cp $BuildRootDir/src/include/firebird/*.h ${TargetDir}@FB_INCDIR@/firebird
|
||||
tar -C $BuildRootDir/src/include/firebird -cf - impl | tar -C ${TargetDir}@FB_INCDIR@/firebird -x
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
|
||||
cp $BuildRootDir/src/include/gen/Firebird.pas ${TargetDir}@FB_INCDIR@/firebird
|
||||
fi
|
||||
|
||||
ReadOnlyTree ${TargetDir}@FB_INCDIR@
|
||||
|
||||
#lib
|
||||
cp -df $BuiltFBDir/lib/libfbclient.so* ${TargetDir}@FB_LIBDIR@
|
||||
cp -f $BuiltFBDir/lib/libib_util.so ${TargetDir}@FB_LIBDIR@/libib_util.so
|
||||
cp -df $BuiltFBDir/lib/libfbclient.so* ${TargetDir}@FB_LIBDIR@
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
|
||||
cp -f $BuiltFBDir/lib/libib_util.so ${TargetDir}@FB_LIBDIR@/libib_util.so
|
||||
fi
|
||||
|
||||
if [ "$TomMathBuild" = "Y" ]; then
|
||||
makeDirs @FB_LIBDIR@/.tm
|
||||
@ -257,55 +272,64 @@ copyFiles() {
|
||||
chmod 0755 ${TargetDir}@FB_LIBDIR@/*.so*
|
||||
|
||||
#plugins
|
||||
(cd $BuiltFBDir/plugins;tar cf - --exclude='*fbSample*' .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -)
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
|
||||
(cd $BuiltFBDir/plugins;tar cf - --exclude='*fbSample*' .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -)
|
||||
fi
|
||||
|
||||
for file in `find ${TargetDir}@FB_PLUGDIR@ -name '*.so*' -print`; do
|
||||
chmod 0755 ${file}
|
||||
done
|
||||
|
||||
makeDirs ${TargetDir}@FB_TZDATADIR@
|
||||
makeDirs @FB_TZDATADIR@
|
||||
cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@
|
||||
chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res
|
||||
|
||||
#intl
|
||||
cp $BuiltFBDir/intl/libfbintl.so ${TargetDir}@FB_INTLDIR@/fbintl
|
||||
cp $BuiltFBDir/intl/fbintl.conf ${TargetDir}@FB_INTLDIR@
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
|
||||
#intl
|
||||
cp $BuiltFBDir/intl/libfbintl.so ${TargetDir}@FB_INTLDIR@/fbintl
|
||||
cp $BuiltFBDir/intl/fbintl.conf ${TargetDir}@FB_INTLDIR@
|
||||
|
||||
chmod 0755 ${TargetDir}@FB_INTLDIR@/fbintl
|
||||
chmod 0644 ${TargetDir}@FB_INTLDIR@/fbintl.conf
|
||||
chmod 0755 ${TargetDir}@FB_INTLDIR@/fbintl
|
||||
chmod 0644 ${TargetDir}@FB_INTLDIR@/fbintl.conf
|
||||
|
||||
# Note that the following items copy files from outside the build tree.
|
||||
# Copy the sql-declarations into the UDF-directory
|
||||
# Note that the following items copy files from outside the build tree.
|
||||
# Copy the sql-declarations into the UDF-directory
|
||||
|
||||
#doc
|
||||
cp $BuildRootDir/doc/*.pdf ${TargetDir}@FB_DOCDIR@
|
||||
cp $BuildRootDir/doc/README.* ${TargetDir}@FB_DOCDIR@
|
||||
cp $BuildRootDir/doc/sql.extensions/README* ${TargetDir}@FB_DOCDIR@/sql.extensions
|
||||
cp $BuildRootDir/*.md ${TargetDir}@FB_CONFDIR@
|
||||
#doc
|
||||
cp $BuildRootDir/doc/*.pdf ${TargetDir}@FB_DOCDIR@
|
||||
cp $BuildRootDir/doc/README.* ${TargetDir}@FB_DOCDIR@
|
||||
cp $BuildRootDir/doc/sql.extensions/README* ${TargetDir}@FB_DOCDIR@/sql.extensions
|
||||
cp $BuildRootDir/*.md ${TargetDir}@FB_CONFDIR@
|
||||
|
||||
for i in `find ${TargetDir}@FB_MISCDIR@ -print`; do
|
||||
if [ -d $i ]; then
|
||||
chmod 0755 $i
|
||||
else
|
||||
chmod 0644 $i
|
||||
fi
|
||||
done
|
||||
for i in `find ${TargetDir}@FB_MISCDIR@ -print`; do
|
||||
if [ -d $i ]; then
|
||||
chmod 0755 $i
|
||||
else
|
||||
chmod 0644 $i
|
||||
fi
|
||||
done
|
||||
|
||||
#misc
|
||||
cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@
|
||||
cp $BuildRootDir/src/misc/upgrade/v4.0/udf_replace* ${TargetDir}@FB_MISCDIR@/upgrade/udf
|
||||
cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@
|
||||
cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@
|
||||
cp $BuildRootDir/gen/install/misc/firebird.service ${TargetDir}@FB_MISCDIR@
|
||||
#misc
|
||||
cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@
|
||||
cp $BuildRootDir/src/misc/upgrade/v4.0/udf_replace* ${TargetDir}@FB_MISCDIR@/upgrade/udf
|
||||
cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@
|
||||
cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@
|
||||
cp $BuildRootDir/gen/install/misc/firebird.service ${TargetDir}@FB_MISCDIR@
|
||||
|
||||
chmod -R go-rwx ${TargetDir}@FB_MISCDIR@
|
||||
chmod -R go-rwx ${TargetDir}@FB_MISCDIR@
|
||||
|
||||
#conf
|
||||
cp $BuiltFBDir/databases.conf ${TargetDir}@FB_CONFDIR@
|
||||
cp $BuiltFBDir/fbtrace.conf ${TargetDir}@FB_CONFDIR@
|
||||
cp $BuiltFBDir/replication.conf ${TargetDir}@FB_CONFDIR@
|
||||
fi
|
||||
|
||||
#conf
|
||||
cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@
|
||||
cp $BuiltFBDir/databases.conf ${TargetDir}@FB_CONFDIR@
|
||||
cp $BuiltFBDir/fbtrace.conf ${TargetDir}@FB_CONFDIR@
|
||||
cp $BuiltFBDir/plugins.conf ${TargetDir}@FB_CONFDIR@
|
||||
cp $BuiltFBDir/replication.conf ${TargetDir}@FB_CONFDIR@
|
||||
cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@
|
||||
|
||||
if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
|
||||
cp $BuiltFBDir/plugins.conf ${TargetDir}@FB_CONFDIR@
|
||||
fi
|
||||
|
||||
chmod 0644 ${TargetDir}@FB_CONFDIR@/*.conf
|
||||
|
||||
@ -314,7 +338,7 @@ copyFiles() {
|
||||
|
||||
chmod 0444 ${TargetDir}@FB_CONFDIR@/*License.txt
|
||||
|
||||
# link include files to /usr/include
|
||||
# link include files to /usr/include
|
||||
linkFiles "@FB_INCDIR@" "firebird iberror.h ibase.h ib_util.h" "${TargetDir}/usr/include" "${TargetDir}@FB_INCDIR@"
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,329 +0,0 @@
|
||||
PWD_CURR= $(shell pwd)
|
||||
PROJ_ROOT:= $(PWD_CURR)
|
||||
FB2_ROOT= $(PROJ_ROOT)/../../..
|
||||
GEN_ROOT= $(FB2_ROOT)/gen
|
||||
SRC_ROOT= $(FB2_ROOT)/src
|
||||
FIREBIRD= $(GEN_ROOT)/firebird
|
||||
BIN_ROOT= $(FIREBIRD)/bin
|
||||
DB_ROOT= $(GEN_ROOT)/refDatabases
|
||||
BUILD_DIR= $(PROJ_ROOT)/build
|
||||
FW= $(BUILD_DIR)/Firebird.framework
|
||||
VAR= $(FW)/Versions/Current/Resources/English.lproj/var
|
||||
|
||||
DYLD_FRAMEWORK_PATH=$(BUILD_DIR)
|
||||
export DYLD_FRAMEWORK_PATH
|
||||
|
||||
|
||||
GPRE_BOOT= $(BUILD_DIR)/gpre_bootstrap
|
||||
GPRE= $(BUILD_DIR)/gpre
|
||||
GBAK= $(BUILD_DIR)/gbak
|
||||
CREATE_DB= $(BUILD_DIR)/create_db
|
||||
LOCK_MGR= $(BUILD_DIR)/gds_lock_mgr
|
||||
GFIX= $(BUILD_DIR)/gfix
|
||||
ISQL= $(BUILD_DIR)/isql
|
||||
GSEC= $(BUILD_DIR)/gsec
|
||||
CHECK_MSGS= $(BUILD_DIR)/check_msgs
|
||||
BUILD_MSGS= $(BUILD_DIR)/build_file
|
||||
SEC_AUTH= $(VAR)/auth/security_db.auth
|
||||
LOCAL_USER_AUTH= $(VAR)/auth/current_euid.auth
|
||||
|
||||
EMPTY_DB= $(DB_ROOT)/empty.gdb
|
||||
MSG_DB= $(DB_ROOT)/msg.gdb
|
||||
META_DB= $(DB_ROOT)/metadata.gdb
|
||||
ISC_DB= $(FIREBIRD)/isc4.gdb
|
||||
ISC_GBAK= $(FIREBIRD)/isc.gbak
|
||||
MSG_FILE= $(FIREBIRD)/interbase.msg
|
||||
MSG_INDICATOR= $(GEN_ROOT)/msgs/indicator.msg
|
||||
|
||||
PS_FW_FLAG= $(GEN_ROOT)/firebird/.pseudo_framework_flag
|
||||
UPG_FW_FLAG= $(GEN_ROOT)/firebird/.upgrade_framework_flag
|
||||
FULL_FW_FLAG= $(GEN_ROOT)/firebird/.full_framework_flag
|
||||
|
||||
FB_FW= $(PROJ_ROOT)/build/Firebird.framework
|
||||
|
||||
|
||||
JRD_EPP_FILES= blob_filter.cpp dyn.epp dyn_util.epp ini.epp stats.epp \
|
||||
dyn_def.epp met.epp dfw.epp dyn_del.epp \
|
||||
fun.epp dpm.epp dyn_mod.epp grant.epp scl.epp
|
||||
JRD_GEN_FILES= $(JRD_EPP_FILES:%.epp=$(GEN_ROOT)/jrd/%.cpp)
|
||||
|
||||
DSQL_EPP_FILES= array.epp blob.epp metd.epp
|
||||
DSQL_YACC_FILES= parse.y
|
||||
DSQL_GEN_FILES= $(DSQL_EPP_FILES:%.epp=$(GEN_ROOT)/dsql/%.cpp) \
|
||||
$(DSQL_YACC_FILES:%.y=$(GEN_ROOT)/dsql/%.cpp)
|
||||
|
||||
GPRE_EPP_FILES= gpre_meta.epp
|
||||
GPRE_GEN_FILES= $(GPRE_EPP_FILES:%.epp=$(GEN_ROOT)/gpre/%.cpp)
|
||||
|
||||
GBAK_EPP_FILES= backup.epp restore.epp OdsDetection.epp
|
||||
GBAK_GEN_FILES= $(GBAK_EPP_FILES:%.epp=$(GEN_ROOT)/burp/%.cpp)
|
||||
|
||||
GFIX_EPP_FILES= alice_meta.epp
|
||||
GFIX_GEN_FILES= $(GFIX_EPP_FILES:%.epp=$(GEN_ROOT)/alice/%.cpp)
|
||||
|
||||
ISQL_EPP_FILES= extract.epp isql.epp show.epp
|
||||
ISQL_GEN_FILES= $(ISQL_EPP_FILES:%.epp=$(GEN_ROOT)/isql/%.cpp)
|
||||
|
||||
UTILITIES_EPP_FILES= dba.epp
|
||||
UTILITIES_GEN_FILES= $(UTILITIES_EPP_FILES:%.epp=$(GEN_ROOT)/utilities/%.cpp)
|
||||
|
||||
SECURITY_EPP_FILES= security.epp
|
||||
SECURITY_GEN_FILES= $(SECURITY_EPP_FILES:%.epp=$(GEN_ROOT)/utilities/%.cpp)
|
||||
|
||||
MSG_EPP_FILES= change_msgs.epp check_msgs.epp enter_msgs.epp load.epp modify_msgs.epp
|
||||
MSG_GEN_FILES= $(MSG_EPP_FILES:%.epp=$(GEN_ROOT)/msgs/%.cpp)
|
||||
|
||||
GPRE_FLAGS= -r -m -z -n
|
||||
|
||||
all:
|
||||
|
||||
$(GEN_ROOT)/jrd/dyn_def.cpp : $(SRC_ROOT)/jrd/dyn_def.epp \
|
||||
$(SRC_ROOT)/jrd/dyn_def.sed
|
||||
$(GPRE_BOOT) $(GPRE_FLAGS) $< $(GEN_ROOT)/jrd/dyn_deffoo.cpp
|
||||
sed -f $(SRC_ROOT)/jrd/dyn_def.sed $(GEN_ROOT)/jrd/dyn_deffoo.cpp > $@
|
||||
rm $(GEN_ROOT)/jrd/dyn_deffoo.cpp
|
||||
|
||||
$(GEN_ROOT)/dsql/y.tab.c: $(SRC_ROOT)/dsql/parse.y
|
||||
$(YACC) -l $(YFLAGS) -o $@ $<
|
||||
$(GEN_ROOT)/dsql/parse.cpp: $(SRC_ROOT)/dsql/parse.sed \
|
||||
$(GEN_ROOT)/dsql/y.tab.c
|
||||
sed -f $< $(GEN_ROOT)/dsql/y.tab.c > $@
|
||||
|
||||
|
||||
$(GEN_ROOT)/jrd/%.cpp: $(SRC_ROOT)/jrd/%.epp $(GPRE_BOOT)
|
||||
$(GPRE_BOOT) $(GPRE_FLAGS) $< $@
|
||||
|
||||
$(GEN_ROOT)/dsql/%.cpp: $(SRC_ROOT)/dsql/%.epp $(GPRE_BOOT)
|
||||
$(GPRE_BOOT) $(GPRE_FLAGS) $< $@
|
||||
|
||||
$(GEN_ROOT)/gpre/%.cpp: $(SRC_ROOT)/gpre/%.epp $(GPRE_BOOT)
|
||||
$(GPRE_BOOT) $(GPRE_FLAGS) $< $@
|
||||
|
||||
$(GEN_ROOT)/burp/%.cpp: $(SRC_ROOT)/burp/%.epp $(GPRE)
|
||||
$(GPRE) $(GPRE_FLAGS) $< $@
|
||||
|
||||
$(GEN_ROOT)/alice/%.cpp: $(SRC_ROOT)/alice/%.epp $(GPRE)
|
||||
$(GPRE) $(GPRE_FLAGS) $< $@
|
||||
|
||||
$(GEN_ROOT)/isql/%.cpp: $(SRC_ROOT)/isql/%.epp $(GPRE)
|
||||
$(GPRE) $(GPRE_FLAGS) $< $@
|
||||
|
||||
$(GEN_ROOT)/utilities/%.cpp: $(SRC_ROOT)/utilities/%.epp $(GPRE)
|
||||
$(GPRE) $(GPRE_FLAGS) $< $@
|
||||
|
||||
$(GEN_ROOT)/msgs/%.cpp: $(SRC_ROOT)/msgs/%.epp $(GPRE)
|
||||
$(GPRE) $(GPRE_FLAGS) $< $@
|
||||
|
||||
gds_lock_mgr: $(LOCK_MGR)
|
||||
$(LOCK_MGR): $(PROJ_ROOT)/build/gds_lock_mgr
|
||||
cp $< $@
|
||||
|
||||
intl_lib: $(VAR)/intl/gdsintl
|
||||
$(VAR)/intl/gdsintl: build/gdsintl
|
||||
cp $< $@
|
||||
chmod a+x $(VAR)/intl/*
|
||||
|
||||
sec_auth: $(SEC_AUTH)
|
||||
$(SEC_AUTH): $(PROJ_ROOT)/build/security_db.auth.bundle/Contents/MacOS/security_db.auth
|
||||
mkdir -p $(VAR)/auth
|
||||
-cp $< $@
|
||||
-chmod a+rx $@
|
||||
|
||||
local_user_auth: $(LOCAL_USER_AUTH)
|
||||
$(LOCAL_USER_AUTH): $(PROJ_ROOT)/build/current_euid.auth.bundle/Contents/MacOS/current_euid.auth
|
||||
mkdir -p $(VAR)/auth
|
||||
-cp $< $@
|
||||
-chmod a+rx $@
|
||||
|
||||
firebird_boot.dylib: ../../gen/firebird/lib/firebird_boot.dylib
|
||||
../../gen/firebird/lib/firebird_boot.dylib: build/firebird_boot.dylib
|
||||
rm -f $@
|
||||
ln -s ../../../macosx_build/firebird_test/$< $@
|
||||
rm -f $(FB_FW)/Versions/Current/Firebird2
|
||||
ln -s ../../../lib/firebird_boot.dylib $(FB_FW)/Versions/Current/Firebird2
|
||||
|
||||
jrd_preprocess_clean:
|
||||
rm -f $(JRD_GEN_FILES)
|
||||
jrd_preprocess_: GPRE_FLAGS=-n -z -gds_cxx -raw -ids
|
||||
jrd_preprocess_: $(JRD_GEN_FILES)
|
||||
jrd_preprocess_%:
|
||||
|
||||
gpre_preprocess_clean:
|
||||
rm -f $(GPRE_GEN_FILES)
|
||||
gpre_preprocess_: GPRE_FLAGS=-lang_internal -r -m -z -n
|
||||
gpre_preprocess_: $(GPRE_GEN_FILES)
|
||||
gpre_preprocess_%:
|
||||
|
||||
dsql_preprocess_clean:
|
||||
rm -f $(DSQL_GEN_FILES) $(GEN_ROOT)/dsql/y.tab.c
|
||||
dsql_preprocess_: GPRE_FLAGS=-lang_internal -r -m -z -n
|
||||
dsql_preprocess_: $(DSQL_GEN_FILES)
|
||||
dsql_preprocess_%:
|
||||
|
||||
burp_preprocess: $(GBAK_GEN_FILES)
|
||||
burp_preprocess_clean:
|
||||
rm -f $(GBAK_GEN_FILES)
|
||||
burp_preprocess_:
|
||||
./gpre_wrapper.sh burp_preprocess burp
|
||||
burp_preprocess_%:
|
||||
|
||||
msg_preprocess: $(MSG_GEN_FILES)
|
||||
msg_preprocess_clean:
|
||||
rm -f $(MSG_GEN_FILES)
|
||||
msg_preprocess_:
|
||||
./gpre_wrapper.sh msg_preprocess msgs
|
||||
msg_preprocess_%:
|
||||
|
||||
messages_clean:
|
||||
rm -f $(MSG_FILE) $(MSG_INDICATOR)
|
||||
messages_:
|
||||
make -f $(PROJ_ROOT)/Helpers.make -C $(FB2_ROOT)/gen/msgs PWD_CURR=$(PWD_CURR) messages
|
||||
messages: update_msg_indicator msg_file
|
||||
msg_file: $(MSG_INDICATOR)
|
||||
$(BUILD_MSGS) -d master_msg_db
|
||||
cp interbase.msg $(MSG_FILE)
|
||||
update_msg_indicator: $(MSG_DB)
|
||||
$(CHECK_MSGS) -d master_msg_db
|
||||
|
||||
alice_preprocess_clean:
|
||||
rm -f $(ALICE_GEN_FILES)
|
||||
alice_preprocess_: $(ALICE_GEN_FILES)
|
||||
alice_preprocess_%:
|
||||
|
||||
gfix_preprocess_clean:
|
||||
rm -f $(GFIX_GEN_FILES)
|
||||
gfix_preprocess: $(GFIX_GEN_FILES)
|
||||
gfix_preprocess_%:
|
||||
gfix_preprocess_:
|
||||
./gpre_wrapper.sh gfix_preprocess alice
|
||||
|
||||
security_preprocess_clean:
|
||||
rm -f $(SECURITY_GEN_FILES)
|
||||
security_preprocess: $(SECURITY_GEN_FILES)
|
||||
security_preprocess_%:
|
||||
security_preprocess_:
|
||||
./gpre_wrapper.sh security_preprocess utilities
|
||||
|
||||
utilities_preprocess_clean:
|
||||
rm -f $(UTILITIES_GEN_FILES)
|
||||
utilities_preprocess_: $(UTILITIES_GEN_FILES)
|
||||
utilities_preprocess_%:
|
||||
|
||||
isql_preprocess_clean:
|
||||
rm -f $(ISQL_GEN_FILES)
|
||||
isql_preprocess_:
|
||||
./gpre_wrapper.sh isql_preprocess isql
|
||||
isql_preprocess: $(ISQL_GEN_FILES)
|
||||
isql_preprocess_%:
|
||||
|
||||
empty_db_clean:
|
||||
rm -f $(EMPTY_DB)
|
||||
empty_db_: $(EMPTY_DB)
|
||||
$(EMPTY_DB):
|
||||
rm -f $(EMPTY_DB)
|
||||
$(CREATE_DB) $(EMPTY_DB)
|
||||
empty_db_%:
|
||||
|
||||
$(FULL_FW_FLAG):
|
||||
touch $(FULL_FW_FLAG)
|
||||
$(UPG_FW_FLAG):
|
||||
touch $(UPG_FW_FLAG)
|
||||
|
||||
#upgrade_fw_: $(UPG_FW_FLAG)
|
||||
#$(UPG_FW_FLAG): $(PS_FW_FLAG) $(FULL_FW_FLAG)
|
||||
# rm -f $(FB_FW)/Versions/A/Firebird2
|
||||
# ln -s ../../../lib/firebird.dylib $(FB_FW)/Versions/Current/Firebird2
|
||||
# touch $(UPG_FW_FLAG)
|
||||
#upgrade_fw_clean:
|
||||
#upgrade_fw_install:
|
||||
|
||||
darwin_pseudo_fw_: $(PS_FW_FLAG)
|
||||
$(PS_FW_FLAG): $(FULL_FW_FLAG) $(UPG_FW_FLAG)
|
||||
$(MAKE) -C $(SRC_ROOT) darwin_pseudo_fw
|
||||
touch $(PS_FW_FLAG)
|
||||
darwin_pseudo_fw_clean:
|
||||
|
||||
$(MSG_DB): $(SRC_ROOT)/msgs/msg.gbak
|
||||
$(GBAK) -MODE read_only -R $(SRC_ROOT)/msgs/msg.gbak $@
|
||||
ln -fs $(MSG_DB) $(GEN_ROOT)/msgs/msg.gdb
|
||||
ln -fs $(MSG_DB) $(GEN_ROOT)/msgs/master_msg_db
|
||||
|
||||
isc4.gdb_: $(ISC_DB) sysdba_user
|
||||
$(ISC_DB) : $(SRC_ROOT)/utilities/isc4.sql $(SRC_ROOT)/utilities/isc4.gdl
|
||||
( cd $(FIREBIRD); $(ISQL) -z -i $(SRC_ROOT)/utilities/isc4.sql)
|
||||
-ln -sf $(ISC_DB) $(GEN_ROOT)/utilities/isc4.gdb
|
||||
|
||||
isc4.gdb_clean:
|
||||
rm -f $(ISC_DB) $(GEN_ROOT)/utilities/isc4.gdb
|
||||
isc4.gdb_%:
|
||||
|
||||
sysdba_user_:
|
||||
make -C $(FIREBIRD) -f $(PROJ_ROOT)/Helpers.make PWD_CURR=$(PWD_CURR) sysdba_user
|
||||
sysdba_user_clean:
|
||||
sysdba_user:
|
||||
-$(GSEC) -da $(ISC_DB) -delete SYSDBA
|
||||
$(GSEC) -da $(ISC_DB) -add SYSDBA -pw masterkey
|
||||
$(GBAK) -z $(ISC_DB) $(ISC_GBAK)
|
||||
|
||||
|
||||
message_file_:
|
||||
$(MAKE) -C $(FB2_ROOT)/src/msgs GPRE_CURRENT=$(GPRE) msgs
|
||||
message_file_clean:
|
||||
rm -f $(FB2_ROOT)/gen/firebird/interbase.msg
|
||||
|
||||
squeky_:
|
||||
squeky_install:
|
||||
squeky_clean:
|
||||
rm -rf $(FIREBIRD)/lib/* $(FIREBIRD)/Firebird2.framework $(FIREBIRD)/.* $GEN_ROOT)/jrd/.* $(GEN_ROOT)/utilities/.* $(FIREBIRD)/bin/*
|
||||
|
||||
autoconf_: $(FB2_ROOT)/config.status
|
||||
$(FB2_ROOT)/config.status: $(FB2_ROOT)/configure
|
||||
(cd $(FB2_ROOT); ./configure)
|
||||
autoconf_clean:
|
||||
rm -f $(FB2_ROOT)/config.cache $(FB2_ROOT)/config.log $(FB2_ROOT)/config.status $(FB2_ROOT)/src/include/gen/autoconfig.h
|
||||
|
||||
fb_fw_var: $(VAR)
|
||||
$(VAR):
|
||||
mkdir -p $(VAR)
|
||||
mkdir -p $(VAR)/intl
|
||||
mkdir -p $(VAR)/help
|
||||
mkdir -p $(VAR)/auth
|
||||
mkdir -p $(VAR)/UDF
|
||||
ln -s $(GEN_ROOT)/firebird/interbase.msg $(VAR)/interbase.msg
|
||||
ln -s ../../../../../.. $(VAR)/bin
|
||||
ln -s $(GEN_ROOT)/firebird/isc4.gdb $(VAR)/isc4.gdb
|
||||
|
||||
fw_files_clean:
|
||||
fw_files_:
|
||||
rm -rf $(VAR)
|
||||
mkdir -p $(VAR)/UDF
|
||||
mkdir -p $(VAR)/intl
|
||||
mkdir -p $(VAR)/help
|
||||
mkdir -p $(VAR)/auth
|
||||
mkdir -p $(FB_FW)/Resources/bin
|
||||
cp $(FIREBIRD)/interbase.msg $(VAR)/interbase.msg
|
||||
-cp $(GPRE) $(GBAK) $(ISQL) $(GSEC) $(GFIX) $(FB_FW)/Resources/bin
|
||||
cp $(FIREBIRD)/isc.gbak $(VAR)
|
||||
cp build/gdsintl $(VAR)/intl
|
||||
chmod a+x $(VAR)/intl/*
|
||||
-cp build/local_user.bundle/Contents/MacOS/local_user $(LOCAL_USER_AUTH)
|
||||
-cp $(SRC_ROOT)/install/arch-specific/darwin/services.isc $(VAR)
|
||||
ln -s ../../bin $(VAR)/bin
|
||||
|
||||
headers_:
|
||||
-mkdir -p $(FB_FW)/Versions/A/Headers
|
||||
echo "#ifndef IBASE_H" > $(FW)/Headers/ibase.h
|
||||
cat $(SRC_ROOT)/include/fb_types.h $(SRC_ROOT)/jrd/sqlda_pub.h $(SRC_ROOT)/jrd/dsc_pub.h $(SRC_ROOT)/jrd/ibase.h $(SRC_ROOT)/jrd/inf_pub.h $(SRC_ROOT)/include/gen/iberror.h $(SRC_ROOT)/jrd/blr.h | grep -v "#include" >> $(FW)/Headers/ibase.h
|
||||
echo "#endif /*IBASE_H*/" >> $(FW)/Headers/ibase.h
|
||||
headers_clean:
|
||||
|
||||
installer_clean:
|
||||
rm -f build/firebird.tar.gz
|
||||
installer_:
|
||||
mkdir -p build/installer_tmp/firebird
|
||||
rm -f build/firebird.tar.gz
|
||||
rm -f $(VAR)/isc_init* $(VAR)/isc_lock* $(VAR)/isc_event* $(VAR)/interbase.log
|
||||
tar -cf build/installer_tmp/firebird/firebird.tar -C build Firebird.framework
|
||||
-cp $(SRC_ROOT)/install/arch-specific/darwin/install build/installer_tmp/firebird
|
||||
tar -czf build/firebird.tar.gz -C build/installer_tmp firebird
|
||||
rm -rf build/installer_tmp
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
make -C ../../../gen/$2 -f `pwd`/Helpers.make PWD_CURR=`pwd` $1
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
make -f Helpers.make $1
|
@ -1,4 +0,0 @@
|
||||
#define __PUT_STATIC_DATA_MEMBERS_HERE
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
@ -1,3 +0,0 @@
|
||||
void fb_framework_build_stub()
|
||||
{
|
||||
}
|
@ -181,7 +181,10 @@ $(GEN_ROOT)/Make.Version : $(SRC_ROOT)/misc/writeBuildNum.sh
|
||||
#
|
||||
|
||||
external:
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/btyacc
|
||||
endif
|
||||
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop core
|
||||
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
|
||||
@ -192,12 +195,14 @@ ifeq ($(ABSEIL_BUILD_FLG),Y)
|
||||
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128.a $(LIB)
|
||||
endif
|
||||
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
ifeq ($(RE2_BUILD_FLG),Y)
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -O3 -g -fPIC" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/re2
|
||||
ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB)
|
||||
endif
|
||||
|
||||
$(MAKE) libcds
|
||||
endif
|
||||
|
||||
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC="$(CC)"
|
||||
@ -223,11 +228,13 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
ifeq ($(STD_EDITLINE),false)
|
||||
ifeq ($(EDITLINE_FLG),Y)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#___________________________________________________________________________
|
||||
@ -317,8 +324,16 @@ master_process:
|
||||
$(MAKE) export_lists
|
||||
$(MAKE) external
|
||||
$(MAKE) updateCloopInterfaces
|
||||
$(MAKE) boot
|
||||
$(MAKE) rest
|
||||
$(MAKE) yvalve
|
||||
ifeq ($(CLIENT_ONLY_FLG),Y)
|
||||
ifeq ($(WITH_TOMCRYPT),Y)
|
||||
$(MAKE) chacha
|
||||
endif
|
||||
$(MAKE) include_generic
|
||||
endif
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
$(MAKE) boot
|
||||
$(MAKE) engine
|
||||
$(MAKE) fbintl
|
||||
$(MAKE) utilities
|
||||
@ -331,7 +346,7 @@ master_process:
|
||||
(cd $(BIN); $(LN) $(notdir $(GPRE)) $(notdir $(GPRE_CURRENT)))
|
||||
$(MAKE) plugins
|
||||
$(MAKE) examples
|
||||
$(MAKE) rest
|
||||
endif
|
||||
|
||||
|
||||
cross_process:
|
||||
@ -344,6 +359,7 @@ cross1:
|
||||
$(MAKE) export_lists
|
||||
$(MAKE) external
|
||||
$(MAKE) updateCloopInterfaces
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
$(MAKE) boot
|
||||
$(MAKE) yvalve
|
||||
$(MAKE) engine
|
||||
@ -358,26 +374,39 @@ cross1:
|
||||
(cd $(BIN); $(LN) $(notdir $(RUN_GPRE)) $(notdir $(GPRE_CURRENT)))
|
||||
$(MAKE) include_generic
|
||||
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
|
||||
endif
|
||||
|
||||
cross2:
|
||||
ln -sf $(SRC_ROOT)/include/cross/$(CROSS_CONFIG) $(SRC_ROOT)/include/gen/autoconfig.h
|
||||
$(MAKE) prerequisites
|
||||
$(MAKE) tommath
|
||||
ifeq ($(WITH_TOMCRYPT),Y)
|
||||
$(MAKE) LTCSOURCE=-DLTC_SOURCE tomcrypt
|
||||
endif
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
$(MAKE) re2
|
||||
$(MAKE) libcds
|
||||
endif
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
|
||||
ln -sf $(ROOT)/extern/decNumber/libdecFloat$(CROSS).a $(LIB)
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/int128/absl/numeric
|
||||
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128$(CROSS).a $(LIB)
|
||||
$(MAKE) libcds
|
||||
$(MAKE) cross_rest
|
||||
$(MAKE) yvalve
|
||||
ifeq ($(CLIENT_ONLY_FLG),Y)
|
||||
ifeq ($(WITH_TOMCRYPT),Y)
|
||||
$(MAKE) chacha
|
||||
endif
|
||||
$(MAKE) include_generic
|
||||
endif
|
||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
$(MAKE) engine
|
||||
$(MAKE) fbintl
|
||||
$(MAKE) utilities
|
||||
$(MAKE) $(GPRE)
|
||||
$(MAKE) plugins
|
||||
$(MAKE) -f Makefile.plugins_examples
|
||||
$(MAKE) cross_rest
|
||||
endif
|
||||
|
||||
|
||||
#___________________________________________________________________________
|
||||
@ -538,7 +567,7 @@ $(FBTRACEMGR): $(FBTRACEMGR_Objects) $(COMMON_LIB)
|
||||
gbak: $(GBAK)
|
||||
|
||||
$(GBAK): $(GBAK_Objects) $(COMMON_LIB)
|
||||
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
|
||||
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(RE2LIB)
|
||||
|
||||
gsplit: $(GSPLIT)
|
||||
|
||||
@ -606,7 +635,7 @@ $(UDR_PLUGIN): $(UDRENG_Objects) $(COMMON_LIB)
|
||||
legacy_user_management: $(LEGACY_USER_MANAGER)
|
||||
|
||||
$(LEGACY_USER_MANAGER): $(LEGACY_USERS_MANAGE_Objects) $(COMMON_LIB)
|
||||
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)\
|
||||
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(RE2LIB) $(FIREBIRD_LIBRARY_LINK)\
|
||||
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libLegacy_UserManager.$(SHRLIB_EXT))
|
||||
|
||||
chacha: $(CHACHA)
|
||||
@ -630,7 +659,7 @@ $(PROFILER): $(Profiler_Objects) $(COMMON_LIB)
|
||||
trace: $(FBTRACE)
|
||||
|
||||
$(FBTRACE): $(FBTRACE_UTIL_Objects) $(COMMON_LIB)
|
||||
$(LINK_TRACE) -o $@ $^ $(FIREBIRD_LIBRARY_LINK) $(LINK_TRACE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libfbtrace.$(SHRLIB_EXT))
|
||||
$(LINK_TRACE) -o $@ $^ $(RE2LIB) $(FIREBIRD_LIBRARY_LINK) $(LINK_TRACE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libfbtrace.$(SHRLIB_EXT))
|
||||
|
||||
auth_debug: $(AUTH_DEBUGGER)
|
||||
|
||||
|
@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
|
||||
CROSS_CONFIG=android.arm64
|
||||
|
||||
LDFLAGS += -static-libstdc++
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
|
||||
UDR_SUPPORT_LIBS :=
|
||||
|
||||
LINK_LIBS = $(DroidLibs)
|
||||
|
@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
|
||||
CROSS_CONFIG=android.arme
|
||||
|
||||
LDFLAGS += -static-libstdc++
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
|
||||
UDR_SUPPORT_LIBS :=
|
||||
|
||||
LINK_LIBS = $(DroidLibs)
|
||||
|
@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
|
||||
CROSS_CONFIG=android.x86
|
||||
|
||||
LDFLAGS += -static-libstdc++
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
|
||||
UDR_SUPPORT_LIBS :=
|
||||
|
||||
LINK_LIBS = $(DroidLibs)
|
||||
|
@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
|
||||
CROSS_CONFIG=android.x86_64
|
||||
|
||||
LDFLAGS += -static-libstdc++
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
|
||||
UDR_SUPPORT_LIBS :=
|
||||
|
||||
LINK_LIBS = $(DroidLibs)
|
||||
|
@ -110,6 +110,8 @@ PLUSPLUS_FLAGS:= -fno-rtti -std=c++17
|
||||
|
||||
# If this is defined then we use special rules useful for developers only
|
||||
IsDeveloper = @DEVEL_FLG@
|
||||
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
|
||||
WITH_TOMCRYPT=@WITH_TOMCRYPT@
|
||||
|
||||
CpuType=@CPU_TYPE@
|
||||
PLATFORM=@PLATFORM@
|
||||
@ -206,8 +208,8 @@ endif
|
||||
|
||||
STATICLIB_LINK = $(AR) crus
|
||||
|
||||
LINK_LIBS = @LIBS@ $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
|
||||
SO_LINK_LIBS = @LIBS@ $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
|
||||
LINK_LIBS = @LIBS@ $(DECLIB) $(I128LIB)
|
||||
SO_LINK_LIBS = @LIBS@ $(DECLIB) $(I128LIB)
|
||||
|
||||
# Default extensions
|
||||
|
||||
@ -381,11 +383,11 @@ LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS)
|
||||
|
||||
LINK_FIREBIRD = $(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\
|
||||
$(call LIB_LINK_SONAME,$(LibrarySoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
||||
LINK_FIREBIRD_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(MATHLIB) $(CRYPTLIB)
|
||||
LINK_FIREBIRD_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(MATHLIB)
|
||||
|
||||
LINK_ENGINE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\
|
||||
$(call LIB_LINK_SONAME,$(EngineSoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
||||
LINK_ENGINE_LIBS = $(LINK_FIREBIRD_LIBS) $(FIREBIRD_LIBRARY_LINK)
|
||||
LINK_ENGINE_LIBS = $(LINK_FIREBIRD_LIBS) $(RE2LIB) $(LIBCDSLIB) $(FIREBIRD_LIBRARY_LINK)
|
||||
|
||||
LINK_UDRENG = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(call LIB_LINK_RPATH,lib) $(UNDEF_FLAGS)\
|
||||
$(call LINK_DARWIN_RPATH,..)
|
||||
@ -401,8 +403,6 @@ COMMON_LIB = $(OBJ)/common.a
|
||||
COMMON_TEST = $(FB_TESTS_DIR)/common_test$(EXEC_EXT)
|
||||
|
||||
# From utilities
|
||||
CREATE_DB = $(RBIN)/create_db$(EXEC_EXT)
|
||||
GDS_DROP = $(BIN)/gds_drop$(EXEC_EXT)
|
||||
FBSVCMGR = $(BIN)/fbsvcmgr$(EXEC_EXT)
|
||||
FBTRACEMGR = $(BIN)/fbtracemgr$(EXEC_EXT)
|
||||
GSTAT = $(BIN)/gstat$(EXEC_EXT)
|
||||
@ -411,12 +411,7 @@ LOCKPRINT = $(BIN)/fb_lock_print$(EXEC_EXT)
|
||||
GSEC = $(BIN)/gsec$(EXEC_EXT)
|
||||
GFIX = $(BIN)/gfix$(EXEC_EXT)
|
||||
RUN_GFIX = $(RBIN)/gfix$(EXEC_EXT)
|
||||
GDS_REBUILD = $(BIN)/gds_rebuild$(EXEC_EXT)
|
||||
GDS_INSTALL = $(BIN)/gds_install$(EXEC_EXT)
|
||||
GDS_INSTALL = $(BIN)/gds_install_service$(EXEC_EXT)
|
||||
FBGUARD = $(BIN)/fbguard$(EXEC_EXT)
|
||||
IBGUARD = $(BIN)/ibguard$(EXEC_EXT)
|
||||
FBMGR_BIN = $(BIN)/fbmgr.bin$(EXEC_EXT)
|
||||
INSTREG = $(BIN)/instreg$(EXEC_EXT)
|
||||
INSTSVC = $(BIN)/instsvc$(EXEC_EXT)
|
||||
|
||||
|
@ -16,7 +16,11 @@ set ERRLEV=0
|
||||
|
||||
@echo Building %FB_OBJ_DIR%
|
||||
|
||||
call compile.bat builds\win32\%VS_VER%\Firebird make_all_%FB_TARGET_PLATFORM%.log
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
call compile.bat builds\win32\%VS_VER%\Firebird make_all_%FB_TARGET_PLATFORM%.log
|
||||
) else (
|
||||
call compile.bat builds\win32\%VS_VER%\Firebird make_all_%FB_TARGET_PLATFORM%.log DLLs\yvalve DLLs\chacha
|
||||
)
|
||||
if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log for details
|
||||
|
||||
@if "%ERRLEV%"=="1" (
|
||||
@ -35,52 +39,61 @@ if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log
|
||||
@timeout 1 >nul
|
||||
|
||||
@mkdir %FB_OUTPUT_DIR% 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\intl 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\tzdata 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\doc 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\doc\sql.extensions 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\include 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\include\firebird 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\include\firebird\impl 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\lib 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\system32 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\plugins 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\plugins\udr 2>nul
|
||||
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
mkdir %FB_OUTPUT_DIR%\intl 2>nul
|
||||
mkdir %FB_OUTPUT_DIR%\doc 2>nul
|
||||
mkdir %FB_OUTPUT_DIR%\doc\sql.extensions 2>nul
|
||||
mkdir %FB_OUTPUT_DIR%\plugins\udr 2>nul
|
||||
)
|
||||
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\* %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\intl\* %FB_OUTPUT_DIR%\intl >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\tzdata\* %FB_OUTPUT_DIR%\tzdata >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\system32\* %FB_OUTPUT_DIR%\system32 >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\*.dll %FB_OUTPUT_DIR%\plugins >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\yvalve\fbclient.lib %FB_OUTPUT_DIR%\lib\fbclient_ms.lib >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\ib_util\ib_util.lib %FB_OUTPUT_DIR%\lib\ib_util_ms.lib >nul
|
||||
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\intl\* %FB_OUTPUT_DIR%\intl >nul
|
||||
copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul
|
||||
copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\ib_util\ib_util.lib %FB_OUTPUT_DIR%\lib\ib_util_ms.lib >nul
|
||||
)
|
||||
|
||||
for %%v in (gpre_boot build_msg common_test engine_test) do (
|
||||
@del %FB_OUTPUT_DIR%\%%v.* 2>nul
|
||||
@del %FB_OUTPUT_DIR%\%%v.* 2>nul
|
||||
)
|
||||
|
||||
:: Firebird.conf, etc
|
||||
@copy %FB_GEN_DIR%\firebird.msg %FB_OUTPUT_DIR%\ > nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf %FB_OUTPUT_DIR%\firebird.conf >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\databases.conf %FB_OUTPUT_DIR%\databases.conf >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl\ >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\plugins.conf %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\replication.conf %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\src\utilities\ntrace\fbtrace.conf %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\src\plugins\udr_engine\udr_engine.conf %FB_OUTPUT_DIR%\plugins\udr_engine.conf >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\IPLicense.txt %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\IDPLicense.txt %FB_OUTPUT_DIR% >nul
|
||||
|
||||
:: DATABASES
|
||||
@copy %FB_GEN_DIR%\dbs\security5.FDB %FB_OUTPUT_DIR%\security5.fdb >nul
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
copy %FB_ROOT_PATH%\builds\install\misc\databases.conf %FB_OUTPUT_DIR%\databases.conf >nul
|
||||
copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl\ >nul
|
||||
copy %FB_ROOT_PATH%\builds\install\misc\replication.conf %FB_OUTPUT_DIR% >nul
|
||||
copy %FB_ROOT_PATH%\src\utilities\ntrace\fbtrace.conf %FB_OUTPUT_DIR% >nul
|
||||
copy %FB_ROOT_PATH%\src\plugins\udr_engine\udr_engine.conf %FB_OUTPUT_DIR%\plugins\udr_engine.conf >nul
|
||||
|
||||
:: DOCS
|
||||
@copy %FB_ROOT_PATH%\*.md %FB_OUTPUT_DIR%\doc\ >nul
|
||||
:: DATABASES
|
||||
copy %FB_GEN_DIR%\dbs\security5.FDB %FB_OUTPUT_DIR%\security5.fdb >nul
|
||||
|
||||
:: READMES
|
||||
@copy %FB_ROOT_PATH%\doc\README.* %FB_OUTPUT_DIR%\doc >nul
|
||||
@copy %FB_ROOT_PATH%\doc\sql.extensions\README.* %FB_OUTPUT_DIR%\doc\sql.extensions >nul
|
||||
:: DOCS
|
||||
copy %FB_ROOT_PATH%\*.md %FB_OUTPUT_DIR%\doc\ >nul
|
||||
|
||||
:: READMES
|
||||
copy %FB_ROOT_PATH%\doc\README.* %FB_OUTPUT_DIR%\doc >nul
|
||||
copy %FB_ROOT_PATH%\doc\sql.extensions\README.* %FB_OUTPUT_DIR%\doc\sql.extensions >nul
|
||||
)
|
||||
|
||||
:: Headers
|
||||
copy %FB_ROOT_PATH%\src\extlib\ib_util.h %FB_OUTPUT_DIR%\include > nul
|
||||
@ -92,17 +105,19 @@ copy %FB_GEN_DIR%\iberror_c.h %FB_OUTPUT_DIR%\include\firebird\impl > nul
|
||||
:: New API headers
|
||||
xcopy /y %FB_ROOT_PATH%\src\include\firebird %FB_OUTPUT_DIR%\include\firebird /e > nul
|
||||
|
||||
:: UDR
|
||||
copy %FB_ROOT_PATH%\src\extlib\*.sql %FB_OUTPUT_DIR%\plugins\udr > nul
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
:: UDR
|
||||
copy %FB_ROOT_PATH%\src\extlib\*.sql %FB_OUTPUT_DIR%\plugins\udr > nul
|
||||
|
||||
:: Installers
|
||||
@copy %FB_INSTALL_SCRIPTS%\install_service.bat %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_INSTALL_SCRIPTS%\uninstall_service.bat %FB_OUTPUT_DIR% >nul
|
||||
:: Installers
|
||||
copy %FB_INSTALL_SCRIPTS%\install_service.bat %FB_OUTPUT_DIR% >nul
|
||||
copy %FB_INSTALL_SCRIPTS%\uninstall_service.bat %FB_OUTPUT_DIR% >nul
|
||||
)
|
||||
|
||||
:: MSVC runtime
|
||||
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\vcruntime140.dll" %FB_OUTPUT_DIR% > nul
|
||||
if exist "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\vcruntime140_1.dll" (
|
||||
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\vcruntime140_1.dll" %FB_OUTPUT_DIR% > nul
|
||||
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\vcruntime140_1.dll" %FB_OUTPUT_DIR% > nul
|
||||
)
|
||||
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\msvcp140.dll" %FB_OUTPUT_DIR% > nul
|
||||
|
||||
|
@ -31,12 +31,6 @@ for %%v in ( alice auth burp dsql gpre isql jrd misc msgs examples yvalve utilit
|
||||
call :interfaces
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :btyacc
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :libcds
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :LibTom
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
@ -46,46 +40,63 @@ if "%ERRLEV%"=="1" goto :END
|
||||
if "%FB_TARGET_PLATFORM%"=="x64" call :ttmath
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :re2
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :zlib
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
@echo Generating DSQL parser...
|
||||
@call parse.bat %*
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
call :re2
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
::=======
|
||||
call :gpre_boot
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
call :btyacc
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
::=======
|
||||
@echo Preprocessing the source files needed to build gpre and isql...
|
||||
@call preprocess.bat %FB_CONFIG% BOOT
|
||||
call :libcds
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
::=======
|
||||
call :engine
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
echo Generating DSQL parser...
|
||||
call parse.bat %*
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :gpre
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
::=======
|
||||
call :gpre_boot
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :isql
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
::=======
|
||||
echo Preprocessing the source files needed to build gpre and isql...
|
||||
call preprocess.bat %FB_CONFIG% BOOT
|
||||
|
||||
::=======
|
||||
call :engine
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :gpre
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
call :isql
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
)
|
||||
|
||||
@mkdir %FB_BIN_DIR% >nul 2>&1
|
||||
@mkdir %FB_BIN_DIR%\intl\ >nul 2>&1
|
||||
|
||||
:: copy conf files only if not exists already
|
||||
for %%v in (databases firebird plugins replication) do (
|
||||
if not exist %FB_BIN_DIR%\%%v.conf (
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\%%v.conf %FB_BIN_DIR% >nul 2>&1
|
||||
)
|
||||
for %%v in (firebird plugins) do (
|
||||
if not exist %FB_BIN_DIR%\%%v.conf (
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\%%v.conf %FB_BIN_DIR% >nul 2>&1
|
||||
)
|
||||
)
|
||||
|
||||
if not exist %FB_BIN_DIR%\intl\fbintl.conf (
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_BIN_DIR%\intl\ >nul 2>&1
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
:: copy conf files only if not exists already
|
||||
for %%v in (databases replication) do (
|
||||
if not exist %FB_BIN_DIR%\%%v.conf (
|
||||
copy %FB_ROOT_PATH%\builds\install\misc\%%v.conf %FB_BIN_DIR% >nul 2>&1
|
||||
)
|
||||
)
|
||||
|
||||
if not exist %FB_BIN_DIR%\intl\fbintl.conf (
|
||||
copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_BIN_DIR%\intl\ >nul 2>&1
|
||||
)
|
||||
)
|
||||
|
||||
:: Copy ICU and zlib to the output directory
|
||||
@ -94,22 +105,20 @@ if not exist %FB_BIN_DIR%\intl\fbintl.conf (
|
||||
@copy %FB_ROOT_PATH%\extern\icu\tzdata-extract\* %FB_BIN_DIR%\tzdata >nul 2>&1
|
||||
@copy %FB_ROOT_PATH%\extern\zlib\%FB_TARGET_PLATFORM%\*.dll %FB_BIN_DIR% >nul 2>&1
|
||||
|
||||
::=======
|
||||
@call :databases
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
::=======
|
||||
call :databases
|
||||
|
||||
:: copy security db if not exists already
|
||||
if not exist %FB_BIN_DIR%\security5.fdb (
|
||||
@copy %FB_GEN_DIR%\dbs\security5.fdb %FB_BIN_DIR%
|
||||
:: copy security db if not exists already
|
||||
if not exist %FB_BIN_DIR%\security5.fdb (
|
||||
copy %FB_GEN_DIR%\dbs\security5.fdb %FB_BIN_DIR%
|
||||
)
|
||||
|
||||
::=======
|
||||
echo Preprocessing the entire source tree...
|
||||
call preprocess.bat %FB_CONFIG%
|
||||
)
|
||||
|
||||
::=======
|
||||
@echo Preprocessing the entire source tree...
|
||||
@call preprocess.bat %FB_CONFIG%
|
||||
|
||||
::=======
|
||||
@call :msgs
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
::=======
|
||||
@call create_msgs.bat %FB_CONFIG%
|
||||
::=======
|
||||
@ -254,21 +263,6 @@ set ERRLEV=1
|
||||
goto :EOF
|
||||
|
||||
|
||||
::===================
|
||||
:: BUILD messages
|
||||
:msgs
|
||||
@echo.
|
||||
@echo Building build_msg (%FB_OBJ_DIR%)...
|
||||
@call compile.bat builds\win32\%VS_VER%\FirebirdBoot build_msg_%FB_TARGET_PLATFORM%.log build_msg
|
||||
if errorlevel 1 goto :msgs2
|
||||
@goto :EOF
|
||||
:msgs2
|
||||
echo.
|
||||
echo Error building build_msg, see build_msg_%FB_TARGET_PLATFORM%.log
|
||||
echo.
|
||||
set ERRLEV=1
|
||||
goto :EOF
|
||||
|
||||
::==============
|
||||
:databases
|
||||
@rmdir /s /q %FB_GEN_DIR%\dbs 2>nul
|
||||
|
@ -35,6 +35,7 @@
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../../extern/re2/builds/$(PlatformName)/$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<OutputFile>$(IntDir)$(TargetName).bsc</OutputFile>
|
||||
|
@ -317,7 +317,7 @@
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/re2/builds/$(PlatformName)\$(Configuration)\re2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@ -329,7 +329,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/re2/builds/$(PlatformName)\$(Configuration)\re2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@ -344,7 +344,7 @@
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;../../../extern/re2/builds/$(PlatformName)\$(Configuration)\re2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -358,7 +358,7 @@
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;../../../extern/re2/builds/$(PlatformName)\$(Configuration)\re2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
@ -168,7 +168,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/release/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -184,7 +184,7 @@
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;SUPERSERVER;DEV_BUILD;NAMESPACE=Vulcan;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/release/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -201,7 +201,7 @@
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -222,7 +222,7 @@
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -231,4 +231,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -122,7 +122,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;SUPERCLIENT;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -135,7 +135,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;SUPERCLIENT;WIN32;DEV_BUILD;_WINDOWS;_USRDLL;CLIENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -154,7 +154,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;SUPERCLIENT;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -171,7 +171,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;SUPERCLIENT;WIN32;DEV_BUILD;_WINDOWS;_USRDLL;CLIENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -238,4 +238,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -115,7 +115,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\extern\icu\$(Platform)\release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -135,7 +135,7 @@
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\extern\icu\$(Platform)\release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -153,7 +153,7 @@
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;DEV_BUILD;_WINDOWS;_USRDLL;SUPERCLIENT;FBTRACE_EXPORTS;NAMESPACE=Vulcan;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\extern\icu\$(Platform)\release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -177,7 +177,7 @@
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\extern\icu\$(Platform)\release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -219,4 +219,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -115,7 +115,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -131,7 +131,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SUPERCLIENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -147,7 +147,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;DEV_BUILD;WIN32;_CONSOLE;SUPERCLIENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -167,7 +167,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SUPERCLIENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>re2.lib;comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@ -217,4 +217,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -19,8 +19,6 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\gen\yvalve\array.cpp" />
|
||||
<ClCompile Include="..\..\..\gen\yvalve\blob.cpp" />
|
||||
<ClCompile Include="..\..\..\src\auth\SecureRemotePassword\client\SrpClient.cpp" />
|
||||
<ClCompile Include="..\..\..\src\auth\SecurityDatabase\LegacyClient.cpp" />
|
||||
<ClCompile Include="..\..\..\src\jrd\os\win32\ibinitdll.cpp" />
|
||||
@ -28,6 +26,8 @@
|
||||
<ClCompile Include="..\..\..\src\remote\client\BlrFromMessage.cpp" />
|
||||
<ClCompile Include="..\..\..\src\remote\client\interface.cpp" />
|
||||
<ClCompile Include="..\..\..\src\yvalve\alt.cpp" />
|
||||
<ClCompile Include="..\..\..\src\yvalve\array.cpp" />
|
||||
<ClCompile Include="..\..\..\src\yvalve\blob.cpp" />
|
||||
<ClCompile Include="..\..\..\src\yvalve\config\os\win32\config_root.cpp" />
|
||||
<ClCompile Include="..\..\..\src\yvalve\DistributedTransaction.cpp" />
|
||||
<ClCompile Include="..\..\..\src\yvalve\gds.cpp" />
|
||||
@ -81,8 +81,6 @@
|
||||
<ResourceCompile Include="..\..\..\src\jrd\version.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\src\yvalve\array.epp" />
|
||||
<None Include="..\..\..\src\yvalve\blob.epp" />
|
||||
<None Include="..\defs\firebird.def" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
|
@ -30,6 +30,12 @@
|
||||
<ClCompile Include="..\..\..\src\yvalve\alt.cpp">
|
||||
<Filter>source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\yvalve\array.cpp">
|
||||
<Filter>source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\yvalve\blob.cpp">
|
||||
<Filter>source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\yvalve\DistributedTransaction.cpp">
|
||||
<Filter>source</Filter>
|
||||
</ClCompile>
|
||||
@ -57,12 +63,6 @@
|
||||
<ClCompile Include="..\..\..\src\jrd\os\win32\ibinitdll.cpp">
|
||||
<Filter>source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gen\yvalve\array.cpp">
|
||||
<Filter>preprocessed</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gen\yvalve\blob.cpp">
|
||||
<Filter>preprocessed</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\remote\client\interface.cpp">
|
||||
<Filter>Remote client</Filter>
|
||||
</ClCompile>
|
||||
@ -145,11 +145,5 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\defs\firebird.def" />
|
||||
<None Include="..\..\..\src\yvalve\array.epp">
|
||||
<Filter>GPRE files</Filter>
|
||||
</None>
|
||||
<None Include="..\..\..\src\yvalve\blob.epp">
|
||||
<Filter>GPRE files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -63,7 +63,6 @@ goto :EOF
|
||||
|
||||
@set GPRE=%FB_BIN_DIR%\gpre_boot
|
||||
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
|
||||
@for %%i in (array, blob) do @call :PREPROCESS yvalve %%i
|
||||
@for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
|
||||
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
|
||||
@for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx
|
||||
@ -76,7 +75,6 @@ goto :EOF
|
||||
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
|
||||
@for %%i in (LegacyManagement) do @call :PREPROCESS auth/SecurityDatabase %%i
|
||||
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
|
||||
@for %%i in (array, blob) do @call :PREPROCESS yvalve %%i
|
||||
@for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx
|
||||
@for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
|
||||
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
|
||||
|
@ -49,8 +49,11 @@ call make_boot %FBBUILD_BUILDTYPE%
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
call make_all %FBBUILD_BUILDTYPE%
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
call make_examples %FBBUILD_BUILDTYPE%
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
@if "%FB_CLIENT_ONLY%"=="" (
|
||||
call make_examples %FBBUILD_BUILDTYPE%
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
)
|
||||
|
||||
if "%FBBUILD_BUILD_ONLY%"=="1" goto :END
|
||||
|
||||
|
@ -15,6 +15,8 @@ for %%v in ( %* ) do (
|
||||
( if /I "%%v"=="DEBUG" ( (set FB_DBG=TRUE) && (set FB_CONFIG=debug) ) )
|
||||
( if /I "%%v"=="CLEAN" (set FB_CLEAN=:rebuild) )
|
||||
( if /I "%%v"=="RELEASE" ( (set FB_DBG=) && (set FB_CONFIG=release) ) )
|
||||
( if /I "%%v"=="CLIENT_ONLY" (set FB_CLIENT_ONLY=TRUE) )
|
||||
( if /I "%%v"=="CLIENT_ONLY=FALSE" (set FB_CLIENT_ONLY=) )
|
||||
)
|
||||
|
||||
@if not defined FB_CONFIG (
|
||||
|
82
configure.ac
82
configure.ac
@ -565,6 +565,16 @@ AC_ARG_ENABLE(developer,
|
||||
esac])
|
||||
AC_SUBST(DEVEL_FLG)
|
||||
|
||||
CLIENT_ONLY_FLG=N
|
||||
AC_ARG_ENABLE(client-only,
|
||||
[ --enable-client-only use client-only mode rules (default=no)],
|
||||
[case "$enableval" in
|
||||
yes) CLIENT_ONLY_FLG=Y;;
|
||||
no) CLIENT_ONLY_FLG=N;;
|
||||
*) AC_MSG_ERROR(bad value '${enableval}' for --enable-client-only);;
|
||||
esac])
|
||||
AC_SUBST(CLIENT_ONLY_FLG)
|
||||
|
||||
CROSS=
|
||||
IS_CROSS=N
|
||||
AC_ARG_WITH(cross-build,
|
||||
@ -579,9 +589,19 @@ AC_ARG_WITH(builtin-tommath,
|
||||
[TOMMATH_BUILD=Y])
|
||||
AC_SUBST(TOMMATH_BUILD)
|
||||
|
||||
WITH_TOMCRYPT=Y
|
||||
AC_ARG_WITH(tomcrypt,
|
||||
[ --without-tomcrypt do not use libtomcrypt (allowed with --enable-client-only)],
|
||||
[case "$withval" in
|
||||
yes) WITH_TOMCRYPT=Y;;
|
||||
no) WITH_TOMCRYPT=N;;
|
||||
*) AC_MSG_ERROR(bad value '${withval}' for --with-tomcrypt);;
|
||||
esac])
|
||||
AC_SUBST(WITH_TOMCRYPT)
|
||||
|
||||
TOMCRYPT_BUILD=N
|
||||
AC_ARG_WITH(builtin-tomcrypt,
|
||||
[ --with-builtin-tomcrypt build libtomcrypt library from firebird tree],
|
||||
[ --with-builtin-tomcrypt build libtomcrypt library from firebird tree],
|
||||
[TOMCRYPT_BUILD=Y])
|
||||
AC_SUBST(TOMCRYPT_BUILD)
|
||||
|
||||
@ -592,7 +612,7 @@ AC_ARG_WITH(termlib,
|
||||
|
||||
RE2_BUILD=Y
|
||||
AC_ARG_WITH(system-re2,
|
||||
[ --with-system-re2 use system-wide re2 library instead of embedded copy],
|
||||
[ --with-system-re2 use system-wide re2 library instead of embedded copy],
|
||||
[RE2_BUILD=N])
|
||||
AC_SUBST(RE2_BUILD)
|
||||
|
||||
@ -910,16 +930,18 @@ dnl check for tomcrypt presence
|
||||
if test "$TOMCRYPT_BUILD" = "Y"; then
|
||||
CRYPTLIB=-ltomcrypt
|
||||
else
|
||||
XE_SAVE_ENV()
|
||||
CFLAGS="$CFLAGS -DLTC_NO_ASM"
|
||||
AC_CHECK_HEADER(tomcrypt.h,,
|
||||
AC_MSG_ERROR(Include file for tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
|
||||
XE_RESTORE_ENV()
|
||||
XE_SAVE_ENV()
|
||||
LIBS=
|
||||
AC_CHECK_LIB(tomcrypt, sha1_init, CRYPTLIB=-ltomcrypt,
|
||||
AC_MSG_ERROR(Library tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
|
||||
XE_RESTORE_ENV()
|
||||
if test "$WITH_TOMCRYPT" = "Y"; then
|
||||
XE_SAVE_ENV()
|
||||
CFLAGS="$CFLAGS -DLTC_NO_ASM"
|
||||
AC_CHECK_HEADER(tomcrypt.h,,
|
||||
AC_MSG_ERROR(Include file for tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
|
||||
XE_RESTORE_ENV()
|
||||
XE_SAVE_ENV()
|
||||
LIBS=
|
||||
AC_CHECK_LIB(tomcrypt, sha1_init, CRYPTLIB=-ltomcrypt,
|
||||
AC_MSG_ERROR(Library tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
|
||||
XE_RESTORE_ENV()
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CRYPTLIB)
|
||||
|
||||
@ -935,16 +957,18 @@ if test "$EDITLINE_FLG" = "Y"; then
|
||||
AC_SUBST(TERMLIB)
|
||||
fi
|
||||
|
||||
dnl check for re2 presence
|
||||
if test "$RE2_BUILD" != "Y"; then
|
||||
XE_SAVE_ENV()
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CHECK_HEADER(re2/re2.h, RE2LIB=-lre2,
|
||||
AC_MSG_ERROR(Include file for re2 not found - please install development re2 package or drop --with-system-re2))
|
||||
AC_LANG_POP(C++)
|
||||
XE_RESTORE_ENV()
|
||||
if test "$CLIENT_ONLY_FLG" = "N"; then
|
||||
dnl check for re2 presence
|
||||
if test "$RE2_BUILD" != "Y"; then
|
||||
XE_SAVE_ENV()
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CHECK_HEADER(re2/re2.h, RE2LIB=-lre2,
|
||||
AC_MSG_ERROR(Include file for re2 not found - please install development re2 package or drop --with-system-re2))
|
||||
AC_LANG_POP(C++)
|
||||
XE_RESTORE_ENV()
|
||||
fi
|
||||
AC_SUBST(RE2LIB)
|
||||
fi
|
||||
AC_SUBST(RE2LIB)
|
||||
|
||||
dnl Check for libraries
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
@ -1324,7 +1348,13 @@ for fb_tgt in \$FB_TARGETS; do
|
||||
|
||||
dnl # output
|
||||
mkdir -p gen/\$fb_tgt/firebird/bin
|
||||
mkdir -p gen/\$fb_tgt/firebird/include/firebird/impl
|
||||
mkdir -p gen/\$fb_tgt/firebird/lib
|
||||
mkdir -p gen/\$fb_tgt/firebird/tests
|
||||
if test "$CLIENT_ONLY_FLG" = "N" || test "$WITH_TOMCRYPT" = "Y"; then
|
||||
mkdir -p gen/\$fb_tgt/firebird/plugins
|
||||
fi
|
||||
if test "$CLIENT_ONLY_FLG" = "N"; then
|
||||
mkdir -p gen/\$fb_tgt/firebird/plugins/udr
|
||||
mkdir -p gen/\$fb_tgt/firebird/examples/api
|
||||
mkdir -p gen/\$fb_tgt/firebird/examples/dbcrypt
|
||||
@ -1340,10 +1370,8 @@ dnl # output
|
||||
mkdir -p gen/\$fb_tgt/firebird/examples/udr
|
||||
mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/bin
|
||||
mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/plugins
|
||||
mkdir -p gen/\$fb_tgt/firebird/include/firebird/impl
|
||||
mkdir -p gen/\$fb_tgt/firebird/lib
|
||||
mkdir -p gen/\$fb_tgt/firebird/misc
|
||||
mkdir -p gen/\$fb_tgt/firebird/tests
|
||||
fi
|
||||
|
||||
dnl ### TEMP ### directories for generated .cpp, .o and .d by module name
|
||||
for src_dir in `cd src; ls -R -1 * | grep : | tr -d : | tr "\n" " "; cd ..`; do
|
||||
@ -1370,12 +1398,16 @@ dnl TODO: fix "arch-specific/linux/" paths for common posix scripts with SVN
|
||||
for fb_tgt in $FB_TARGETS; do
|
||||
AC_CONFIG_FILES([
|
||||
gen/$fb_tgt/firebird/firebird.conf:builds/install/misc/firebird.conf
|
||||
gen/$fb_tgt/firebird/plugins.conf:builds/install/misc/plugins.conf
|
||||
])
|
||||
if test "$CLIENT_ONLY_FLG" = "N"; then
|
||||
AC_CONFIG_FILES([
|
||||
gen/$fb_tgt/firebird/databases.conf:builds/install/misc/databases.conf
|
||||
gen/$fb_tgt/firebird/fbtrace.conf:src/utilities/ntrace/fbtrace.conf
|
||||
gen/$fb_tgt/firebird/intl/fbintl.conf:builds/install/misc/fbintl.conf
|
||||
gen/$fb_tgt/firebird/plugins.conf:builds/install/misc/plugins.conf
|
||||
gen/$fb_tgt/firebird/replication.conf:builds/install/misc/replication.conf
|
||||
])
|
||||
fi
|
||||
done
|
||||
|
||||
if test "x$CROSS" != "x"; then
|
||||
|
@ -25,6 +25,7 @@
|
||||
#ifndef COMMON_REF_COUNTED_H
|
||||
#define COMMON_REF_COUNTED_H
|
||||
|
||||
#include "fb_exception.h"
|
||||
#include "../common/classes/fb_atomic.h"
|
||||
#include "../common/gdsassert.h"
|
||||
|
||||
|
@ -267,8 +267,8 @@ struct FbVarChar
|
||||
{
|
||||
size_t len = strlen(s);
|
||||
assert(len <= N);
|
||||
length = (ISC_USHORT) len;
|
||||
memcpy(str, s, (length <= N ? length : N));
|
||||
length = (ISC_USHORT) (len <= N ? len : N);
|
||||
memcpy(str, s, length);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* PROGRAM: Interbase layered support library
|
||||
* MODULE: array.epp
|
||||
* MODULE: array.cpp
|
||||
* DESCRIPTION: Dynamic array support
|
||||
*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
@ -33,19 +33,19 @@
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
#include "firebird/Message.h"
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "ibase.h"
|
||||
#include "../yvalve/array_proto.h"
|
||||
#include "../yvalve/gds_proto.h"
|
||||
#include "../yvalve/YObjects.h"
|
||||
#include "../common/StatusArg.h"
|
||||
#include "../jrd/constants.h"
|
||||
#include "../common/utils_proto.h"
|
||||
|
||||
using namespace Firebird;
|
||||
|
||||
DATABASE DB = STATIC FILENAME "yachts.lnk";
|
||||
|
||||
const int array_desc_column_major = 1; // Set for FORTRAN
|
||||
|
||||
struct gen_t
|
||||
@ -62,8 +62,6 @@ static void adjust_length(ISC_ARRAY_DESC*);
|
||||
static void copy_exact_name (const char*, char*, SSHORT);
|
||||
static ISC_STATUS error(ISC_STATUS* status, const Arg::StatusVector& v);
|
||||
static ISC_STATUS gen_sdl(ISC_STATUS*, const ISC_ARRAY_DESC*, SSHORT*, UCHAR**, SSHORT*, bool);
|
||||
static ISC_STATUS lookup_desc(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, const SCHAR*,
|
||||
const SCHAR*, ISC_ARRAY_DESC*, SCHAR*);
|
||||
static ISC_STATUS stuff_args(gen_t*, SSHORT, ...);
|
||||
static ISC_STATUS stuff_literal(gen_t*, SLONG);
|
||||
static ISC_STATUS stuff_string(gen_t*, UCHAR, const SCHAR*);
|
||||
@ -144,73 +142,117 @@ ISC_STATUS API_ROUTINE isc_array_get_slice(ISC_STATUS* status,
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS API_ROUTINE isc_array_lookup_bounds(ISC_STATUS* status,
|
||||
FB_API_HANDLE* db_handle,
|
||||
FB_API_HANDLE* trans_handle,
|
||||
const SCHAR* relation_name,
|
||||
const SCHAR* field_name,
|
||||
ISC_ARRAY_DESC* desc)
|
||||
void iscArrayLookupBoundsImpl(Why::YAttachment* attachment,
|
||||
Why::YTransaction* transaction, const SCHAR* relationName, const SCHAR* fieldName, ISC_ARRAY_DESC* desc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
* i s c _ a r r a y _ l o o k u p _ b o u n d s
|
||||
*
|
||||
**************************************
|
||||
*
|
||||
* Functional description
|
||||
*
|
||||
**************************************/
|
||||
SCHAR global[MAX_SQL_IDENTIFIER_SIZE];
|
||||
LocalStatus status;
|
||||
CheckStatusWrapper statusWrapper(&status);
|
||||
|
||||
if (lookup_desc(status, db_handle, trans_handle, field_name, relation_name, desc, global))
|
||||
{
|
||||
return status[1];
|
||||
}
|
||||
|
||||
ISC_STATUS_ARRAY isc_status = {0};
|
||||
isc_db_handle DB = *db_handle;
|
||||
isc_req_handle handle = 0;
|
||||
iscArrayLookupDescImpl(attachment, transaction, relationName, fieldName, desc);
|
||||
|
||||
ISC_ARRAY_BOUND* tail = desc->array_desc_bounds;
|
||||
|
||||
FOR (REQUEST_HANDLE handle TRANSACTION_HANDLE *trans_handle)
|
||||
X IN RDB$FIELD_DIMENSIONS
|
||||
WITH X.RDB$FIELD_NAME EQ global
|
||||
SORTED BY X.RDB$DIMENSION
|
||||
tail->array_bound_lower = (SSHORT) X.RDB$LOWER_BOUND;
|
||||
tail->array_bound_upper = (SSHORT) X.RDB$UPPER_BOUND;
|
||||
++tail;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
ISC_STATUS_ARRAY temp_status;
|
||||
isc_release_request(temp_status, &handle);
|
||||
fb_utils::copyStatus(status, ISC_STATUS_LENGTH, isc_status, ISC_STATUS_LENGTH);
|
||||
return status[1];
|
||||
END_ERROR;
|
||||
constexpr auto sql = R"""(
|
||||
select fd.rdb$lower_bound,
|
||||
fd.rdb$upper_bound
|
||||
from rdb$field_dimensions fd
|
||||
where fd.rdb$field_name = ?
|
||||
order by fd.dimension
|
||||
)""";
|
||||
|
||||
isc_release_request(isc_status, &handle);
|
||||
return status[1];
|
||||
FB_MESSAGE(InputMessage, CheckStatusWrapper,
|
||||
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN * 4), fieldName)
|
||||
) inputMessage(&statusWrapper, MasterInterfacePtr());
|
||||
inputMessage.clear();
|
||||
|
||||
FB_MESSAGE(OutputMessage, CheckStatusWrapper,
|
||||
(FB_INTEGER, lowerBound)
|
||||
(FB_INTEGER, upperBound)
|
||||
) outputMessage(&statusWrapper, MasterInterfacePtr());
|
||||
|
||||
inputMessage->fieldNameNull = FB_FALSE;
|
||||
inputMessage->fieldName.set((const char*) fieldName);
|
||||
|
||||
auto resultSet = makeNoIncRef(attachment->openCursor(&statusWrapper, transaction, 0, sql,
|
||||
SQL_DIALECT_CURRENT, inputMessage.getMetadata(), inputMessage.getData(),
|
||||
outputMessage.getMetadata(), nullptr, 0));
|
||||
status.check();
|
||||
|
||||
while (resultSet->fetchNext(&statusWrapper, outputMessage.getData()) == IStatus::RESULT_OK)
|
||||
{
|
||||
tail->array_bound_lower = outputMessage->lowerBoundNull ? 0 : outputMessage->lowerBound;
|
||||
tail->array_bound_upper = outputMessage->upperBoundNull ? 0 : outputMessage->upperBound;
|
||||
++tail;
|
||||
}
|
||||
|
||||
status.check();
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS API_ROUTINE isc_array_lookup_desc(ISC_STATUS* status,
|
||||
FB_API_HANDLE* db_handle,
|
||||
FB_API_HANDLE* trans_handle,
|
||||
const SCHAR* relation_name,
|
||||
const SCHAR* field_name,
|
||||
ISC_ARRAY_DESC* desc)
|
||||
void iscArrayLookupDescImpl(Why::YAttachment* attachment,
|
||||
Why::YTransaction* transaction, const SCHAR* relationName, const SCHAR* fieldName, ISC_ARRAY_DESC* desc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
* i s c _ a r r a y _ l o o k u p _ d e s c
|
||||
*
|
||||
**************************************
|
||||
*
|
||||
* Functional description
|
||||
*
|
||||
**************************************/
|
||||
LocalStatus status;
|
||||
CheckStatusWrapper statusWrapper(&status);
|
||||
|
||||
return lookup_desc(status, db_handle, trans_handle, field_name, relation_name, desc, NULL);
|
||||
copy_exact_name(fieldName, desc->array_desc_field_name, sizeof(desc->array_desc_field_name));
|
||||
copy_exact_name(relationName, desc->array_desc_relation_name, sizeof(desc->array_desc_relation_name));
|
||||
|
||||
desc->array_desc_flags = 0;
|
||||
|
||||
constexpr auto sql = R"""(
|
||||
select f.rdb$field_type,
|
||||
f.rdb$field_scale,
|
||||
f.rdb$field_length,
|
||||
f.rdb$dimensions
|
||||
from rdb$relation_fields rf
|
||||
join rdb$fields f
|
||||
on f.rdb$field_name = rf.rdb$field_source
|
||||
where rf.rdb$relation_name = ? and
|
||||
rf.rdb$field_name = ?
|
||||
)""";
|
||||
|
||||
FB_MESSAGE(InputMessage, CheckStatusWrapper,
|
||||
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN * 4), relationName)
|
||||
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN * 4), fieldName)
|
||||
) inputMessage(&statusWrapper, MasterInterfacePtr());
|
||||
inputMessage.clear();
|
||||
|
||||
FB_MESSAGE(OutputMessage, CheckStatusWrapper,
|
||||
(FB_INTEGER, fieldType)
|
||||
(FB_INTEGER, fieldScale)
|
||||
(FB_INTEGER, fieldLength)
|
||||
(FB_INTEGER, dimensions)
|
||||
) outputMessage(&statusWrapper, MasterInterfacePtr());
|
||||
|
||||
inputMessage->relationNameNull = FB_FALSE;
|
||||
inputMessage->relationName.set((const char*) relationName);
|
||||
|
||||
inputMessage->fieldNameNull = FB_FALSE;
|
||||
inputMessage->fieldName.set((const char*) fieldName);
|
||||
|
||||
auto resultSet = makeNoIncRef(attachment->openCursor(&statusWrapper, transaction, 0, sql,
|
||||
SQL_DIALECT_CURRENT, inputMessage.getMetadata(), inputMessage.getData(),
|
||||
outputMessage.getMetadata(), nullptr, 0));
|
||||
status.check();
|
||||
|
||||
if (resultSet->fetchNext(&statusWrapper, outputMessage.getData()) == IStatus::RESULT_OK)
|
||||
{
|
||||
desc->array_desc_dtype = outputMessage->fieldTypeNull ? 0 : outputMessage->fieldType;
|
||||
desc->array_desc_scale = outputMessage->fieldScaleNull ? 0 : outputMessage->fieldScale;
|
||||
desc->array_desc_length = outputMessage->fieldLengthNull ? 0 : outputMessage->fieldLength;
|
||||
|
||||
adjust_length(desc);
|
||||
desc->array_desc_dimensions = outputMessage->dimensionsNull ? 0 : outputMessage->dimensions;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
status.check();
|
||||
|
||||
(Arg::Gds(isc_fldnotdef) <<
|
||||
Arg::Str(desc->array_desc_field_name) <<
|
||||
Arg::Str(desc->array_desc_relation_name)).raise();
|
||||
}
|
||||
|
||||
|
||||
@ -517,67 +559,6 @@ static ISC_STATUS gen_sdl(ISC_STATUS* status,
|
||||
|
||||
|
||||
|
||||
static ISC_STATUS lookup_desc(ISC_STATUS* status,
|
||||
FB_API_HANDLE* db_handle,
|
||||
FB_API_HANDLE* trans_handle,
|
||||
const SCHAR* field_name,
|
||||
const SCHAR* relation_name,
|
||||
ISC_ARRAY_DESC* desc,
|
||||
SCHAR* global)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
* l o o k u p _ d e s c
|
||||
*
|
||||
**************************************
|
||||
*
|
||||
* Functional description
|
||||
*
|
||||
**************************************/
|
||||
ISC_STATUS_ARRAY isc_status = {0};
|
||||
isc_db_handle DB = *db_handle;
|
||||
isc_req_handle handle = 0;
|
||||
|
||||
copy_exact_name(field_name, desc->array_desc_field_name, sizeof(desc->array_desc_field_name));
|
||||
copy_exact_name(relation_name, desc->array_desc_relation_name, sizeof(desc->array_desc_relation_name));
|
||||
|
||||
desc->array_desc_flags = 0;
|
||||
|
||||
bool flag = false;
|
||||
|
||||
FOR (REQUEST_HANDLE handle TRANSACTION_HANDLE *trans_handle)
|
||||
X IN RDB$RELATION_FIELDS CROSS Y IN RDB$FIELDS
|
||||
WITH X.RDB$FIELD_SOURCE EQ Y.RDB$FIELD_NAME AND
|
||||
X.RDB$RELATION_NAME EQ desc->array_desc_relation_name AND
|
||||
X.RDB$FIELD_NAME EQ desc->array_desc_field_name
|
||||
flag = true;
|
||||
desc->array_desc_dtype = (UCHAR)Y.RDB$FIELD_TYPE;
|
||||
desc->array_desc_scale = (SCHAR)Y.RDB$FIELD_SCALE;
|
||||
desc->array_desc_length = Y.RDB$FIELD_LENGTH;
|
||||
adjust_length(desc);
|
||||
desc->array_desc_dimensions = Y.RDB$DIMENSIONS;
|
||||
if (global) {
|
||||
copy_exact_name (Y.RDB$FIELD_NAME, global, sizeof(Y.RDB$FIELD_NAME));
|
||||
}
|
||||
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
ISC_STATUS_ARRAY temp_status;
|
||||
isc_release_request(temp_status, &handle);
|
||||
fb_utils::copyStatus(status, ISC_STATUS_LENGTH, isc_status, ISC_STATUS_LENGTH);
|
||||
return status[1];
|
||||
END_ERROR;
|
||||
|
||||
isc_release_request(isc_status, &handle);
|
||||
|
||||
if (!flag)
|
||||
return error(status, Arg::Gds(isc_fldnotdef) << Arg::Str(desc->array_desc_field_name) <<
|
||||
Arg::Str(desc->array_desc_relation_name));
|
||||
|
||||
return error(status, Arg::Gds(FB_SUCCESS));
|
||||
}
|
||||
|
||||
|
||||
static ISC_STATUS stuff_args(gen_t* gen, SSHORT count, ...)
|
||||
{
|
||||
/**************************************
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* PROGRAM: Dynamic SQL runtime support
|
||||
* MODULE: array_proto.h
|
||||
* DESCRIPTION: Prototype Header file for array.epp
|
||||
* DESCRIPTION: Prototype Header file for array.cpp
|
||||
*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
* License Version 1.0 (the "License"); you may not use this file
|
||||
@ -24,6 +24,11 @@
|
||||
#ifndef DSQL_ARRAY_PROTO_H
|
||||
#define DSQL_ARRAY_PROTO_H
|
||||
|
||||
namespace Why {
|
||||
class YAttachment;
|
||||
class YTransaction;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -49,6 +54,10 @@ ISC_STATUS API_ROUTINE isc_array_set_desc(ISC_STATUS*, const SCHAR*, const SCHAR
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
void iscArrayLookupBoundsImpl(Why::YAttachment* attachment, Why::YTransaction* transaction,
|
||||
const SCHAR* relationName, const SCHAR* fieldName, ISC_ARRAY_DESC* desc);
|
||||
|
||||
void iscArrayLookupDescImpl(Why::YAttachment* attachment, Why::YTransaction* transaction,
|
||||
const SCHAR* relationName, const SCHAR* fieldName, ISC_ARRAY_DESC* desc);
|
||||
|
||||
#endif // DSQL_ARRAY_PROTO_H
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* PROGRAM: InterBase layered support library
|
||||
* MODULE: blob.epp
|
||||
* MODULE: blob.cpp
|
||||
* DESCRIPTION: Dynamic blob support
|
||||
*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
@ -30,16 +30,17 @@
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
#include "firebird/Message.h"
|
||||
#include "ibase.h"
|
||||
#include "../jrd/intl.h"
|
||||
#include "../yvalve/blob_proto.h"
|
||||
#include "../yvalve/YObjects.h"
|
||||
#include "../common/StatusArg.h"
|
||||
#include "../common/utils_proto.h"
|
||||
#include "../jrd/constants.h"
|
||||
|
||||
using namespace Firebird;
|
||||
|
||||
DATABASE DB = STATIC "yachts.lnk";
|
||||
|
||||
static void copy_exact_name (const UCHAR*, UCHAR*, SSHORT);
|
||||
static ISC_STATUS error(ISC_STATUS* status, const Arg::StatusVector& v);
|
||||
|
||||
@ -119,96 +120,120 @@ ISC_STATUS API_ROUTINE isc_blob_gen_bpb(ISC_STATUS* status,
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS API_ROUTINE isc_blob_lookup_desc(ISC_STATUS* status,
|
||||
FB_API_HANDLE* db_handle,
|
||||
FB_API_HANDLE* trans_handle,
|
||||
const UCHAR* relation_name,
|
||||
const UCHAR* field_name,
|
||||
ISC_BLOB_DESC* desc, UCHAR* global)
|
||||
// Lookup the blob subtype, character set and segment size information from the metadata,
|
||||
// given a relation/procedure name and column/parameter name.
|
||||
// It will fill in the information in the BLOB_DESC.
|
||||
void iscBlobLookupDescImpl(Why::YAttachment* attachment, Why::YTransaction* transaction,
|
||||
const UCHAR* relationName, const UCHAR* fieldName, ISC_BLOB_DESC* desc, UCHAR* global)
|
||||
{
|
||||
/***********************************************
|
||||
*
|
||||
* i s c _ b l o b _ l o o k u p _ d e s c
|
||||
*
|
||||
***********************************************
|
||||
*
|
||||
* Functional description
|
||||
*
|
||||
* This routine will lookup the subtype,
|
||||
* character set and segment size information
|
||||
* from the metadata, given a relation/procedure name
|
||||
* and column/parameter name. it will fill in the information
|
||||
* in the BLOB_DESC.
|
||||
*
|
||||
***********************************************/
|
||||
ISC_STATUS_ARRAY isc_status = {0};
|
||||
isc_db_handle DB = *db_handle;
|
||||
isc_req_handle handle = 0;
|
||||
LocalStatus status;
|
||||
CheckStatusWrapper statusWrapper(&status);
|
||||
|
||||
copy_exact_name(field_name, desc->blob_desc_field_name, sizeof(desc->blob_desc_field_name));
|
||||
copy_exact_name(relation_name, desc->blob_desc_relation_name, sizeof(desc->blob_desc_relation_name));
|
||||
copy_exact_name(fieldName, desc->blob_desc_field_name, sizeof(desc->blob_desc_field_name));
|
||||
copy_exact_name(relationName, desc->blob_desc_relation_name, sizeof(desc->blob_desc_relation_name));
|
||||
|
||||
bool flag = false;
|
||||
|
||||
FOR (REQUEST_HANDLE handle TRANSACTION_HANDLE *trans_handle)
|
||||
X IN RDB$RELATION_FIELDS CROSS Y IN RDB$FIELDS
|
||||
WITH X.RDB$FIELD_SOURCE EQ Y.RDB$FIELD_NAME AND
|
||||
X.RDB$RELATION_NAME EQ desc->blob_desc_relation_name AND
|
||||
X.RDB$FIELD_NAME EQ desc->blob_desc_field_name
|
||||
flag = true;
|
||||
// Shared by both queries.
|
||||
FB_MESSAGE(OutputMessage, CheckStatusWrapper,
|
||||
(FB_INTEGER, fieldSubType)
|
||||
(FB_INTEGER, segmentLength)
|
||||
(FB_INTEGER, characterSetId)
|
||||
) outputMessage(&statusWrapper, MasterInterfacePtr());
|
||||
|
||||
desc->blob_desc_subtype = Y.RDB$FIELD_SUB_TYPE;
|
||||
desc->blob_desc_charset = Y.RDB$CHARACTER_SET_ID;
|
||||
desc->blob_desc_segment_size = Y.RDB$SEGMENT_LENGTH;
|
||||
{ // scope
|
||||
constexpr auto sql = R"""(
|
||||
select f.rdb$field_sub_type,
|
||||
f.rdb$segment_length,
|
||||
f.rdb$character_set_id
|
||||
from rdb$relation_fields rf
|
||||
join rdb$fields f
|
||||
on f.rdb$field_name = rf.rdb$field_source
|
||||
where rf.rdb$relation_name = ? and
|
||||
rf.rdb$field_name = ?
|
||||
)""";
|
||||
|
||||
if (global) {
|
||||
copy_exact_name((UCHAR*) Y.RDB$FIELD_NAME, global, sizeof(Y.RDB$FIELD_NAME));
|
||||
}
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
ISC_STATUS_ARRAY temp_status;
|
||||
isc_release_request(temp_status, &handle);
|
||||
fb_utils::copyStatus(status, ISC_STATUS_LENGTH, isc_status, ISC_STATUS_LENGTH);
|
||||
return status[1];
|
||||
END_ERROR;
|
||||
FB_MESSAGE(InputMessage, CheckStatusWrapper,
|
||||
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN * 4), relationName)
|
||||
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN * 4), fieldName)
|
||||
) inputMessage(&statusWrapper, MasterInterfacePtr());
|
||||
inputMessage.clear();
|
||||
|
||||
isc_release_request(isc_status, &handle);
|
||||
inputMessage->relationNameNull = FB_FALSE;
|
||||
inputMessage->relationName.set((const char*) relationName);
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
handle = 0;
|
||||
inputMessage->fieldNameNull = FB_FALSE;
|
||||
inputMessage->fieldName.set((const char*) fieldName);
|
||||
|
||||
FOR (REQUEST_HANDLE handle TRANSACTION_HANDLE *trans_handle)
|
||||
X IN RDB$PROCEDURE_PARAMETERS
|
||||
CROSS Y IN RDB$FIELDS
|
||||
WITH X.RDB$FIELD_SOURCE EQ Y.RDB$FIELD_NAME AND
|
||||
X.RDB$PROCEDURE_NAME EQ desc->blob_desc_relation_name AND
|
||||
X.RDB$PACKAGE_NAME MISSING AND
|
||||
X.RDB$PARAMETER_NAME EQ desc->blob_desc_field_name
|
||||
auto resultSet = makeNoIncRef(attachment->openCursor(&statusWrapper, transaction, 0, sql,
|
||||
SQL_DIALECT_CURRENT, inputMessage.getMetadata(), inputMessage.getData(),
|
||||
outputMessage.getMetadata(), nullptr, 0));
|
||||
status.check();
|
||||
|
||||
if (resultSet->fetchNext(&statusWrapper, outputMessage.getData()) == IStatus::RESULT_OK)
|
||||
{
|
||||
flag = true;
|
||||
|
||||
desc->blob_desc_subtype = Y.RDB$FIELD_SUB_TYPE;
|
||||
desc->blob_desc_charset = Y.RDB$CHARACTER_SET_ID;
|
||||
desc->blob_desc_segment_size = Y.RDB$SEGMENT_LENGTH;
|
||||
desc->blob_desc_subtype = outputMessage->fieldSubTypeNull ? 0 : outputMessage->fieldSubType;
|
||||
desc->blob_desc_charset = outputMessage->characterSetIdNull ? 0 : outputMessage->characterSetId;
|
||||
desc->blob_desc_segment_size = outputMessage->segmentLengthNull ? 0 : outputMessage->segmentLength;
|
||||
}
|
||||
|
||||
if (global)
|
||||
copy_exact_name((UCHAR*) Y.RDB$FIELD_NAME, global, sizeof(Y.RDB$FIELD_NAME));
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
ISC_STATUS_ARRAY temp_status;
|
||||
isc_release_request(temp_status, &handle);
|
||||
fb_utils::copyStatus(status, ISC_STATUS_LENGTH, isc_status, ISC_STATUS_LENGTH);
|
||||
return status[1];
|
||||
END_ERROR;
|
||||
|
||||
isc_release_request(isc_status, &handle);
|
||||
status.check();
|
||||
}
|
||||
|
||||
if (!flag)
|
||||
return error(status, Arg::Gds(isc_fldnotdef) << Arg::Str((const char*)(desc->blob_desc_field_name)) <<
|
||||
Arg::Str((const char*)(desc->blob_desc_relation_name)));
|
||||
{
|
||||
constexpr auto sql = R"""(
|
||||
select f.rdb$field_sub_type,
|
||||
f.rdb$segment_length,
|
||||
f.rdb$character_set_id
|
||||
from rdb$procedure_parameters pp
|
||||
join rdb$fields f
|
||||
on f.rdb$field_name = pp.rdb$field_source
|
||||
where pp.rdb$procedure_name = ? and
|
||||
pp.rdb$parameter_name = ? and
|
||||
pp.rdb$package_name is null
|
||||
)""";
|
||||
|
||||
return error(status, Arg::Gds(FB_SUCCESS));
|
||||
FB_MESSAGE(InputMessage, CheckStatusWrapper,
|
||||
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN * 4), procedureName)
|
||||
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN * 4), fieldName)
|
||||
) inputMessage(&statusWrapper, MasterInterfacePtr());
|
||||
inputMessage.clear();
|
||||
|
||||
inputMessage->procedureNameNull = FB_FALSE;
|
||||
inputMessage->procedureName.set((const char*) relationName);
|
||||
|
||||
inputMessage->fieldNameNull = FB_FALSE;
|
||||
inputMessage->fieldName.set((const char*) fieldName);
|
||||
|
||||
auto resultSet = makeNoIncRef(attachment->openCursor(&statusWrapper, transaction, 0, sql,
|
||||
SQL_DIALECT_CURRENT, inputMessage.getMetadata(), inputMessage.getData(),
|
||||
outputMessage.getMetadata(), nullptr, 0));
|
||||
status.check();
|
||||
|
||||
if (resultSet->fetchNext(&statusWrapper, outputMessage.getData()) == IStatus::RESULT_OK)
|
||||
{
|
||||
flag = true;
|
||||
|
||||
desc->blob_desc_subtype = outputMessage->fieldSubTypeNull ? 0 : outputMessage->fieldSubType;
|
||||
desc->blob_desc_charset = outputMessage->characterSetIdNull ? 0 : outputMessage->characterSetId;
|
||||
desc->blob_desc_segment_size = outputMessage->segmentLengthNull ? 0 : outputMessage->segmentLength;
|
||||
}
|
||||
|
||||
status.check();
|
||||
}
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
(Arg::Gds(isc_fldnotdef) <<
|
||||
Arg::Str((const char*)(desc->blob_desc_field_name)) <<
|
||||
Arg::Str((const char*)(desc->blob_desc_relation_name))).raise();
|
||||
}
|
||||
|
||||
if (global)
|
||||
copy_exact_name(fieldName, global, sizeof(desc->blob_desc_field_name));
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* PROGRAM: Dynamic SQL runtime support
|
||||
* MODULE: blob_proto.h
|
||||
* DESCRIPTION: Prototype Header file for blob.epp
|
||||
* DESCRIPTION: Prototype Header file for blob.cpp
|
||||
*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
* License Version 1.0 (the "License"); you may not use this file
|
||||
@ -24,6 +24,13 @@
|
||||
#ifndef DSQL_BLOB_PROTO_H
|
||||
#define DSQL_BLOB_PROTO_H
|
||||
|
||||
#include "../common/classes/RefCounted.h"
|
||||
|
||||
namespace Why {
|
||||
class YAttachment;
|
||||
class YTransaction;
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE isc_blob_gen_bpb(ISC_STATUS*, const ISC_BLOB_DESC*,
|
||||
const ISC_BLOB_DESC*, USHORT, UCHAR*, USHORT*);
|
||||
ISC_STATUS API_ROUTINE isc_blob_lookup_desc(ISC_STATUS*, void**, void**,
|
||||
@ -31,6 +38,9 @@ ISC_STATUS API_ROUTINE isc_blob_lookup_desc(ISC_STATUS*, void**, void**,
|
||||
ISC_STATUS API_ROUTINE isc_blob_set_desc(ISC_STATUS*, const UCHAR*, const UCHAR*,
|
||||
SSHORT, SSHORT, SSHORT, ISC_BLOB_DESC*);
|
||||
|
||||
void iscBlobLookupDescImpl(Why::YAttachment* attachment, Why::YTransaction* transaction,
|
||||
const UCHAR* relationName, const UCHAR* fieldName, ISC_BLOB_DESC* desc, UCHAR* global);
|
||||
|
||||
// Only declared in ibase.h:
|
||||
//void API_ROUTINE isc_blob_default_desc(ISC_BLOB_DESC* desc,
|
||||
// const UCHAR*, const UCHAR*);
|
||||
|
@ -62,6 +62,8 @@
|
||||
#include "../common/classes/fb_tls.h"
|
||||
#include "../common/status.h"
|
||||
#include "../common/classes/InternalMessageBuffer.h"
|
||||
#include "../yvalve/array_proto.h"
|
||||
#include "../yvalve/blob_proto.h"
|
||||
#include "../yvalve/utl_proto.h"
|
||||
#include "../yvalve/why_proto.h"
|
||||
#include "../yvalve/MasterImplementation.h"
|
||||
@ -1584,6 +1586,50 @@ Firebird::ITransaction* handleToITransaction(CheckStatusWrapper* status, isc_tr_
|
||||
//-------------------------------------
|
||||
|
||||
|
||||
ISC_STATUS API_ROUTINE isc_array_lookup_bounds(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, FB_API_HANDLE* traHandle,
|
||||
const SCHAR* relationName, const SCHAR* fieldName, ISC_ARRAY_DESC* desc)
|
||||
{
|
||||
StatusVector status(userStatus);
|
||||
CheckStatusWrapper statusWrapper(&status);
|
||||
|
||||
try
|
||||
{
|
||||
RefPtr<YAttachment> attachment(translateHandle(attachments, dbHandle));
|
||||
RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
|
||||
|
||||
iscArrayLookupBoundsImpl(attachment, transaction, relationName, fieldName, desc);
|
||||
}
|
||||
catch (const Exception& e)
|
||||
{
|
||||
e.stuffException(&statusWrapper);
|
||||
}
|
||||
|
||||
return status[1];
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS API_ROUTINE isc_array_lookup_desc(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, FB_API_HANDLE* traHandle,
|
||||
const SCHAR* relationName, const SCHAR* fieldName, ISC_ARRAY_DESC* desc)
|
||||
{
|
||||
StatusVector status(userStatus);
|
||||
CheckStatusWrapper statusWrapper(&status);
|
||||
|
||||
try
|
||||
{
|
||||
RefPtr<YAttachment> attachment(translateHandle(attachments, dbHandle));
|
||||
RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
|
||||
|
||||
iscArrayLookupDescImpl(attachment, transaction, relationName, fieldName, desc);
|
||||
}
|
||||
catch (const Exception& e)
|
||||
{
|
||||
e.stuffException(&statusWrapper);
|
||||
}
|
||||
|
||||
return status[1];
|
||||
}
|
||||
|
||||
|
||||
// Attach a database through the first subsystem that recognizes it.
|
||||
ISC_STATUS API_ROUTINE isc_attach_database(ISC_STATUS* userStatus, SSHORT fileLength,
|
||||
const TEXT* filename, isc_db_handle* publicHandle, SSHORT dpbLength, const SCHAR* dpb)
|
||||
@ -1645,6 +1691,31 @@ ISC_STATUS API_ROUTINE isc_blob_info(ISC_STATUS* userStatus, isc_blob_handle* bl
|
||||
}
|
||||
|
||||
|
||||
// Lookup the blob subtype, character set and segment size information from the metadata,
|
||||
// given a relation/procedure name and column/parameter name.
|
||||
// It will fill in the information in the BLOB_DESC.
|
||||
ISC_STATUS API_ROUTINE isc_blob_lookup_desc(ISC_STATUS* userStatus, isc_db_handle* dbHandle, isc_tr_handle* traHandle,
|
||||
const UCHAR* relationName, const UCHAR* fieldName, ISC_BLOB_DESC* desc, UCHAR* global)
|
||||
{
|
||||
StatusVector status(userStatus);
|
||||
CheckStatusWrapper statusWrapper(&status);
|
||||
|
||||
try
|
||||
{
|
||||
RefPtr<YAttachment> attachment(translateHandle(attachments, dbHandle));
|
||||
RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
|
||||
|
||||
iscBlobLookupDescImpl(attachment, transaction, relationName, fieldName, desc, global);
|
||||
}
|
||||
catch (const Exception& e)
|
||||
{
|
||||
e.stuffException(&statusWrapper);
|
||||
}
|
||||
|
||||
return status[1];
|
||||
}
|
||||
|
||||
|
||||
// Abort a partially completed blob.
|
||||
ISC_STATUS API_ROUTINE isc_cancel_blob(ISC_STATUS* userStatus, isc_blob_handle* blobHandle)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user