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

1. POSIX build libraries export only public API. 2. Unify exports for PROD_BUILD and DEV_BUILD. 3. Support for context memory pools. 4. Memory manager has lower memory overhead exceptionally on 64 bit targets

This commit is contained in:
skidder 2004-03-25 23:12:50 +00:00
parent ac9fb57a09
commit f26d84f76b
75 changed files with 2220 additions and 1950 deletions

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.gbak,v 1.6 2003-03-28 11:29:17 aafemt Exp $
# $Id: Makefile.in.client.gbak,v 1.7 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
@ -41,10 +41,10 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
GBAK_Other_Sources = remote/xdr.cpp jrd/sdl.cpp
GBAK_Files = backup.epp restore.epp \
burp.cpp canonical.cpp misc.cpp mvol.cpp
GBAK_Sources = $(addprefix burp/, $(GBAK_Files))
GBAK_Sources = $(addprefix burp/, $(GBAK_Files)) $(GBAK_Other_Sources)
GBAK_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GBAK_Sources))))
GSPLIT_Files= spit.cpp

View File

@ -27,11 +27,10 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.gdef,v 1.7 2004-01-07 00:31:18 brodsom Exp $
# $Id: Makefile.in.client.gdef,v 1.8 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=client.gdef
CFLAGS := -DSUPERCLIENT
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
@ -44,22 +43,18 @@ unexport ISC_USER
unexport ISC_PASSWORD
GDEF_Other_Sources = common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
gpre/pretty.cpp jrd/isc_file.cpp common/config/config.cpp common/config/dir_list.cpp \
common/config/config_file.cpp $(OS_SPECIFIC_Sources)
GDEF_Files= exe.epp extract.epp \
ddl.cpp expand.cpp expr.cpp generate.cpp \
hsh.cpp lex.cpp parse.cpp trn.cpp
GDEF_Sources = $(addprefix dudley/, $(GDEF_Files))
GDEF_Sources = $(addprefix dudley/, $(GDEF_Files)) $(GDEF_Other_Sources)
GDEF_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GDEF_Sources))))
JRD_Files= iberr.cpp isc.cpp isc_file.cpp llio.cpp misc.cpp status.cpp
JRD_Sources = $(addprefix jrd/, $(JRD_Files))
JRD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(JRD_Sources))))
GPRE_Files= pretty.cpp
GPRE_Sources = $(addprefix gpre/, $(GPRE_Files))
GPRE_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GPRE_Sources))))
AllObjects = $(GDEF_Objects) $(JRD_Objects) $(GPRE_Objects)
AllObjects = $(GDEF_Objects)
Dependencies = $(AllObjects:.o=.d)
@ -69,8 +64,8 @@ all: gdef
gdef: $(BIN)/gdef
$(BIN)/gdef: $(GDEF_Objects) $(JRD_Objects) $(GPRE_Objects) $(LIBFBCLIENT_SO)
$(LD) $(LINK_OPTS) $(GDEF_Objects) $(JRD_Objects) $(GPRE_Objects) -o $@ -L$(LIB) -lfbclient $(LINK_LIBS)
$(BIN)/gdef: $(GDEF_Objects) $(LIBFBCLIENT_SO)
$(LD) $(LINK_OPTS) $(GDEF_Objects) -o $@ -L$(LIB) -lfbclient $(LINK_LIBS)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.gfix,v 1.7 2003-03-28 11:29:18 aafemt Exp $
# $Id: Makefile.in.client.gfix,v 1.8 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=client.gfix
@ -40,10 +40,11 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
GFIX_Files = alice_meta.epp \
alice.cpp all.cpp exe.cpp tdr.cpp
GFIX_Other_Sources = jrd/isc.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp
GFIX_Sources = $(addprefix alice/, $(GFIX_Files))
GFIX_Files = alice_meta.epp alice.cpp all.cpp exe.cpp tdr.cpp
GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources)
GFIX_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GFIX_Sources))))
AllObjects = $(GFIX_Objects)

View File

@ -27,11 +27,10 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.gpre,v 1.11 2004-01-21 07:15:58 skidder Exp $
# $Id: Makefile.in.client.gpre,v 1.12 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=client.gpre
CFLAGS:= -DSUPERCLIENT
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
@ -40,14 +39,14 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
GPRE_Other_Sources = jrd/dsc.cpp
GPRE_Files = gpre_meta.epp \
cmd.cpp cme.cpp cmp.cpp c_cxx.cpp exp.cpp gpre.cpp \
hsh.cpp int_cxx.cpp jrdmet.cpp movg.cpp msc.cpp par.cpp \
pat.cpp pretty.cpp sqe.cpp sql.cpp cob.cpp \
@GPRE_LANGUAGE_MODULES@
GPRE_Sources = $(addprefix gpre/, $(GPRE_Files))
GPRE_Sources = $(addprefix gpre/, $(GPRE_Files)) $(GPRE_Other_Sources)
GPRE_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GPRE_Sources))))
AllObjects = $(GPRE_Objects)

View File

@ -27,11 +27,10 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.isql,v 1.6 2003-03-28 11:29:18 aafemt Exp $
# $Id: Makefile.in.client.isql,v 1.7 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=client.isql
CFLAGS:=-DSUPERCLIENT
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
@ -43,9 +42,9 @@ include $(ROOT)/gen/make.shared.variables
unexport ISC_USER
unexport ISC_PASSWORD
ISQL_Other_Sources = common/utils.cpp
ISQL_Files = extract.epp isql.epp show.epp
ISQL_Sources = $(addprefix isql/, $(ISQL_Files))
ISQL_Sources = $(addprefix isql/, $(ISQL_Files)) $(ISQL_Other_Sources)
ISQL_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(ISQL_Sources))))
AllObjects = $(ISQL_Objects)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.qli,v 1.2 2004-01-07 00:31:18 brodsom Exp $
# $Id: Makefile.in.client.qli,v 1.3 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=client.qli
@ -40,22 +40,18 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
QLI_Other_Sources = common/utils.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
jrd/dsc.cpp gpre/pretty.cpp
QLI_Files= all.cpp command.cpp compile.cpp dtr.cpp err.cpp eval.cpp \
expand.cpp exe.cpp format.cpp gener.cpp help.cpp \
hsh.cpp lex.cpp meta.cpp mov.cpp parse.cpp picstr.cpp proc.cpp \
report.cpp show.cpp
QLI_Sources = $(addprefix qli/, $(QLI_Files))
QLI_Sources = $(addprefix qli/, $(QLI_Files)) $(QLI_Other_Sources)
QLI_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(QLI_Sources))))
JRD_Files= iberr.cpp isc.cpp isc_file.cpp llio.cpp misc.cpp status.cpp
JRD_Sources = $(addprefix jrd/, $(JRD_Files))
JRD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(JRD_Sources))))
GPRE_Files= pretty.cpp
GPRE_Sources = $(addprefix gpre/, $(GPRE_Files))
GPRE_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GPRE_Sources))))
AllObjects = $(QLI_Objects) $(JRD_Objects) $(GPRE_Objects)
AllObjects = $(QLI_Objects)
Dependencies = $(AllObjects:.o=.d)
@ -67,7 +63,7 @@ all: qli
qli : create_yachts $(LIBFBCLIENT_SO) $(QLI)
$(QLI): $(QLI_Objects) $(JRD_Objects) $(GPRE_Objects)
$(QLI): $(QLI_Objects)
$(LD) $(LINK_OPTS) $^ -o $@ -L$(LIB) -lfbclient $(LINK_LIBS)
$(CHMOD_S7) $@
@ -78,13 +74,6 @@ create_yachts:
-$(LN) -f metadata.fdb yachts.lnk
# qli_help
#
# qli_help is now directly build in the refDatabase directory, and doesn't
# need to be rebuilt here.
include $(ROOT)/gen/make.shared.targets
-include $(Dependencies)

View File

@ -27,11 +27,10 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.util,v 1.18 2003-12-17 11:05:53 aafemt Exp $
# $Id: Makefile.in.client.util,v 1.19 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=client.util
CFLAGS:= -DSUPERCLIENT
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
@ -41,38 +40,48 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
LOCKPRINT_Other_Sources = common/utils.cpp lock/lock.cpp jrd/isc_sync.cpp jrd/isc.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
LOCKPRINT_Files= print.cpp
LOCKPRINT_Sources = $(addprefix lock/, $(LOCKPRINT_Files))
LOCKPRINT_Sources = $(addprefix lock/, $(LOCKPRINT_Files)) $(LOCKPRINT_Other_Sources)
LOCKPRINT_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(LOCKPRINT_Sources))))
NBACKUP_Sources= utilities/nbackup.cpp jrd/db_alias.cpp
NBACKUP_Other_Sources = jrd/db_alias.cpp common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
NBACKUP_Files= nbackup.cpp
NBACKUP_Sources = $(addprefix utilities/, $(NBACKUP_Files)) $(NBACKUP_Other_Sources)
NBACKUP_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(NBACKUP_Sources))))
CREATEDB_Files= create_db.cpp
CREATEDB_Sources = $(addprefix utilities/, $(CREATEDB_Files))
CREATEDB_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(CREATEDB_Sources))))
DROP_Other_Sources = common/utils.cpp lock/lock.cpp jrd/isc_sync.cpp jrd/isc.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
DROP_Files= drop.cpp
DROP_Sources = $(addprefix utilities/, $(DROP_Files))
DROP_Sources = $(addprefix utilities/, $(DROP_Files)) $(DROP_Other_Sources)
DROP_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(DROP_Sources))))
GSEC_Files = gsec.cpp
GSEC_Sources = $(addprefix utilities/gsec/, $(GSEC_Files))
GSEC_Other_Sources = jrd/enc.cpp
GSEC_Files = gsec.cpp security.cpp
GSEC_Sources = $(addprefix utilities/gsec/, $(GSEC_Files)) $(GSEC_Other_Sources)
GSEC_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GSEC_Sources))))
GSTAT_Other_Sources = jrd/btn.cpp jrd/db_alias.cpp common/utils.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
GSTAT_Files = dba.epp ppg.cpp
GSTAT_Sources = $(addprefix utilities/gstat/, $(GSTAT_Files))
GSTAT_Sources = $(addprefix utilities/gstat/, $(GSTAT_Files)) $(GSTAT_Other_Sources)
GSTAT_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GSTAT_Sources))))
GSTAT_JRD_Files = btn.cpp db_alias.cpp
GSTAT_JRD_Sources = $(addprefix jrd/, $(GSTAT_JRD_Files))
GSTAT_JRD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GSTAT_JRD_Sources))))
FBGUARD_Other_Sources = jrd/isc.cpp
FBGUARD_Files = guard.cpp util.cpp
FBGUARD_Sources = $(addprefix utilities/guard/, $(FBGUARD_Files))
FBGUARD_Sources = $(addprefix utilities/guard/, $(FBGUARD_Files)) $(FBGUARD_Other_Sources)
FBGUARD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBGUARD_Sources))))
IBGUARD_A_Files = cntl_guard.cpp iscguard.cpp
@ -135,8 +144,8 @@ $(LOCKPRINT): $(LOCKPRINT_Objects)
gstat : $(LIBFBCLIENT_SO) $(GSTAT)
$(GSTAT): $(GSTAT_Objects) $(GSTAT_JRD_Objects)
$(LD) $(LINK_OPTS) $(GSTAT_Objects) $(GSTAT_JRD_Objects) -o $@ -L$(LIB) -lfbclient $(LINK_LIBS)
$(GSTAT): $(GSTAT_Objects)
$(LD) $(LINK_OPTS) $(GSTAT_Objects) -o $@ -L$(LIB) -lfbclient $(LINK_LIBS)

View File

@ -29,7 +29,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.codes,v 1.14 2003-11-08 07:39:06 bellardo Exp $
# $Id: Makefile.in.codes,v 1.15 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=codes
@ -48,7 +48,6 @@ include $(ROOT)/gen/make.shared.variables
# different to the newly generated entries.
#
# There are also blrtable.h and ids.h which are generated as well.
# Regeneration is a manual thing, and you will need to
.PHONY: generated_headers

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.fbudf,v 1.1 2003-09-27 23:29:07 brodsom Exp $
# $Id: Makefile.in.embed.fbudf,v 1.2 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=extlib
@ -59,15 +59,6 @@ Dependencies = $(AllObjects:.o=.d)
all: lib_fbudf
# The libraires in this directory could do with a bit more work, since they
# the previous code (presumably by John) that does the ar crv stuff, might
# work still, even if the .o files have directory prefixes on them.
# And the udf stuff doesn't want to do .$(SHRLIB_EXT).X.X.X extensions in UDF directory
# or the loader gets confused with loading the links.
# MOD 29-July-2002
#
# User defined functions. (I've put the .$(SHRLIB_EXT) extension back onto the library)
#
@ -80,8 +71,6 @@ ifeq ($(PLATFORM),win32)
else
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)fbudf.$(SHRLIB_EXT) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^
endif
# -$(LN) $(@F) $(LIBFBINTL_SOBASENAME)
# -$(LN) $(notdir $(LIBFBINTL_SOBASENAME)) $(LIBFBINTL_SONAME)
include $(ROOT)/gen/make.shared.targets

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.gbak,v 1.6 2003-03-28 11:29:18 aafemt Exp $
# $Id: Makefile.in.embed.gbak,v 1.7 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=embed.gbak
@ -40,10 +40,10 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
GBAK_Other_Sources = remote/xdr.cpp jrd/sdl.cpp
GBAK_Files = backup.epp restore.epp \
burp.cpp canonical.cpp misc.cpp mvol.cpp
GBAK_Sources = $(addprefix burp/, $(GBAK_Files))
GBAK_Sources = $(addprefix burp/, $(GBAK_Files)) $(GBAK_Other_Sources)
GBAK_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GBAK_Sources))))
GSPLIT_Files= spit.cpp

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.gdef,v 1.5 2003-03-27 11:21:44 aafemt Exp $
# $Id: Makefile.in.embed.gdef,v 1.6 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=embed.gdef
@ -43,11 +43,15 @@ unexport ISC_USER
unexport ISC_PASSWORD
GDEF_Other_Sources = common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
gpre/pretty.cpp jrd/isc_file.cpp common/config/config.cpp common/config/dir_list.cpp \
common/config/config_file.cpp $(OS_SPECIFIC_Sources)
GDEF_Files= exe.epp extract.epp \
ddl.cpp expand.cpp expr.cpp generate.cpp \
hsh.cpp lex.cpp parse.cpp trn.cpp
GDEF_Sources = $(addprefix dudley/, $(GDEF_Files))
GDEF_Sources = $(addprefix dudley/, $(GDEF_Files)) $(GDEF_Other_Sources)
GDEF_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GDEF_Sources))))
AllObjects = $(GDEF_Objects)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.gfix,v 1.7 2003-03-28 11:29:18 aafemt Exp $
# $Id: Makefile.in.embed.gfix,v 1.8 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=embed.gfix
@ -43,7 +43,10 @@ include $(ROOT)/gen/make.shared.variables
GFIX_Files = alice_meta.epp \
alice.cpp all.cpp exe.cpp tdr.cpp
GFIX_Sources = $(addprefix alice/, $(GFIX_Files))
GFIX_Other_Sources = jrd/isc.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp
GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources)
GFIX_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GFIX_Sources))))
AllObjects = $(GFIX_Objects)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.gpre,v 1.11 2004-01-21 07:15:58 skidder Exp $
# $Id: Makefile.in.embed.gpre,v 1.12 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=embed.gpre
@ -39,14 +39,14 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
GPRE_Other_Sources = jrd/dsc.cpp
GPRE_Files = gpre_meta.epp \
cmd.cpp cme.cpp cmp.cpp c_cxx.cpp exp.cpp gpre.cpp \
hsh.cpp int_cxx.cpp jrdmet.cpp movg.cpp msc.cpp par.cpp \
pat.cpp pretty.cpp sqe.cpp sql.cpp \
@GPRE_LANGUAGE_MODULES@
GPRE_Sources = $(addprefix gpre/, $(GPRE_Files))
GPRE_Sources = $(addprefix gpre/, $(GPRE_Files)) $(GPRE_Other_Sources)
GPRE_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GPRE_Sources))))
AllObjects = $(GPRE_Objects)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.isql,v 1.6 2003-03-28 11:29:18 aafemt Exp $
# $Id: Makefile.in.embed.isql,v 1.7 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=embed.isql
@ -42,9 +42,9 @@ include $(ROOT)/gen/make.shared.variables
unexport ISC_USER
unexport ISC_PASSWORD
ISQL_Other_Sources = common/utils.cpp
ISQL_Files = extract.epp isql.epp show.epp
ISQL_Sources = $(addprefix isql/, $(ISQL_Files))
ISQL_Sources = $(addprefix isql/, $(ISQL_Files)) $(ISQL_Other_Sources)
ISQL_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(ISQL_Sources))))
AllObjects = $(ISQL_Objects)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.qli,v 1.12 2003-09-11 02:53:27 brodsom Exp $
# $Id: Makefile.in.embed.qli,v 1.13 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=embed.qli
@ -40,11 +40,15 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
QLI_Other_Sources = common/utils.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
jrd/dsc.cpp gpre/pretty.cpp
QLI_Files= all.cpp command.cpp compile.cpp dtr.cpp err.cpp eval.cpp \
expand.cpp exe.cpp format.cpp gener.cpp help.cpp \
hsh.cpp lex.cpp meta.cpp mov.cpp parse.cpp picstr.cpp proc.cpp \
report.cpp show.cpp
QLI_Sources = $(addprefix qli/, $(QLI_Files))
QLI_Sources = $(addprefix qli/, $(QLI_Files)) $(QLI_Other_Sources)
QLI_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(QLI_Sources))))
AllObjects = $(QLI_Objects)
@ -70,13 +74,6 @@ create_yachts:
-$(LN) -f metadata.fdb yachts.lnk
# qli_help
#
# qli_help is now directly build in the refDatabase directory, and doesn't
# need to be rebuilt here.
include $(ROOT)/gen/make.shared.targets
-include $(Dependencies)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.embed.util,v 1.11 2003-09-08 20:23:31 skidder Exp $
# $Id: Makefile.in.embed.util,v 1.12 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=embed.util
@ -41,13 +41,18 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
LOCKPRINT_Other_Sources = common/utils.cpp lock/lock.cpp jrd/isc_sync.cpp jrd/isc.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
LOCKPRINT_Files= print.cpp
LOCKPRINT_Sources = $(addprefix lock/, $(LOCKPRINT_Files))
LOCKPRINT_Sources = $(addprefix lock/, $(LOCKPRINT_Files)) $(LOCKPRINT_Other_Sources)
LOCKPRINT_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(LOCKPRINT_Sources))))
NBACKUP_Other_Sources = jrd/db_alias.cpp common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
NBACKUP_Files= nbackup.cpp
NBACKUP_Sources = $(addprefix utilities/, $(NBACKUP_Files))
NBACKUP_Sources = $(addprefix utilities/, $(NBACKUP_Files)) $(NBACKUP_Other_Sources)
NBACKUP_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(NBACKUP_Sources))))
@ -56,16 +61,26 @@ CREATEDB_Sources = $(addprefix utilities/, $(CREATEDB_Files))
CREATEDB_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(CREATEDB_Sources))))
DROP_Other_Sources = common/utils.cpp lock/lock.cpp jrd/isc_sync.cpp jrd/isc.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
DROP_Files= drop.cpp
DROP_Sources = $(addprefix utilities/, $(DROP_Files))
DROP_Sources = $(addprefix utilities/, $(DROP_Files)) $(DROP_Other_Sources)
DROP_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(DROP_Sources))))
GSEC_Files = gsec.cpp
GSEC_Sources = $(addprefix utilities/gsec/, $(GSEC_Files))
GSEC_Other_Sources = jrd/enc.cpp
GSEC_Files = gsec.cpp security.cpp
GSEC_Sources = $(addprefix utilities/gsec/, $(GSEC_Files)) $(GSEC_Other_Sources)
GSEC_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GSEC_Sources))))
GSTAT_Other_Sources = jrd/btn.cpp jrd/db_alias.cpp common/utils.cpp \
common/classes/fb_string.cpp common/classes/alloc.cpp common/fb_exception.cpp \
common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources)
GSTAT_Files = dba.epp ppg.cpp
GSTAT_Sources = $(addprefix utilities/gstat/, $(GSTAT_Files))
GSTAT_Sources = $(addprefix utilities/gstat/, $(GSTAT_Files)) $(GSTAT_Other_Sources)
GSTAT_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GSTAT_Sources))))

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.extlib,v 1.14 2003-09-27 23:29:07 brodsom Exp $
# $Id: Makefile.in.extlib,v 1.15 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=extlib
@ -76,15 +76,8 @@ all: lib_ib_udf lib_ib_util
lib_ib_udf: $(UDF)/ib_udf.$(SHRLIB_EXT)
#$(UDF)/ib_udf.$(SHRLIB_EXT)(%.o) : %.o
# ar crv $@ $%
$(UDF)/ib_udf.$(SHRLIB_EXT): $(UDF_Objects) $(UTIL_Objects)
# $(LIB_LINK) $(LIB_LINK_SONAME)ib_udf.$(SHRLIB_EXT) $(LIB_LINK_RPATH)/usr/lib -o $@ $^
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)ib_udf.$(SHRLIB_EXT) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^
# -$(LN) $(@F) $(LIBFBINTL_SOBASENAME)
# -$(LN) $(notdir $(LIBFBINTL_SOBASENAME)) $(LIBFBINTL_SONAME)
# ib_util
@ -92,11 +85,6 @@ lib_ib_util: $(LIBIBUTIL_SO)
$(LIBIBUTIL_SO): $(UTIL_Objects)
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)$(IbUtilLibraryName) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^
# -$(LN) $(@F) $(LIBFBINTL_SOBASENAME)
# -$(LN) $(notdir $(LIBFBINTL_SOBASENAME)) $(LIBFBINTL_SONAME)
#$(LIB)/ib_util.$(SHRLIB_EXT)(%.o) : %.o
# ar crv $@ $%
include $(ROOT)/gen/make.shared.targets

View File

@ -27,11 +27,12 @@
# Contributor(s):
#
#
# $Id: Makefile.in.fbserver,v 1.12 2003-11-08 07:39:06 bellardo Exp $
# $Id: Makefile.in.fbserver,v 1.13 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=fbserver
CFLAGS:=-DSUPERSERVER
ArchType=super
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
@ -40,11 +41,7 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
IPSERVER_Files = $(WIN_IPSERVER_Files)
IPSERVER_Sources = $(addprefix ipserver/, $(IPSERVER_Files))
IPSERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(IPSERVER_Sources))))
SERVER_Files = $(OS_ServerFiles) server.cpp
SERVER_Files = $(OS_ServerFiles) server.cpp server_stub.cpp
SERVER_Sources = $(addprefix remote/, $(SERVER_Files))
SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Sources))))
@ -59,15 +56,8 @@ Dependencies = $(AllObjects:.o=.d)
fbserver : $(FB_SUPER_SERVER)
$(FB_SUPER_SERVER): $(SERVER_Objects) $(IPSERVER_Objects) -lfbserver
$(FB_SUPER_SERVER): $(SERVER_Objects) $(LIBFBSERVER_Objects)
$(LD) $(LINK_OPTS) $^ -o $@ -L$(LIB) $(LIB_GUI) $(LINK_LIBS)
# $(CHMOD_S7) $@
#$(LIB)/libalice.a \
# $(LIB)/libburp.a $(LIB)/libcommon.a
AllObjects = $(SERVER_Objects)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.firebird,v 1.50 2004-01-07 00:31:18 brodsom Exp $
# $Id: Makefile.in.firebird,v 1.51 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
@ -370,15 +370,12 @@ embed_fbudf:
#_ Firebird Server Targets (super and super client)__________________________
.PHONY: libfbserver fbserver
.PHONY: fbserver
.PHONY: libfbclient client_gfix client_gbak client_isql client_gpre client_util client_fbudf
super_targets: libfbserver fbserver libfbclient client_gfix client_gbak \
super_targets: fbserver libfbclient client_gfix client_gbak \
client_isql client_gpre client_util client_fbudf client_gdef client_qli
libfbserver:
$(MAKE) -f $(GEN_ROOT)/Makefile.libfbserver $@
fbserver:
$(MAKE) -f $(GEN_ROOT)/Makefile.fbserver $@

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.inet_server,v 1.12 2003-11-08 07:39:06 bellardo Exp $
# $Id: Makefile.in.inet_server,v 1.13 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=inet_server
@ -39,28 +39,21 @@ include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
IPSERVER_Files = $(WIN_IPSERVER_Files)
IPSERVER_Sources = $(addprefix ipserver/, $(IPSERVER_Files))
IPSERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(IPSERVER_Sources))))
SERVER_Files = $(OS_ServerFiles) server.cpp
SERVER_Files = server_stub.cpp
SERVER_Sources = $(addprefix remote/, $(SERVER_Files))
SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Sources))))
AllObjects = $(SERVER_Objects)
Dependencies = $(AllObjects:.o=.d)
.PHONY: fb_inet_server
# SD: We don't need to rebuild fb_inet_server every time libfbembed.so changed,
# but we must ensure it's existance
fb_inet_server : $(LIBFBEMBED_SO) $(FB_CLASSIC_SERVER)
$(FB_CLASSIC_SERVER): $(SERVER_Objects) $(IPSERVER_Objects)
$(FB_CLASSIC_SERVER): $(SERVER_Objects)
$(LD) $(LINK_OPTS) $^ -o $@ -L$(LIB) -lfbembed $(LIB_GUI) $(LINK_LIBS)
# $(CHMOD_S7) $@
include $(ROOT)/gen/make.shared.targets

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.intl,v 1.16 2003-11-04 06:25:11 eku Exp $
# $Id: Makefile.in.intl,v 1.17 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=intl
@ -77,11 +77,8 @@ all : libfbintl
libfbintl : $(LIBFBINTL_SO)
$(LIBFBINTL_SO): $(INTL_Objects)
# $(LIB_LINK) -Wl,-soname,libintl.$(SHRLIB_EXT).1 -Wl,-rpath,/usr/lib -o $@ $^
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)libintl.$(SHRLIB_EXT).1 $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ $(SO_LINK_LIBS)
# -$(LN) $(@F) $(LIBFBINTL_SOBASENAME)
# -$(LN) $(notdir $(LIBFBINTL_SOBASENAME)) $(LIBFBINTL_SONAME)
$(LIB_LINK) $(LINK_FBINTL_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)libintl.$(SHRLIB_EXT).1 \
$(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ $(SO_LINK_LIBS)
include $(ROOT)/gen/make.shared.targets

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.libfbclient,v 1.20 2004-01-07 00:31:18 brodsom Exp $
# $Id: Makefile.in.libfbclient,v 1.21 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=libfbclient
@ -111,8 +111,8 @@ $(LIBFBCLIENT_SONAME): $(LIBFBCLIENT_SOBASENAME)
endif
$(LIBFBCLIENT_SO): $(FBCLIENT_Objects)
# $(LIB_LINK) -Wl,-soname,libfbclient.$(SHRLIB_EXT).1 -Wl,-rpath,/usr/lib -o $@ $^
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_IMPLIB) $(LIB_LINK_SONAME)$(ClientLibraryNameMajor) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ $(SO_LINK_LIBS)
$(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_IMPLIB) \
$(LIB_LINK_SONAME)$(ClientLibraryNameMajor) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ $(SO_LINK_LIBS)
AllObjects = $(FBCLIENT_Objects)

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.libfbembed,v 1.10 2003-03-27 11:21:45 aafemt Exp $
# $Id: Makefile.in.libfbembed,v 1.11 2004-03-25 23:12:31 skidder Exp $
#
ROOT=..
ObjModuleName=libfbembed
@ -49,7 +49,11 @@ unexport ISC_USER
unexport ISC_PASSWORD
AllObjects = $(LIBFBEMBED_Objects)
SERVER_Files = $(OS_ServerFiles) server.cpp
SERVER_Sources = $(addprefix remote/, $(SERVER_Files))
SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Sources))))
AllObjects = $(LIBFBEMBED_Objects) $(SERVER_Objects)
Dependencies = $(AllObjects:.o=.d)
@ -57,9 +61,9 @@ Dependencies = $(AllObjects:.o=.d)
libfbembed : $(LIBFBEMBED_SONAME)
$(LIBFBEMBED_SO): $(LIBFBEMBED_Objects)
# $(LIB_LINK) -Wl,-soname,libfbembed.$(SHRLIB_EXT).1 -Wl,-rpath,/usr/lib -o $@ $^
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)$(SharedLibrarySoName) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ $(SO_LINK_LIBS)
$(LIBFBEMBED_SO): $(LIBFBEMBED_Objects) $(SERVER_Objects)
$(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)$(SharedLibrarySoName) \
$(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ $(SO_LINK_LIBS)
$(LIBFBEMBED_SOBASENAME): $(LIBFBEMBED_SO)
(cd $(LIB) && $(LN) -f $(SharedLibraryName) $(SharedLibrarySoName) )

View File

@ -1,84 +0,0 @@
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: Makefile.in.libfbserver,v 1.6 2003-03-28 11:29:18 aafemt Exp $
#
ROOT=..
ObjModuleName=libfbserver
CFLAGS:= -DSUPERSERVER
ArchType=super
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
include $(ROOT)/gen/make.rules
include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
# These are deliberatly unexported otherwise gbak and others will try and check
# the userid against the security.fdb database, which doesn't exist at this stage
# in the build. MOD 11-July-2002
unexport ISC_USER
unexport ISC_PASSWORD
# jrd has it's own rule for using gpre to use gpre boot.
# I would eventually like to set these based on a determination
# if the file GPRE_STATIC exists or not.
#GPRE_FLAGS = -n -z -gds_cxx -raw -ids
#.e.c:
# $(GPRE_BOOT) $(GPRE_FLAGS) $< $@
#
#.epp.cpp:
# $(GPRE_BOOT) $(GPRE_FLAGS) $< $@
.PHONY: libfbserver
libfbserver : $(LIBFBSERVER_A)
$(LIBFBSERVER_A): $(LIBFBSERVER_Objects)
-$(RM) $@
$(AR) $@ $^
-$(RANLIB) $@
$(CHMOD_6) $@
AllObjects = $(LIBFBSERVER_Objects)
Dependencies = $(AllObjects:.o=.d)
include $(ROOT)/gen/make.shared.targets
-include $(Dependencies)

354
builds/posix/firebird.vers Normal file
View File

@ -0,0 +1,354 @@
#
# Version script to hide private symbols from Firebird libraries
# GNU and Solaris linkers should understand it
#
#
# The contents of this file are subject to the Interbase Public
# License Version 1.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy
# of the License at http://www.Inprise.com/IPL.html
#
# Software distributed under the License is distributed on an
# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
# or implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code was created by Inprise Corporation
# and its predecessors. Portions created by Inprise Corporation are
# Copyright (C) Inprise Corporation.
#
# Created from fbclient.def by Nickolay Samofatov
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
{
global:
# private entrypoint for REMOTE server
server_main;
#-------------------
# PRIVATE INTERFACE
#-------------------
gds__alloc;
gds__attach_database;
gds__blob_info;
gds__blob_size;
gds__cancel_blob;
gds__cancel_events;
gds__close;
gds__close_blob;
gds__commit_retaining;
gds__commit_transaction;
gds__compile_request;
gds__compile_request2;
gds__create_blob;
gds__create_blob2;
gds__create_database;
gds__database_cleanup;
gds__database_info;
gds__ddl;
gds__declare;
gds__decode;
gds__decode_date;
gds__describe;
gds__describe_bind;
gds__detach_database;
gds__disable_subsystem;
gds__dsql_finish;
gds__edit;
gds__enable_subsystem;
gds__encode;
gds__encode_date;
gds__event_block;
gds__event_counts;
gds__event_wait;
gds__execute;
gds__execute_immediate;
gds__fetch;
gds__free;
gds__ftof;
gds__get_prefix;
gds__get_segment;
gds__get_slice;
gds__interprete;
gds_interprete_cpp;
gds__log;
gds__log_status;
gds__map_blobs;
gds__msg_close;
gds__msg_format;
gds__msg_lookup;
gds__msg_open;
gds__msg_put;
gds__open;
gds__open_blob;
gds__open_blob2;
gds__parse_bpb;
gds__prefix;
gds__prefix_lock;
gds__prefix_msg;
gds__prepare;
gds__prepare_transaction;
gds__prepare_transaction2;
gds__print_blr;
gds__print_status;
gds__put_error;
gds__put_segment;
gds__put_slice;
gds__qtoq;
gds__que_events;
gds__receive;
gds__reconnect_transaction;
gds__register_cleanup;
gds__release_request;
gds__request_info;
gds__rollback_transaction;
gds__seek_blob;
gds__send;
gds__set_debug;
gds__sqlcode;
gds__start_and_send;
gds__start_multiple;
gds__start_request;
gds__start_transaction;
gds__temp_dir;
gds__temp_file;
gds__thread_enable;
gds__thread_enter;
gds__thread_exit;
gds__thread_start;
gds__to_sqlda;
gds__transaction_cleanup;
gds__transaction_info;
gds__unregister_cleanup;
gds__unwind_request;
gds__validate_lib_path;
gds__vax_integer;
gds__version;
gds__vtof;
gds__vtov;
gds__default_printer;
gds__alloc_debug;
gds_alloc_flag_unfreed;
gds_alloc_report;
perf_format;
perf_get_info;
perf_report;
#----------------------------
# PUBLIC INTERFACE, i.e. API
#----------------------------
# Array functions
isc_array_gen_sdl;
isc_array_get_slice;
isc_array_lookup_bounds;
isc_array_lookup_desc;
isc_array_put_slice;
isc_array_set_desc;
isc_get_slice;
isc_put_slice;
# BLOB functions
isc_blob_default_desc;
isc_blob_gen_bpb;
isc_blob_info;
isc_blob_lookup_desc;
isc_blob_set_desc;
isc_cancel_blob;
isc_close_blob;
isc_create_blob;
isc_create_blob2;
isc_get_segment;
isc_open_blob;
isc_open_blob2;
isc_put_segment;
# Database functions
isc_attach_database;
isc_create_database;
isc_database_info;
isc_detach_database;
isc_drop_database;
isc_expand_dpb;
isc_modify_dpb;
isc_version;
isc_get_client_major_version;
isc_get_client_minor_version;
isc_get_client_version;
# Conversion functions
isc_decode_date;
isc_decode_sql_date;
isc_decode_sql_time;
isc_decode_timestamp;
isc_encode_date;
isc_encode_sql_date;
isc_encode_sql_time;
isc_encode_timestamp;
isc_portable_integer;
isc_vax_integer;
# DSQL functions
isc_dsql_allocate_statement;
isc_dsql_alloc_statement2;
isc_dsql_describe;
isc_dsql_describe_bind;
isc_dsql_execute;
isc_dsql_execute2;
isc_dsql_execute_m;
isc_dsql_execute2_m;
isc_dsql_execute_immediate;
isc_dsql_exec_immed2;
isc_dsql_execute_immediate_m;
isc_dsql_exec_immed2_m;
isc_dsql_exec_immed3_m;
isc_dsql_fetch;
isc_dsql_fetch_a;
isc_dsql_fetch_m;
isc_dsql_finish;
isc_dsql_free_statement;
isc_dsql_insert;
isc_dsql_insert_m;
isc_dsql_prepare;
isc_dsql_prepare_m;
isc_dsql_release;
isc_dsql_set_cursor_name;
isc_dsql_sql_info;
# ESQL functions
isc_embed_dsql_close;
isc_embed_dsql_declare;
isc_embed_dsql_describe;
isc_embed_dsql_describe_bind;
isc_embed_dsql_execute;
isc_embed_dsql_execute2;
isc_embed_dsql_execute_immed;
isc_embed_dsql_exec_immed2;
isc_embed_dsql_fetch;
isc_embed_dsql_fetch_a;
isc_embed_dsql_insert;
isc_embed_dsql_open;
isc_embed_dsql_open2;
isc_embed_dsql_prepare;
isc_embed_dsql_release;
# Error-handling functions
isc_interprete;
isc_interprete_cpp;
isc_print_sqlerror;
isc_print_status;
isc_sqlcode;
isc_sql_interprete;
# Event functions
isc_cancel_events;
isc_event_block;
isc_event_counts;
isc_que_events;
isc_wait_for_event;
# Security functions
isc_add_user;
isc_delete_user;
isc_modify_user;
# Services functions
isc_service_attach;
isc_service_detach;
isc_service_query;
isc_service_start;
# Transaction control functions
isc_commit_retaining;
isc_commit_transaction;
isc_prepare_transaction;
isc_prepare_transaction2;
isc_rollback_retaining;
isc_rollback_transaction;
isc_start_multiple;
isc_start_transaction;
isc_transaction_info;
# Other functions
isc_compile_request;
isc_compile_request2;
isc_ddl;
isc_prepare;
isc_receive;
isc_reconnect_transaction;
isc_release_request;
isc_request_info;
isc_seek_blob;
isc_send;
isc_start_and_send;
isc_start_request;
isc_transact_request;
isc_unwind_request;
# Other SQL functions
isc_close;
isc_declare;
isc_describe;
isc_describe_bind;
isc_execute;
isc_execute_immediate;
isc_fetch;
isc_fetch_a;
isc_open;
# Other BLOB functions
BLOB_close;
BLOB_display;
BLOB_dump;
BLOB_edit;
BLOB_get;
BLOB_load;
BLOB_open;
BLOB_put;
BLOB_text_dump;
BLOB_text_load;
Bopen;
# Other misc functions
isc_ftof;
isc_free;
isc_print_blr;
isc_qtoq;
isc_reset_fpe;
isc_set_debug;
isc_to_sqlda;
isc_vtof;
isc_vtov;
#-----------------
# OTHER FUNCTIONS
#-----------------
CVT_move;
KEYWORD_stringIsAToken;
KEYWORD_getTokens;
local:
*;
};

View File

@ -26,7 +26,7 @@
# Contributor(s):
#
#
# $Id: make.defaults,v 1.33 2004-01-07 00:31:18 brodsom Exp $
# $Id: make.defaults,v 1.34 2004-03-25 23:12:31 skidder Exp $
#
@ -72,7 +72,6 @@ GEN_SRC=$(OBJ)
# This one is not so widely used at the momement.
# but I would like it to become so.
#RealFirebirdPath = $(shell cd $(FIREBIRD); pwd)
RealFirebirdPath = @NEW_FIREBIRD_DIR@
@ -154,8 +153,6 @@ LIBFBEMBED_SO = $(LIB)/$(SharedLibraryName)
LIBFBEMBED_SOBASENAME = $(LIB)/$(SharedLibrarySoName)
LIBFBEMBED_SONAME = $(LIB)/$(SharedLibraryBaseName)
LIBGDS_A = $(LIB)/libgds.a
# Shared library names for client side of fbserver (or super) version
# used to link all the utilities to enable them to connect over the wire
# to the fbserver. MOD 28-July-2002
@ -173,43 +170,28 @@ LIBFBCLIENT_SONAME=$(LIB)/$(ClientLibraryName)
# MOD 28-July-2002
LIBFBINTL_SO = $(FIREBIRD)/intl/libfbintl.$(SHRLIB_EXT)
#LIBFBINTL_SOBASENAME=$(FIREBIRD)/intl/libfbintl.$(SHRLIB_EXT).1
#LIBFBINTL_SONAME=$(FIREBIRD)/intl/libfbintl.$(SHRLIB_EXT)
LIBFBCOMMON_A = $(LIB)/libfbcommon.a
LIBFBSTATIC_A = $(LIB)/libfbstatic.a
LIBFBSERVER_A = $(LIB)/libfbserver.a
LIBEDITLINE_A = $(LIB)/libeditline.a
# Shared library name for usage inside of the UDF
IbUtilLibraryName = libib_util.$(SHRLIB_EXT)
LIBIBUTIL_SO = $(LIB)/$(IbUtilLibraryName)
ifdef UseSharedLibraries
LIBGDS_LA = $(LIBGDS_SO)
LIBGDS_DEP =
# LIBGDS_LINK = $(LIBGDS_SO)
LIBGDS_LINK =
# LINK_LIBS := -L$(LIB) -lgdssuper $(LINK_LIBS)
# LINK_LIBS := -L$(LIB) -lgds $(LINK_LIBS)
# LINKER OPTIONS
#
# LIBGDS_LINK_OPTIONS = -soname libgds.$(SHRLIB_EXT) -rpath /usr/lib
LIBGDS_LINK_OPTIONS = $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)$(SharedLibrarySoName) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib
LINK_OPTS:= $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/intl
# LIBGDS_LINK_OPTIONS = -Wl,-soname,$(SharedLibrarySoName) -Wl,-rpath,/usr/lib
else
LIBGDS_LA = $(LIBGDS_A)
LIBGDS_DEP = $(LIBGDS_LA)
LIBGDS_LINK =
LIBGDS_LINK_OPTIONS =
endif
LINK_OPTS = $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/intl
LIB_LINK_OPTIONS = -shared
LIB_LINK_RPATH = -Wl,-rpath,
LIB_LINK_SONAME = -Wl,-soname,
LINK_FIREBIRD_SYMBOLS = -Wl,--version-script,$(ROOT)/builds/posix/firebird.vers
LINK_FBINTL_SYMBOLS = -Wl,--version-script,$(ROOT)/builds/posix/fbintl.vers
FB_SUPER_SERVER = $(BIN)/fbserver$(EXEC_EXT)
FB_CLASSIC_SERVER = $(BIN)/fb_inet_server$(EXEC_EXT)
# From lock
GDS_LOCK_MGR = $(BIN)/fb_lock_mgr
# From utilities
CREATE_DB = $(BIN)/create_db$(EXEC_EXT)
GDS_DROP = $(BIN)/gds_drop$(EXEC_EXT)

View File

@ -26,23 +26,11 @@
# Contributor(s):
#
#
# $Id: make.rules,v 1.21 2004-03-22 15:16:11 alexpeshkoff Exp $
# $Id: make.rules,v 1.22 2004-03-25 23:12:31 skidder Exp $
#
#____________________________________________________________________________
# Currently I set these manually but they should be set automatically
# from the ./configure installation time
UseSharedLibraries = Yes # If empty then we build static linked exe's
# which are useful for debugging.
# This variable is used to determined flags for
# libtool/ar/ld we define the gds.a/so library name
# in LIBGDS_LA and in Makefile.in.jrd where we do the
# creation of the libgds.a/so library.
#UseLibToolForLink = Yes # Currently we do not use it - but may in the future
IsProdTypeBuild = @PROD_BUILD_FLG@
# If this is defined then we are building a production
# release with debug and optimization
@ -62,15 +50,13 @@ endif
CXXFLAGS:= $(CXXFLAGS) $(CFLAGS)
#CC = libtool @CC@
#CXX = libtool @CXX@
CC = @CC@
CXX = @CXX@
LD = @CXX@
#
# LIBTOOL ISSUES
#
# Most of the libraries and programs are linked using the dynamic linker
# We default to using the dynamic linker and have a special link macros for
# using the static linker.
@ -85,66 +71,20 @@ LD = @CXX@
# nice it conflicts with a struct in the file qli/format.h
# MOD 26-July-2001.
ifdef UseLibToolForLink
LIB_LINK= libtool @CC@
STATICLIB_LINK = libtool @CC@ -all-static
# LIB_LINK_OPTIONS = -version-info 0:0:0 -release 1.5.0.0 -rpath /usr/lib
LIB_LINK_OPTIONS += -version-info 0:0:0 -release 1.5.0.0 $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib
EXE_LINK = libtool @CC@
STATICEXE_LINK = libtool @CC@ -all-static
else
# LINKER COMMANDS
# they are candidates to go to make.defaults and make this file make.defaults.in
# if we decide to support different linkers directly in our build process.
# Alternatively we may use libtool here.
LIB_LINK= @CC@
STATICLIB_LINK= ar cruvs
# LIB_LINK_OPTIONS = -soname libgds.$(SHRLIB_EXT) -rpath /usr/lib
# LIB_LINK_OPTIONS = -soname libgds.$(SHRLIB_EXT).2 -rpath /usr/lib
# LIB_LINK_OPTIONS := $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib
# EXE_LINK = g++
# STATICEXE_LINK = g++
EXE_LINK = @CXX@
STATICEXE_LINK = @CXX@
endif
LINK_OPTIONS=
# ReadlineLibs - choose one of the following depending upon your
# OS and distribution. SuSE is happy with just -lreadline
# This is something that we should pick up with autoconf.
# This should be all automatically set from autoconf stript now
# And should be removed if noone has trouble a few months after
# I added this comment - MOD 11-July-2002
#ReadlineLibs = -lreadline -ltermcap
#ReadlineLibs = -lreadline -lncurses
#ReadlineLibs:= -lreadline
#LINK_LIBS:= -lm -lstdc++ $(ReadlineLibs) @LIBS@ -lc -ldl -lcrypt
#STATICLINK_LIBS := -lm -lstdc++ $(ReadlineLibs) -lc -ldl -lcrypt
LINK_LIBS = @LIBS@ @EDITLINE_A@
STATICLINK_LIBS = @LIBS@ @EDITLINE_A@
SO_LINK_LIBS = @LIBS@
#LINK_LIBS= -L$(LIB) -lgds -lm -lc -ldl -lcrypt
# -lgcc
# These should no longer be required but I've left here
# in case someone needs to know what they were
#STATICLIBTOOL= libtool gcc -static
#STATIC_LINK_OPTIONS= -static
#STATIC_LINK_LIBS= -lm -lc -mieee-fp -ldl -lcrypt
#SHLIB_LINK_OPTIONS = -shared
# Here we have definitions for using the preprocessor.
# The GPRE_FLAGS is overwritten in Makefile.in.jrd Makefile.in.gpre and
@ -193,14 +133,6 @@ $(SRC_ROOT)/dsql/%.cpp:: $(SRC_ROOT)/dsql/%.epp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $<
#.c.lo:
# $(CC) -c $(PIC_FLAGS) $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -o $*.lo $<
#
#.cpp.lo:
# $(CXX) -c $(PIC_FLAGS) $(CXXFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -o $*.lo $<
#
$(OBJ)/%.o:: $(SRC_ROOT)/%.c
$(CC) $(CXXFLAGS) -c $(firstword $<) -o $@
@$(move-dep)
@ -216,10 +148,6 @@ $(TMP_ROOT)/%.o: $(SRC_ROOT)/%.cpp
$(OBJ)/%.lo: $(SRC_ROOT)/%.cpp
@$(move-dep)
#$(OBJ)/%
#.epp.cpp:
# $(GPRE_STATIC) $(GPRE_FLAGS) $<
$(OBJ)/%.o: $(OBJ)/%.d
.SUFFIXES: .epp .e
@ -231,17 +159,14 @@ $(OBJ)/%.o: $(OBJ)/%.d
$(OBJ)/%.d:: $(SRC_ROOT)/%.c
@$(ECHO) "need to rebuild $^"
$(ECHO) $(OBJ)/$(*).o " : FORCE" > $@
# $(TOUCH) $^
$(OBJ)/%.d:: $(SRC_ROOT)/%.epp
@$(ECHO) "need to rebuild $^"
$(ECHO) $(OBJ)/$(*).o " : FORCE" > $@
# $(TOUCH) $^
$(OBJ)/%.d:: $(SRC_ROOT)/%.cpp
@$(ECHO) "need to rebuild $^"
$(ECHO) $(OBJ)/$(*).o " : FORCE" > $@
# $(TOUCH) $^
# Rules for making resource files

View File

@ -15,16 +15,13 @@
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Start of file prefix.darwin: $(VERSION) @PLATFORM@
#$Id: prefix.darwin,v 1.13 2004-03-23 11:07:02 aafemt Exp $
#$Id: prefix.darwin,v 1.14 2004-03-25 23:12:31 skidder Exp $
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
OS_ServerFiles=inet_server.cpp
PROD_FLAGS=-O3 -DNDEBUG -DDARWIN -pipe -MMD -p -fPIC
DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -p -fPIC -Wall
LIB_LINK_OPTIONS:=-shared
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print

View File

@ -9,9 +9,6 @@ endif
OS_ServerFiles=inet_server.cpp
LIB_LINK_OPTIONS:=
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print

View File

@ -15,16 +15,13 @@
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Start of file prefix.freebsd: $(VERSION) @PLATFORM@
#$Id: prefix.freebsd,v 1.13 2004-03-23 11:07:03 aafemt Exp $
#$Id: prefix.freebsd,v 1.14 2004-03-25 23:12:31 skidder Exp $
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
OS_ServerFiles=inet_server.cpp
PROD_FLAGS=-O -fno-builtin -DNDEBUG -DFREEBSD -pipe -MMD -fPIC
DEV_FLAGS=-ggdb -DFREEBSD -pipe -MMD -p -fPIC -Wall
LIB_LINK_OPTIONS:=-shared
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print

View File

@ -15,21 +15,16 @@
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Start of file prefix.linux: $(VERSION) $(PLATFORM)
#$Id: prefix.linux,v 1.25 2004-03-23 11:07:03 aafemt Exp $
#$Id: prefix.linux,v 1.26 2004-03-25 23:12:31 skidder Exp $
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
# -fno-builtin is used because GCC 3.0-3.2.2 had bug with builtins expansion
# you may remove it if engine is getting compiled with any other GCC version
PROD_FLAGS=-ggdb -O3 -march=i586 -mcpu=i686 -fno-omit-frame-pointer -fno-builtin -DNDEBUG -DLINUX -pipe -MMD -fPIC -fmessage-length=0
# uncomment if you need PROD_BUILD engine that is possible to debug
#PROD_FLAGS=-ggdb -O3 -march=i586 -mcpu=i686 -fno-builtin -DNDEBUG -DLINUX -pipe -MMD -fPIC -fmessage-length=0
DEV_FLAGS=-ggdb -DLINUX -pipe -MMD -p -fPIC -Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -fmessage-length=0
OS_ServerFiles=inet_server.cpp
LIB_LINK_OPTIONS:=-shared
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print

View File

@ -15,7 +15,7 @@
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Start of file prefix.linux: $(VERSION) $(PLATFORM)
#$Id: prefix.linux_amd64,v 1.3 2004-03-23 11:07:03 aafemt Exp $
#$Id: prefix.linux_amd64,v 1.4 2004-03-25 23:12:31 skidder Exp $
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0
@ -23,9 +23,6 @@ DEV_FLAGS=-ggdb -DLINUX -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-switch -Wno-paren
OS_ServerFiles=inet_server.cpp
LIB_LINK_OPTIONS:=-shared
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print

View File

@ -15,19 +15,14 @@
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Start of file prefix.linux: $(VERSION) $(PLATFORM)
#$Id: prefix.linux_sparc32,v 1.3 2004-03-23 11:08:31 aafemt Exp $
#$Id: prefix.linux_sparc32,v 1.4 2004-03-25 23:12:32 skidder Exp $
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
LD=@CXX@
PROD_FLAGS=-m32 -mcpu=ultrasparc -mtune=ultrasparc -O3 -DNDEBUG -DLINUX -pipe -MMD -fPIC -Dsparc
DEV_FLAGS=-ggdb -m32 -DLINUX -pipe -MMD -p -fPIC -Wall -Wno-switch -Dsparc
OS_ServerFiles=inet_server.cpp
LIB_LINK_OPTIONS:=-shared
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print

View File

@ -35,8 +35,6 @@ OS_SPECIFIC_Files=thd_priority.cpp
OS_ServerFiles= os/win32/srvr_w32 os/win32/window.cpp os/win32/chop.cpp os/win32/property.cpp os/win32/ibconfig.cpp os/win32/cntl.cpp
LIB_LINK_OPTIONS:=-shared -Wl,--add-stdcall-alias
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
# Generation of fbclient_ms.lib
LIB_LINK_IMPLIB:=-Wl,--out-implib,firebird/lib/fbclient_ms.lib
LIB_GUI:= -mwindows -lcomctl32 -lgdi32

View File

@ -17,7 +17,7 @@
#
# Erik Kunze, Philosys GmbH, <kunze@philosys.de>
#
# $Id: prefix.sinixz,v 1.21 2004-03-23 11:08:31 aafemt Exp $
# $Id: prefix.sinixz,v 1.22 2004-03-25 23:12:32 skidder Exp $
#
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
@ -36,9 +36,6 @@ DEV_FLAGS=$(DEV_WARNINGS) -ggdb $(COMMON_FLAGS) -pipe -fPIC
OS_ServerFiles=inet_server.cpp
LIB_LINK_OPTIONS:=-shared
LIB_LINK_RPATH:=-Wl,-rpath,
LIB_LINK_SONAME:=-Wl,-soname,
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print

View File

@ -121,6 +121,11 @@ EXPORTS
gds__vtov @86
gds__default_printer @87
gds__alloc_debug
gds_alloc_flag_unfreed
gds_alloc_report
perf_format @100
perf_get_info @101
perf_report @102

View File

@ -1,345 +0,0 @@
; The contents of this file are subject to the Interbase Public
; License Version 1.0 (the "License"); you may not use this file
; except in compliance with the License. You may obtain a copy
; of the License at http://www.Inprise.com/IPL.html
;
; Software distributed under the License is distributed on an
; "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
; or implied. See the License for the specific language governing
; rights and limitations under the License.
;
; The Original Code was created by Inprise Corporation
; and its predecessors. Portions created by Inprise Corporation are
; Copyright (C) Inprise Corporation.
;
; All Rights Reserved.
; Contributor(s): ______________________________________.
EXPORTS
;-------------------
; PRIVATE INTERFACE
;-------------------
gds__alloc @1
gds__attach_database @2
gds__blob_info @3
gds__blob_size @4
gds__cancel_blob @5
gds__cancel_events @6
gds__close @7
gds__close_blob @8
gds__commit_retaining @9
gds__commit_transaction @10
gds__compile_request @11
gds__compile_request2 @12
gds__create_blob @13
gds__create_blob2 @14
gds__create_database @15
gds__database_cleanup @16
gds__database_info @17
gds__ddl @18
gds__declare @19
gds__decode @20
gds__decode_date @21
gds__describe @22
gds__describe_bind @23
gds__detach_database @24
gds__disable_subsystem @25
gds__dsql_finish @26
gds__edit @27
gds__enable_subsystem @28
gds__encode @29
gds__encode_date @30
gds__event_block @31
gds__event_counts @32
gds__event_wait @33
gds__execute @34
gds__execute_immediate @35
gds__fetch @36
gds__free @37
gds__ftof @38
gds__get_prefix @248
gds__get_segment @39
gds__get_slice @40
gds__interprete @41
gds_interprete_cpp
gds__log @42
gds__log_status @142
gds__map_blobs @240
gds__msg_close @223
gds__msg_format @43
gds__msg_lookup @44
gds__msg_open @45
gds__msg_put @46
gds__open @47
gds__open_blob @48
gds__open_blob2 @49
gds__parse_bpb @50
gds__prefix @51
gds__prefix_lock @249
gds__prefix_msg @250
gds__prepare @52
gds__prepare_transaction @53
gds__prepare_transaction2 @54
gds__print_blr @55
gds__print_status @56
gds__put_error @57
gds__put_segment @58
gds__put_slice @59
gds__qtoq @60
gds__que_events @61
gds__receive @62
gds__reconnect_transaction @63
gds__register_cleanup @64
gds__release_request @65
gds__request_info @66
gds__rollback_transaction @67
gds__seek_blob @68
gds__send @69
gds__set_debug @70
gds__sqlcode @71
gds__start_and_send @72
gds__start_multiple @73
gds__start_request @74
gds__start_transaction @75
gds__temp_dir
gds__temp_file @231
gds__thread_enable @76
gds__thread_enter @77
gds__thread_exit @78
gds__thread_start @79
gds__to_sqlda @80
gds__transaction_cleanup @235
gds__transaction_info @81
gds__unregister_cleanup @224
gds__unwind_request @82
gds__validate_lib_path @255
gds__vax_integer @83
gds__version @84
gds__vtof @85
gds__vtov @86
gds__default_printer @87
gds__alloc_debug
gds_alloc_flag_unfreed
gds_alloc_report
perf_format @100
perf_get_info @101
perf_report @102
;----------------------------
; PUBLIC INTERFACE, i.e. API
;----------------------------
; Array functions
isc_array_gen_sdl @217
isc_array_get_slice @218
isc_array_lookup_bounds @219
isc_array_lookup_desc @220
isc_array_put_slice @221
isc_array_set_desc @222
isc_get_slice @140
isc_put_slice @153
; BLOB functions
isc_blob_default_desc @239
isc_blob_gen_bpb @236
isc_blob_info @108
isc_blob_lookup_desc @237
isc_blob_set_desc @238
isc_cancel_blob @110
isc_close_blob @113
isc_create_blob @118
isc_create_blob2 @119
isc_get_segment @139
isc_open_blob @144
isc_open_blob2 @145
isc_put_segment @152
; Database functions
isc_attach_database @103
isc_create_database @120
isc_database_info @122
isc_detach_database @128
isc_drop_database @229
isc_expand_dpb @135
isc_modify_dpb @244
isc_version @174
isc_get_client_major_version @268
isc_get_client_minor_version @269
isc_get_client_version @270
; Conversion functions
isc_decode_date @125
isc_decode_sql_date @261
isc_decode_sql_time @262
isc_decode_timestamp @263
isc_encode_date @129
isc_encode_sql_date @264
isc_encode_sql_time @265
isc_encode_timestamp @266
isc_portable_integer @259
isc_vax_integer @173
; DSQL functions
isc_dsql_allocate_statement @178
isc_dsql_alloc_statement2 @179
isc_dsql_describe @180
isc_dsql_describe_bind @181
isc_dsql_execute @182
isc_dsql_execute2 @183
isc_dsql_execute_m @184
isc_dsql_execute2_m @185
isc_dsql_execute_immediate @186
isc_dsql_exec_immed2 @187
isc_dsql_execute_immediate_m @188
isc_dsql_exec_immed2_m @189
isc_dsql_exec_immed3_m @230
isc_dsql_fetch @190
isc_dsql_fetch_a @191
isc_dsql_fetch_m @192
isc_dsql_finish @193
isc_dsql_free_statement @194
isc_dsql_insert @195
isc_dsql_insert_m @196
isc_dsql_prepare @197
isc_dsql_prepare_m @198
isc_dsql_release @199
isc_dsql_set_cursor_name @200
isc_dsql_sql_info @201
; ESQL functions
isc_embed_dsql_close @202
isc_embed_dsql_declare @203
isc_embed_dsql_describe @204
isc_embed_dsql_describe_bind @205
isc_embed_dsql_execute @206
isc_embed_dsql_execute2 @207
isc_embed_dsql_execute_immed @208
isc_embed_dsql_exec_immed2 @209
isc_embed_dsql_fetch @210
isc_embed_dsql_fetch_a @211
isc_embed_dsql_insert @212
isc_embed_dsql_open @213
isc_embed_dsql_open2 @214
isc_embed_dsql_prepare @215
isc_embed_dsql_release @216
; Error-handling functions
isc_interprete @141
isc_interprete_cpp
isc_print_sqlerror @150
isc_print_status @151
isc_sqlcode @165
isc_sql_interprete @164
; Event functions
isc_cancel_events @111
isc_event_block @130
isc_event_counts @131
isc_que_events @155
isc_wait_for_event @177
; Security functions
isc_add_user @256
isc_delete_user @257
isc_modify_user @258
; Services functions
isc_service_attach @225
isc_service_detach @226
isc_service_query @227
isc_service_start @228
; Transaction control functions
isc_commit_retaining @114
isc_commit_transaction @115
isc_prepare_transaction @147
isc_prepare_transaction2 @148
isc_rollback_retaining @260
isc_rollback_transaction @160
isc_start_multiple @167
isc_start_transaction @169
isc_transaction_info @171
; Other functions
isc_compile_request @116
isc_compile_request2 @117
isc_ddl @123
isc_prepare @146
isc_receive @156
isc_reconnect_transaction @157
isc_release_request @158
isc_request_info @159
isc_seek_blob @161
isc_send @162
isc_start_and_send @166
isc_start_request @168
isc_transact_request @132
isc_unwind_request @172
; Other SQL functions
isc_close @112
isc_declare @124
isc_describe @126
isc_describe_bind @127
isc_execute @133
isc_execute_immediate @134
isc_fetch @136
isc_fetch_a @137
isc_open @143
; Other BLOB functions
BLOB_close @91
BLOB_display @92
BLOB_dump @93
BLOB_edit @94
BLOB_get @95
BLOB_load @96
BLOB_open @97
BLOB_put @98
BLOB_text_dump @242
BLOB_text_load @243
Bopen @99
; Other misc functions
isc_ftof @138
isc_free @241
isc_print_blr @149
isc_qtoq @154
isc_reset_fpe
isc_set_debug @163
isc_to_sqlda @170
isc_vtof @175
isc_vtov @176
_isc_start_transaction=isc_start_transaction
_isc_expand_dpb=isc_expand_dpb
_isc_event_block=isc_event_block
;-----------------
; OTHER FUNCTIONS
;-----------------
CVT_move @267
KEYWORD_stringIsAToken
KEYWORD_getTokens

View File

@ -269,5 +269,8 @@ EXPORTS
_isc_start_transaction=fbclient._isc_start_transaction
_isc_expand_dpb=fbclient._isc_expand_dpb
_isc_event_block=fbclient._isc_event_block
gds__alloc_debug=fbclient.gds__alloc_debug
gds_alloc_flag_unfreed=fbclient.gds_alloc_flag_unfreed
gds_alloc_report=fbclient.gds_alloc_report
KEYWORD_stringIsAToken=fbclient.KEYWORD_stringIsAToken
KEYWORD_getTokens=fbclient.KEYWORD_getTokens

View File

@ -1,276 +0,0 @@
; The contents of this file are subject to the Interbase Public
; License Version 1.0 (the "License"); you may not use this file
; except in compliance with the License. You may obtain a copy
; of the License at http://www.Inprise.com/IPL.html
;
; Software distributed under the License is distributed on an
; "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
; or implied. See the License for the specific language governing
; rights and limitations under the License.
;
; The Original Code was created by Inprise Corporation
; and its predecessors. Portions created by Inprise Corporation are
; Copyright (C) Inprise Corporation.
;
; All Rights Reserved.
; Contributor(s): ______________________________________.
EXPORTS
gds__alloc=fbclient.gds__alloc @1
gds__attach_database=fbclient.gds__attach_database @2
gds__blob_info=fbclient.gds__blob_info @3
gds__blob_size=fbclient.gds__blob_size @4
gds__cancel_blob=fbclient.gds__cancel_blob @5
gds__cancel_events=fbclient.gds__cancel_events @6
gds__close=fbclient.gds__close @7
gds__close_blob=fbclient.gds__close_blob @8
gds__commit_retaining=fbclient.gds__commit_retaining @9
gds__commit_transaction=fbclient.gds__commit_transaction @10
gds__compile_request=fbclient.gds__compile_request @11
gds__compile_request2=fbclient.gds__compile_request2 @12
gds__create_blob=fbclient.gds__create_blob @13
gds__create_blob2=fbclient.gds__create_blob2 @14
gds__create_database=fbclient.gds__create_database @15
gds__database_cleanup=fbclient.gds__database_cleanup @16
gds__database_info=fbclient.gds__database_info @17
gds__ddl=fbclient.gds__ddl @18
gds__declare=fbclient.gds__declare @19
gds__decode=fbclient.gds__decode @20
gds__decode_date=fbclient.gds__decode_date @21
gds__describe=fbclient.gds__describe @22
gds__describe_bind=fbclient.gds__describe_bind @23
gds__detach_database=fbclient.gds__detach_database @24
gds__disable_subsystem=fbclient.gds__disable_subsystem @25
gds__dsql_finish=fbclient.gds__dsql_finish @26
gds__edit=fbclient.gds__edit @27
gds__enable_subsystem=fbclient.gds__enable_subsystem @28
gds__encode=fbclient.gds__encode @29
gds__encode_date=fbclient.gds__encode_date @30
gds__event_block=fbclient.gds__event_block @31
gds__event_counts=fbclient.gds__event_counts @32
gds__event_wait=fbclient.gds__event_wait @33
gds__execute=fbclient.gds__execute @34
gds__execute_immediate=fbclient.gds__execute_immediate @35
gds__fetch=fbclient.gds__fetch @36
gds__free=fbclient.gds__free @37
gds__ftof=fbclient.gds__ftof @38
gds__get_segment=fbclient.gds__get_segment @39
gds__get_slice=fbclient.gds__get_slice @40
gds__interprete=fbclient.gds__interprete @41
gds_interprete_cpp=fbclient.gds_interprete_cpp
gds__log=fbclient.gds__log @42
gds__msg_format=fbclient.gds__msg_format @43
gds__msg_lookup=fbclient.gds__msg_lookup @44
gds__msg_open=fbclient.gds__msg_open @45
gds__msg_put=fbclient.gds__msg_put @46
gds__open=fbclient.gds__open @47
gds__open_blob=fbclient.gds__open_blob @48
gds__open_blob2=fbclient.gds__open_blob2 @49
gds__parse_bpb=fbclient.gds__parse_bpb @50
gds__prefix=fbclient.gds__prefix @51
gds__prepare=fbclient.gds__prepare @52
gds__prepare_transaction=fbclient.gds__prepare_transaction @53
gds__prepare_transaction2=fbclient.gds__prepare_transaction2 @54
gds__print_blr=fbclient.gds__print_blr @55
gds__print_status=fbclient.gds__print_status @56
gds__put_error=fbclient.gds__put_error @57
gds__put_segment=fbclient.gds__put_segment @58
gds__put_slice=fbclient.gds__put_slice @59
gds__qtoq=fbclient.gds__qtoq @60
gds__que_events=fbclient.gds__que_events @61
gds__receive=fbclient.gds__receive @62
gds__reconnect_transaction=fbclient.gds__reconnect_transaction @63
gds__register_cleanup=fbclient.gds__register_cleanup @64
gds__release_request=fbclient.gds__release_request @65
gds__request_info=fbclient.gds__request_info @66
gds__rollback_transaction=fbclient.gds__rollback_transaction @67
gds__seek_blob=fbclient.gds__seek_blob @68
gds__send=fbclient.gds__send @69
gds__set_debug=fbclient.gds__set_debug @70
gds__sqlcode=fbclient.gds__sqlcode @71
gds__start_and_send=fbclient.gds__start_and_send @72
gds__start_multiple=fbclient.gds__start_multiple @73
gds__start_request=fbclient.gds__start_request @74
gds__start_transaction=fbclient.gds__start_transaction @75
gds__thread_enable=fbclient.gds__thread_enable @76
gds__thread_enter=fbclient.gds__thread_enter @77
gds__thread_exit=fbclient.gds__thread_exit @78
gds__thread_start=fbclient.gds__thread_start @79
gds__to_sqlda=fbclient.gds__to_sqlda @80
gds__transaction_info=fbclient.gds__transaction_info @81
gds__unwind_request=fbclient.gds__unwind_request @82
gds__vax_integer=fbclient.gds__vax_integer @83
gds__version=fbclient.gds__version @84
gds__vtof=fbclient.gds__vtof @85
gds__vtov=fbclient.gds__vtov @86
gds__default_printer=fbclient.gds__default_printer @87
BLOB_close=fbclient.BLOB_close @91
BLOB_display=fbclient.BLOB_display @92
BLOB_dump=fbclient.BLOB_dump @93
BLOB_edit=fbclient.BLOB_edit @94
BLOB_get=fbclient.BLOB_get @95
BLOB_load=fbclient.BLOB_load @96
BLOB_open=fbclient.BLOB_open @97
BLOB_put=fbclient.BLOB_put @98
Bopen=fbclient.Bopen @99
perf_format=fbclient.perf_format @100
perf_get_info=fbclient.perf_get_info @101
perf_report=fbclient.perf_report @102
isc_attach_database=fbclient.isc_attach_database @103
isc_blob_info=fbclient.isc_blob_info @108
isc_cancel_blob=fbclient.isc_cancel_blob @110
isc_cancel_events=fbclient.isc_cancel_events @111
isc_close=fbclient.isc_close @112
isc_close_blob=fbclient.isc_close_blob @113
isc_commit_retaining=fbclient.isc_commit_retaining @114
isc_commit_transaction=fbclient.isc_commit_transaction @115
isc_compile_request=fbclient.isc_compile_request @116
isc_compile_request2=fbclient.isc_compile_request2 @117
isc_create_blob=fbclient.isc_create_blob @118
isc_create_blob2=fbclient.isc_create_blob2 @119
isc_create_database=fbclient.isc_create_database @120
isc_database_info=fbclient.isc_database_info @122
isc_ddl=fbclient.isc_ddl @123
isc_declare=fbclient.isc_declare @124
isc_decode_date=fbclient.isc_decode_date @125
isc_describe=fbclient.isc_describe @126
isc_describe_bind=fbclient.isc_describe_bind @127
isc_detach_database=fbclient.isc_detach_database @128
isc_encode_date=fbclient.isc_encode_date @129
isc_event_block=fbclient.isc_event_block @130
isc_event_counts=fbclient.isc_event_counts @131
isc_transact_request=fbclient.isc_transact_request @132
isc_execute=fbclient.isc_execute @133
isc_execute_immediate=fbclient.isc_execute_immediate @134
isc_expand_dpb=fbclient.isc_expand_dpb @135
isc_fetch=fbclient.isc_fetch @136
isc_fetch_a=fbclient.isc_fetch_a @137
isc_ftof=fbclient.isc_ftof @138
isc_get_segment=fbclient.isc_get_segment @139
isc_get_slice=fbclient.isc_get_slice @140
isc_interprete=fbclient.isc_interprete @141
isc_interprete_cpp=fbclient.isc_interprete_cpp
gds__log_status=fbclient.gds__log_status @142
isc_open=fbclient.isc_open @143
isc_open_blob=fbclient.isc_open_blob @144
isc_open_blob2=fbclient.isc_open_blob2 @145
isc_prepare=fbclient.isc_prepare @146
isc_prepare_transaction=fbclient.isc_prepare_transaction @147
isc_prepare_transaction2=fbclient.isc_prepare_transaction2 @148
isc_print_blr=fbclient.isc_print_blr @149
isc_print_sqlerror=fbclient.isc_print_sqlerror @150
isc_print_status=fbclient.isc_print_status @151
isc_put_segment=fbclient.isc_put_segment @152
isc_put_slice=fbclient.isc_put_slice @153
isc_qtoq=fbclient.isc_qtoq @154
isc_que_events=fbclient.isc_que_events @155
isc_receive=fbclient.isc_receive @156
isc_reconnect_transaction=fbclient.isc_reconnect_transaction @157
isc_release_request=fbclient.isc_release_request @158
isc_request_info=fbclient.isc_request_info @159
isc_rollback_transaction=fbclient.isc_rollback_transaction @160
isc_seek_blob=fbclient.isc_seek_blob @161
isc_send=fbclient.isc_send @162
isc_set_debug=fbclient.isc_set_debug @163
isc_sql_interprete=fbclient.isc_sql_interprete @164
isc_sqlcode=fbclient.isc_sqlcode @165
isc_start_and_send=fbclient.isc_start_and_send @166
isc_start_multiple=fbclient.isc_start_multiple @167
isc_start_request=fbclient.isc_start_request @168
isc_start_transaction=fbclient.isc_start_transaction @169
isc_to_sqlda=fbclient.isc_to_sqlda @170
isc_transaction_info=fbclient.isc_transaction_info @171
isc_unwind_request=fbclient.isc_unwind_request @172
isc_vax_integer=fbclient.isc_vax_integer @173
isc_version=fbclient.isc_version @174
isc_vtof=fbclient.isc_vtof @175
isc_vtov=fbclient.isc_vtov @176
isc_wait_for_event=fbclient.isc_wait_for_event @177
isc_dsql_allocate_statement=fbclient.isc_dsql_allocate_statement @178
isc_dsql_alloc_statement2=fbclient.isc_dsql_alloc_statement2 @179
isc_dsql_describe=fbclient.isc_dsql_describe @180
isc_dsql_describe_bind=fbclient.isc_dsql_describe_bind @181
isc_dsql_execute=fbclient.isc_dsql_execute @182
isc_dsql_execute2=fbclient.isc_dsql_execute2 @183
isc_dsql_execute_m=fbclient.isc_dsql_execute_m @184
isc_dsql_execute2_m=fbclient.isc_dsql_execute2_m @185
isc_dsql_execute_immediate=fbclient.isc_dsql_execute_immediate @186
isc_dsql_exec_immed2=fbclient.isc_dsql_exec_immed2 @187
isc_dsql_execute_immediate_m=fbclient.isc_dsql_execute_immediate_m @188
isc_dsql_exec_immed2_m=fbclient.isc_dsql_exec_immed2_m @189
isc_dsql_fetch=fbclient.isc_dsql_fetch @190
isc_dsql_fetch_a=fbclient.isc_dsql_fetch_a @191
isc_dsql_fetch_m=fbclient.isc_dsql_fetch_m @192
isc_dsql_finish=fbclient.isc_dsql_finish @193
isc_dsql_free_statement=fbclient.isc_dsql_free_statement @194
isc_dsql_insert=fbclient.isc_dsql_insert @195
isc_dsql_insert_m=fbclient.isc_dsql_insert_m @196
isc_dsql_prepare=fbclient.isc_dsql_prepare @197
isc_dsql_prepare_m=fbclient.isc_dsql_prepare_m @198
isc_dsql_release=fbclient.isc_dsql_release @199
isc_dsql_set_cursor_name=fbclient.isc_dsql_set_cursor_name @200
isc_dsql_sql_info=fbclient.isc_dsql_sql_info @201
isc_embed_dsql_close=fbclient.isc_embed_dsql_close @202
isc_embed_dsql_declare=fbclient.isc_embed_dsql_declare @203
isc_embed_dsql_describe=fbclient.isc_embed_dsql_describe @204
isc_embed_dsql_describe_bind=fbclient.isc_embed_dsql_describe_bind @205
isc_embed_dsql_execute=fbclient.isc_embed_dsql_execute @206
isc_embed_dsql_execute2=fbclient.isc_embed_dsql_execute2 @207
isc_embed_dsql_execute_immed=fbclient.isc_embed_dsql_execute_immed @208
isc_embed_dsql_exec_immed2=fbclient.isc_embed_dsql_exec_immed2 @209
isc_embed_dsql_fetch=fbclient.isc_embed_dsql_fetch @210
isc_embed_dsql_fetch_a=fbclient.isc_embed_dsql_fetch_a @211
isc_embed_dsql_insert=fbclient.isc_embed_dsql_insert @212
isc_embed_dsql_open=fbclient.isc_embed_dsql_open @213
isc_embed_dsql_open2=fbclient.isc_embed_dsql_open2 @214
isc_embed_dsql_prepare=fbclient.isc_embed_dsql_prepare @215
isc_embed_dsql_release=fbclient.isc_embed_dsql_release @216
isc_array_gen_sdl=fbclient.isc_array_gen_sdl @217
isc_array_get_slice=fbclient.isc_array_get_slice @218
isc_array_lookup_bounds=fbclient.isc_array_lookup_bounds @219
isc_array_lookup_desc=fbclient.isc_array_lookup_desc @220
isc_array_put_slice=fbclient.isc_array_put_slice @221
isc_array_set_desc=fbclient.isc_array_set_desc @222
gds__msg_close=fbclient.gds__msg_close @223
gds__unregister_cleanup=fbclient.gds__unregister_cleanup @224
isc_service_attach=fbclient.isc_service_attach @225
isc_service_detach=fbclient.isc_service_detach @226
isc_service_query=fbclient.isc_service_query @227
isc_service_start=fbclient.isc_service_start @228
isc_drop_database=fbclient.isc_drop_database @229
isc_dsql_exec_immed3_m=fbclient.isc_dsql_exec_immed3_m @230
gds__temp_file=fbclient.gds__temp_file @231
gds__transaction_cleanup=fbclient.gds__transaction_cleanup @235
isc_blob_gen_bpb=fbclient.isc_blob_gen_bpb @236
isc_blob_lookup_desc=fbclient.isc_blob_lookup_desc @237
isc_blob_set_desc=fbclient.isc_blob_set_desc @238
isc_blob_default_desc=fbclient.isc_blob_default_desc @239
gds__map_blobs=fbclient.gds__map_blobs @240
isc_free=fbclient.isc_free @241
BLOB_text_dump=fbclient.BLOB_text_dump @242
BLOB_text_load=fbclient.BLOB_text_load @243
isc_modify_dpb=fbclient.isc_modify_dpb @244
gds__get_prefix=fbclient.gds__get_prefix @248
gds__prefix_lock=fbclient.gds__prefix_lock @249
gds__prefix_msg=fbclient.gds__prefix_msg @250
gds__validate_lib_path=fbclient.gds__validate_lib_path @255
isc_add_user=fbclient.isc_add_user @256
isc_delete_user=fbclient.isc_delete_user @257
isc_modify_user=fbclient.isc_modify_user @258
isc_portable_integer=fbclient.isc_portable_integer @259
isc_rollback_retaining=fbclient.isc_rollback_retaining @260
isc_decode_sql_date=fbclient.isc_decode_sql_date @261
isc_decode_sql_time=fbclient.isc_decode_sql_time @262
isc_decode_timestamp=fbclient.isc_decode_timestamp @263
isc_encode_sql_date=fbclient.isc_encode_sql_date @264
isc_encode_sql_time=fbclient.isc_encode_sql_time @265
isc_encode_timestamp=fbclient.isc_encode_timestamp @266
CVT_move=fbclient.CVT_move @267
_isc_start_transaction=fbclient._isc_start_transaction
_isc_expand_dpb=fbclient._isc_expand_dpb
_isc_event_block=fbclient._isc_event_block
gds__alloc_debug=fbclient.gds__alloc_debug
gds_alloc_flag_unfreed=fbclient.gds_alloc_flag_unfreed
gds_alloc_report=fbclient.gds_alloc_report
KEYWORD_stringIsAToken=fbclient.KEYWORD_stringIsAToken
KEYWORD_getTokens=fbclient.KEYWORD_getTokens

View File

@ -395,7 +395,7 @@ SOURCE=..\defs\fbclient.def
# End Source File
# Begin Source File
SOURCE=..\defs\fbclient_debug.def
SOURCE=..\defs\fbclient.def
!IF "$(CFG)" == "fbclient - Win32 Debug"

View File

@ -351,7 +351,7 @@ SOURCE=..\defs\fbclient.def
# End Source File
# Begin Source File
SOURCE=..\defs\fbclient_debug.def
SOURCE=..\defs\fbclient.def
# End Source File
# End Target
# End Project

View File

@ -311,7 +311,7 @@ SOURCE=..\defs\fbclient.def
# End Source File
# Begin Source File
SOURCE=..\defs\fbclient_debug.def
SOURCE=..\defs\fbclient.def
!IF "$(CFG)" == "fbembed - Win32 Release"

View File

@ -120,7 +120,7 @@ SOURCE=..\defs\gds32.def
# End Source File
# Begin Source File
SOURCE=..\defs\gds32_debug.def
SOURCE=..\defs\gds32.def
!IF "$(CFG)" == "gds32 - Win32 Debug"

View File

@ -46,7 +46,7 @@
OutputFile="debug/firebird/bin/fbclient.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile="..\defs\fbclient_debug.def"
ModuleDefinitionFile="..\defs\fbclient.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="..\..\..\temp\debug\fbclient/fbclient.pdb"
ImportLibrary="..\..\..\temp\debug\fbclient/fbclient.lib"/>
@ -372,7 +372,7 @@
RelativePath="..\defs\fbclient.def">
</File>
<File
RelativePath="..\defs\fbclient_debug.def">
RelativePath="..\defs\fbclient.def">
</File>
</Files>
<Globals>

View File

@ -319,7 +319,7 @@
RelativePath="..\defs\fbclient.def">
</File>
<File
RelativePath="..\defs\fbclient_debug.def">
RelativePath="..\defs\fbclient.def">
</File>
</Files>
<Globals>

View File

@ -45,7 +45,7 @@
OutputFile="debug/firebird/bin/fbembed.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile="..\defs\fbclient_debug.def"
ModuleDefinitionFile="..\defs\fbclient.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="..\..\..\temp\debug\fbembed/fbembed.pdb"
ImportLibrary="..\..\..\temp\debug\fbembed/fbembed.lib"/>
@ -360,7 +360,7 @@
RelativePath="..\defs\fbclient.def">
</File>
<File
RelativePath="..\defs\fbclient_debug.def">
RelativePath="..\defs\fbclient.def">
</File>
</Files>
<Globals>

View File

@ -116,7 +116,7 @@
OutputFile="debug/firebird/bin/gds32.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile="..\defs\gds32_debug.def"
ModuleDefinitionFile="..\defs\gds32.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="..\..\..\temp\debug\gds32/gds32.pdb"
ImportLibrary="..\..\..\temp\debug\gds32/gds32.lib"/>
@ -182,7 +182,7 @@
RelativePath="..\defs\gds32.def">
</File>
<File
RelativePath="..\defs\gds32_debug.def">
RelativePath="..\defs\gds32.def">
</File>
</Files>
<Globals>

View File

@ -1,4 +1,4 @@
dnl $Id: configure.in,v 1.191 2004-01-29 06:31:49 skidder Exp $
dnl $Id: configure.in,v 1.192 2004-03-25 23:12:30 skidder Exp $
dnl ############################# INITIALISATION ###############################
@ -591,6 +591,25 @@ case "$PLATFORM" in
;;
esac
dnl Detect support for ISO syntax for thread-locals
AC_CACHE_CHECK([for __thread], firebird_cv_gcc___thread,
[cat > conftest.c <<\EOF
__thread int a = 42;
main() {
a = a + 1;
return 0;
}
EOF
if AC_TRY_COMMAND([gcc -fPIC -o conftest conftest.c >&AS_MESSAGE_LOG_FD && ./conftest]); then
firebird_cv_gcc___thread=yes
else
firebird_cv_gcc___thread=no
fi
rm -f conftest*])
if test "$firebird_cv_gcc___thread" = yes; then
AC_DEFINE(HAVE___THREAD, 1, [Define it if compiler supports ISO syntax for thread-local storage])
fi
dnl ##################### DO NOT ADD ANY TESTS BELOW ###########################
@ -654,25 +673,23 @@ mkdir -p gen/firebird/help
dnl #### TEMP ######### directories for .o and .d
dnl # by module name
mkdir -p temp/libfbserver/jrd
mkdir -p temp/libfbserver/dsql
mkdir -p temp/libfbserver/lock
mkdir -p temp/libfbserver/misc
mkdir -p temp/libfbserver/remote/os/win32
mkdir -p temp/libfbserver/pipe
mkdir -p temp/libfbserver/gpre
mkdir -p temp/libfbserver/alice
mkdir -p temp/libfbserver/burp
mkdir -p temp/libfbserver/utilities/common
mkdir -p temp/libfbserver/utilities/gstat
mkdir -p temp/libfbserver/utilities/gsec
mkdir -p temp/libfbserver/fbutil
mkdir -p temp/libfbserver/common/classes
mkdir -p temp/libfbserver/common/config
mkdir -p temp/libfbserver/jrd/os/posix
mkdir -p temp/libfbserver/jrd/os/win32
mkdir -p temp/fbserver/jrd
mkdir -p temp/fbserver/dsql
mkdir -p temp/fbserver/lock
mkdir -p temp/fbserver/misc
mkdir -p temp/fbserver/pipe
mkdir -p temp/fbserver/gpre
mkdir -p temp/fbserver/alice
mkdir -p temp/fbserver/burp
mkdir -p temp/fbserver/utilities/common
mkdir -p temp/fbserver/utilities/gstat
mkdir -p temp/fbserver/utilities/gsec
mkdir -p temp/fbserver/fbutil
mkdir -p temp/fbserver/common/classes
mkdir -p temp/fbserver/common/config
mkdir -p temp/fbserver/jrd/os/posix
mkdir -p temp/fbserver/jrd/os/win32
mkdir -p temp/fbserver/remote/os/win32
mkdir -p temp/fbserver/ipserver
mkdir -p temp/libfbclient/jrd
mkdir -p temp/libfbclient/dsql
mkdir -p temp/libfbclient/gpre
@ -684,15 +701,25 @@ mkdir -p temp/libfbclient/jrd/os/posix
mkdir -p temp/libfbclient/jrd/os/win32
mkdir -p temp/client.fbudf/fbudf
mkdir -p temp/client.gbak/burp
mkdir -p temp/client.gbak/remote
mkdir -p temp/client.gbak/jrd
mkdir -p temp/client.gfix/alice
mkdir -p temp/client.gfix/jrd
mkdir -p temp/client.gfix/common/classes
mkdir -p temp/client.gpre/gpre
mkdir -p temp/client.gpre/jrd
mkdir -p temp/client.gdef/dudley
mkdir -p temp/client.gdef/gpre
mkdir -p temp/client.gdef/jrd
mkdir -p temp/client.gdef/jrd/os/posix
mkdir -p temp/client.gdef/common/classes
mkdir -p temp/client.gdef/common/config
mkdir -p temp/client.qli/qli
mkdir -p temp/client.qli/jrd
mkdir -p temp/client.qli/gpre
mkdir -p temp/client.qli/common/classes
mkdir -p temp/client.isql/isql
mkdir -p temp/client.isql/common
mkdir -p temp/client.util/utilities/rebuild
mkdir -p temp/client.util/utilities/ibmgr
mkdir -p temp/client.util/utilities/guard
@ -703,6 +730,9 @@ mkdir -p temp/client.util/lock
mkdir -p temp/client.util/iscguard
mkdir -p temp/client.util/remote/os/win32
mkdir -p temp/client.util/jrd/os/win32
mkdir -p temp/client.util/jrd/os/posix
mkdir -p temp/client.util/common/classes
mkdir -p temp/client.util/common/config
mkdir -p temp/intl
mkdir -p temp/libfbcommon/common/classes
@ -730,13 +760,30 @@ mkdir -p temp/embed.lockmgr/lock
mkdir -p temp/embed.util/utilities/gstat
mkdir -p temp/embed.util/utilities/gsec
mkdir -p temp/embed.util/lock
mkdir -p temp/embed.util/jrd/os/posix
mkdir -p temp/embed.util/common/classes
mkdir -p temp/embed.util/common/config
mkdir -p temp/embed.gbak/burp
mkdir -p temp/embed.gbak/remote
mkdir -p temp/embed.gbak/jrd
mkdir -p temp/embed.gfix/alice
mkdir -p temp/embed.gfix/common/classes
mkdir -p temp/embed.gfix/jrd
mkdir -p temp/embed.isql/isql
mkdir -p temp/embed.isql/common
mkdir -p temp/embed.gdef/dudley
mkdir -p temp/embed.gdef/jrd
mkdir -p temp/embed.gdef/jrd/os/posix
mkdir -p temp/embed.gdef/gpre
mkdir -p temp/embed.gdef/common/classes
mkdir -p temp/embed.gdef/common/config
mkdir -p temp/embed.qli/qli
mkdir -p temp/embed.qli/jrd
mkdir -p temp/embed.qli/gpre
mkdir -p temp/embed.qli/common/classes
mkdir -p temp/embed.fbudf/fbudf
mkdir -p temp/embed.gpre/gpre
mkdir -p temp/embed.gpre/jrd
mkdir -p temp/inet_server/remote/os/win32
mkdir -p temp/inet_server/ipserver
mkdir -p temp/msgs/msgs
@ -833,7 +880,6 @@ gen/Makefile.static.gpre:${MAKE_SRC_DIR}/Makefile.in.static.gpre
gen/Makefile.static.gbak:${MAKE_SRC_DIR}/Makefile.in.static.gbak
gen/Makefile.static.isql:${MAKE_SRC_DIR}/Makefile.in.static.isql
gen/Makefile.refDatabases:${MAKE_SRC_DIR}/Makefile.in.refDatabases
gen/Makefile.libfbserver:${MAKE_SRC_DIR}/Makefile.in.libfbserver
gen/Makefile.fbserver:${MAKE_SRC_DIR}/Makefile.in.fbserver
gen/Makefile.libfbclient:${MAKE_SRC_DIR}/Makefile.in.libfbclient
gen/Makefile.client.fbudf:${MAKE_SRC_DIR}/Makefile.in.client.fbudf

View File

@ -33,7 +33,7 @@ class AliceMemoryPool : public MemoryPool
{
protected:
// Dummy constructor and destructor. Should never be called
AliceMemoryPool() : MemoryPool(NULL, NULL), lls_cache(*this) {}
AliceMemoryPool() : MemoryPool(NULL, default_stats_group, NULL, NULL), lls_cache(*this) {}
~AliceMemoryPool() {}
public:
static AliceMemoryPool *createPool() {

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@
* Contributor(s):
*
*
* $Id: alloc.h,v 1.37 2004-03-20 14:29:05 alexpeshkoff Exp $
* $Id: alloc.h,v 1.38 2004-03-25 23:12:39 skidder Exp $
*
*/
@ -45,66 +45,124 @@
#include "../../include/fb_types.h"
#include "../../include/firebird.h"
#include "../jrd/common.h"
#include "../jrd/ib_stdio.h"
#include "tree.h"
#include "locks.h"
#include "../jrd/common.h"
#include "../common/classes/fb_atomic.h"
#include "../common/classes/tree.h"
#include "../common/classes/locks.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h> /* XPG: prototypes for malloc/free have to be in
stdlib.h (EKU) */
#endif
#ifdef _MSC_VER
#define THROW_BAD_ALLOC
#else
#define THROW_BAD_ALLOC throw (std::bad_alloc)
#endif
#define MAX_TREE_DEPTH 4
// Must be a power of 2
#define ALLOC_ALIGNMENT ALIGNMENT
#define MEM_ALIGN(X) FB_ALIGN(X,ALLOC_ALIGNMENT)
namespace Firebird {
struct MemoryBlock /* 16 bytes of block header is not too much I think */ {
class MemoryPool* pool;
bool used;
bool last;
SSHORT type;
size_t length; /* Includes only actual block size, header not included */
MemoryBlock *prev;
// Maximum number of B+ tree pages kept spare for tree allocation
// Tree pages are allocated only from this pool thus if level of tree gets higher
// it will cause bad (but not fatal, I hope) consequences. 100^4 free blocks in free list is a lot
const int MAX_TREE_DEPTH = 4;
// Alignment for all memory blocks. Sizes of memory blocks in headers are measured in this units
const size_t ALLOC_ALIGNMENT = ALIGNMENT;
static inline size_t MEM_ALIGN(size_t value) {
return FB_ALIGN(value, ALLOC_ALIGNMENT);
}
// Flags for memory block
const USHORT MBK_LARGE = 1; // Block is large, allocated from OS directly
const USHORT MBK_PARENT = 2; // Block is allocated from parent pool
const USHORT MBK_USED = 4; // Block is used
const USHORT MBK_LAST = 8; // Block is last in the extent
// Block header.
// Has size of 12 bytes for 32-bit targets and 16 bytes on 64-bit ones
struct MemoryBlock {
class MemoryPool* mbk_pool;
USHORT mbk_flags;
SSHORT mbk_type;
union {
struct {
// Length and offset are measured in bytes thus memory extent size is limited to 64k
// Larger extents are not needed now, but this may be icreased later via using allocation units
USHORT mbk_length; // Actual block size: header not included, redirection list is included if applicable
USHORT mbk_prev_length;
} small;
// Measured in bytes
ULONG mbk_large_length;
};
#ifdef DEBUG_GDS_ALLOC
const char* file;
int line;
const char* mbk_file;
int mbk_line;
#endif
};
#define TYPE_POOL -1
#define TYPE_EXTENT -2
#define TYPE_LEAFPAGE -3
#define TYPE_TREEPAGE -4
// This structure is appended to the end of block redirected to parent pool or operating system
// It is a doubly-linked list which we are going to use when our pool is going to be deleted
struct MemoryRedirectList {
MemoryBlock* mrl_prev;
MemoryBlock* mrl_next;
};
const SSHORT TYPE_POOL = -1;
const SSHORT TYPE_EXTENT = -2;
const SSHORT TYPE_LEAFPAGE = -3;
const SSHORT TYPE_TREEPAGE = -4;
// We store BlkInfo structures instead of BlkHeader pointers to get benefits from
// processor cache-hit optimizations
struct BlockInfo {
MemoryBlock* block;
size_t length;
static bool greaterThan(const BlockInfo& i1, const BlockInfo& i2) {
inline static bool greaterThan(const BlockInfo& i1, const BlockInfo& i2) {
return (i1.length > i2.length) ||
(i1.length == i2.length && i1.block > i2.block);
}
};
struct MemoryExtent {
MemoryExtent *next;
size_t extent_size; // Includes extent header size
MemoryExtent *mxt_next;
MemoryExtent *mxt_prev;
};
struct PendingFreeBlock {
PendingFreeBlock *next;
};
class MemoryStats {
public:
MemoryStats() : mst_usage(0), mst_mapped(0), mst_max_usage(0), mst_max_mapped(0) {}
~MemoryStats() {}
size_t get_current_usage() const { return mst_usage.value(); }
size_t get_maximum_usage() const { return mst_max_usage; }
size_t get_current_mapping() const { return mst_mapped.value(); }
size_t get_maximum_mapping() const { return mst_max_mapped; }
private:
// Forbid copy constructor
MemoryStats(const MemoryStats& object) {}
// Currently allocated memory (without allocator overhead)
// Useful for monitoring engine memory leaks
AtomicCounter mst_usage;
// Amount of memory mapped (including all overheads)
// Useful for monitoring OS memory consumption
AtomicCounter mst_mapped;
// We don't particularily care about extreme precision of these max values,
// this is why we don't synchronize them on Windows
size_t mst_max_usage;
size_t mst_max_mapped;
friend class MemoryPool;
};
// Memory pool based on B+ tree of free memory blocks
// We are going to have two target architectures:
@ -127,21 +185,44 @@ private:
};
typedef BePlusTree<BlockInfo, BlockInfo, InternalAllocator,
DefaultKeyValue<BlockInfo>, BlockInfo> FreeBlocksTree;
FreeBlocksTree freeBlocks; // B+ tree ordered by (length,address)
// We keep most of our structures uninitialized as long we redirect
// our allocations to parent pool
bool parent_redirect;
// B+ tree ordered by (length,address).
FreeBlocksTree freeBlocks;
MemoryExtent *extents; // Linked list of all memory extents
Vector<void*, 2> spareLeafs;
Vector<void*, MAX_TREE_DEPTH + 1> spareNodes;
bool needSpare;
PendingFreeBlock *pendingFree;
// Synchronization of this object is a little bit tricky. Allocations
// redirected to parent pool are not protected with our mutex and not
// accounted locally, i.e. redirect_amount and parent_redirected linked list
// are synchronized with parent pool mutex only. All other pool members are
// synchronized with this mutex.
Mutex lock;
int extents_memory; // Sum of memory in allocated extents minus size of extents headers
int used_memory; // Size of used memory blocks including block headers
// Current usage counters for pool. Used to move pool to different statistics group
// Note that both counters are used only for blocks not redirected to parent.
size_t mapped_memory;
size_t used_memory;
MemoryPool *parent; // Parent pool. Used to redirect small allocations there
MemoryBlock *parent_redirected, *os_redirected;
size_t redirect_amount; // Amount of memory redirected to parent
// It is protected by parent pool mutex along with redirect list
// Statistics group for the pool
MemoryStats *stats;
/* Returns NULL in case it cannot allocate requested chunk */
static void* external_alloc(size_t size);
static void* external_alloc(size_t &size);
static void external_free(void* blk, size_t size);
static void external_free(void* blk, size_t &size);
void* tree_alloc(size_t size);
@ -149,53 +230,77 @@ private:
void updateSpare();
void addFreeBlock(MemoryBlock* blk);
inline void addFreeBlock(MemoryBlock* blk);
void removeFreeBlock(MemoryBlock* blk);
void free_blk_extent(MemoryBlock* blk);
// does all the stuff except locking and exceptions
// Allocates small block from this pool. Pool must be locked during call
void* internal_alloc(size_t size, SSHORT type = 0
#ifdef DEBUG_GDS_ALLOC
, const char* file = NULL, int line = 0
#endif
);
// Deallocates small block from this pool. Pool must be locked during this call
void internal_deallocate(void* block);
// Forbid copy constructor, should never be called
MemoryPool(const MemoryPool& pool) : freeBlocks((InternalAllocator*)this) { }
// Used by pools to track memory usage
inline void increment_usage(size_t size);
inline void decrement_usage(size_t size);
inline void increment_mapping(size_t size);
inline void decrement_mapping(size_t size);
protected:
int* cur_memory;
int* max_memory;
// Do not allow to create and destroy pool directly from outside
MemoryPool(void* first_extent, void* root_page, int* cur_mem = NULL, int* max_mem = NULL);
MemoryPool(MemoryPool* _parent, MemoryStats &_stats, void* first_extent, void* root_page);
// This should never be called
~MemoryPool() {
}
// Used to create MemoryPool descendants
static MemoryPool* internal_create(size_t instance_size,
int* cur_mem = NULL, int* max_mem = NULL);
MemoryPool* parent = NULL, MemoryStats &stats = default_stats_group);
public:
static int process_max_memory;
static int process_current_memory;
// Default statistics group for process
static MemoryStats default_stats_group;
// Move usage stats to another location
void moveStats(int *cur_mem, int *max_mem) {
*cur_mem = *cur_memory;
*max_mem = *max_memory;
cur_memory = cur_mem;
max_memory = max_mem;
}
static MemoryPool* createPool() {
return internal_create(sizeof(MemoryPool));
// Pool created for process
static MemoryPool* processMemoryPool;
// Create memory pool instance
static MemoryPool* createPool(MemoryPool* parent = NULL, MemoryStats &stats = default_stats_group) {
return internal_create(sizeof(MemoryPool), parent, stats);
}
// Set context pool for current thread of execution
static MemoryPool* setContextPool(MemoryPool *newPool);
// Get context pool for current thread of execution
static MemoryPool* getContextPool();
// Set statistics group for pool. Usage counters will be decremented from
// previously set group and added to new
void setStatsGroup(MemoryStats &stats);
// Deallocate pool and all its contents
static void deletePool(MemoryPool* pool);
// Allocate memory block. Result is not zero-initialized.
// It case of problems this method throws std::bad_alloc
void* allocate(size_t size, SSHORT type = 0
#ifdef DEBUG_GDS_ALLOC
, const char* file = NULL, int line = 0
#endif
);
// Allocate memory block. In case of problems this method returns NULL
void* allocate_nothrow(size_t size, SSHORT type = 0
#ifdef DEBUG_GDS_ALLOC
, const char* file = NULL, int line = 0
@ -204,15 +309,19 @@ public:
void deallocate(void* block);
// Check pool for internal consistent. When enabled, call is very expensive
bool verify_pool();
// Print out pool contents. This is debugging routine
void print_contents(IB_FILE*, bool = false);
// Deallocate memory block. Pool is derived from block header
static void globalFree(void* block) {
if (block)
((MemoryBlock*)((char*)block - MEM_ALIGN(sizeof(MemoryBlock))))->pool->deallocate(block);
((MemoryBlock*)((char*)block - MEM_ALIGN(sizeof(MemoryBlock))))->mbk_pool->deallocate(block);
}
// Allocate zero-initialized block of memory
void* calloc(size_t size, SSHORT type = 0
#ifdef DEBUG_GDS_ALLOC
, const char* file = NULL, int line = 0
@ -229,114 +338,70 @@ public:
/// Returns the type associated with the allocated memory.
static SSHORT blk_type(const void* mem) {
return ((MemoryBlock*)((char *)mem - MEM_ALIGN(sizeof(MemoryBlock))))->type;
return ((MemoryBlock*)((char *)mem - MEM_ALIGN(sizeof(MemoryBlock))))->mbk_type;
}
/// Returns the pool the memory was allocated from.
static MemoryPool* blk_pool(const void* mem) {
return ((MemoryBlock*)((char *)mem - MEM_ALIGN(sizeof(MemoryBlock))))->pool;
return ((MemoryBlock*)((char *)mem - MEM_ALIGN(sizeof(MemoryBlock))))->mbk_pool;
}
friend class InternalAllocator;
};
}; // namespace Firebird
// Class intended to manage execution context pool stack
// Declare instance of this class when you need to set new context pool and it
// will be restored automatically as soon holder variable gets out of scope
class ContextPoolHolder {
public:
ContextPoolHolder(MemoryPool* newPool) {
savedPool = MemoryPool::setContextPool(newPool);
}
~ContextPoolHolder() {
MemoryPool::setContextPool(savedPool);
}
private:
MemoryPool* savedPool;
};
#ifndef TESTING_ONLY
}; // namespace Firebird
using Firebird::MemoryPool;
MemoryPool* getDefaultMemoryPool();
inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; }
#if defined(__GNUC__) && !defined(MINGW)
// All this crappy code below under __GNUC__ conditional is to avoid replacing
// STL operator new as this replacement causes crashes if client library is
// loaded by host application using STL
MemoryPool* getContextMemoryPool();
// This is to prevent inclusion of <new> header
#ifdef __NEW__
#error "alloc.h must be included before <new>"
#endif
#define __NEW__
namespace std {
class bad_alloc : public exception {};
}
// Define operators as static inline to prevent replacement of STL versions
static inline void* operator new(size_t s) {
#if defined(DEV_BUILD)
// Do not complain here. It causes client tools to crash on Red Hat 8.0
// fprintf(stderr, "You MUST allocate all memory from a pool. Don't use the default global new().\n");
#endif // DEV_BUILD
// return getDefaultMemoryPool()->calloc(s, 0
return getDefaultMemoryPool()->allocate(s, 0
#ifdef DEBUG_GDS_ALLOC
,__FILE__,__LINE__
#endif
);
}
static inline void* operator new[](size_t s) {
#if defined(DEV_BUILD)
// Do not complain here. It causes client tools to crash on Red Hat 8.0
// fprintf(stderr, "You MUST allocate all memory from a pool. Don't use the default global new[]().\n");
#endif // DEV_BUILD
// return getDefaultMemoryPool()->calloc(s, 0
return getDefaultMemoryPool()->allocate(s, 0
#ifdef DEBUG_GDS_ALLOC
,__FILE__,__LINE__
#endif
);
}
static inline void operator delete(void* mem) throw() {
Firebird::MemoryPool::globalFree(mem);
}
static inline void operator delete[](void* mem) throw() {
Firebird::MemoryPool::globalFree(mem);
}
// Default placement versions of operator new.
static inline void* operator new(size_t, void* __p) throw() { return __p; }
static inline void* operator new[](size_t, void* __p) throw() { return __p; }
#else
// Global versions of operator new() for compatibility with crappy libraries
// Global versions of operator new()
// Implemented in alloc.cpp
void* operator new(size_t) THROW_BAD_ALLOC;
void* operator new[](size_t) THROW_BAD_ALLOC;
// We cannot use inline versions because we have to replace STL delete defined in <new> header
// One more performance pain we have to take because of STL usage :((
void operator delete(void* mem) throw();
void operator delete[](void* mem) throw();
#endif
#ifdef DEBUG_GDS_ALLOC
static inline void* operator new(size_t s, Firebird::MemoryPool& pool, const char* file, int line) {
return pool.allocate(s, 0, file, line);
// return pool.calloc(s, 0, file, line);
}
static inline void* operator new[](size_t s, Firebird::MemoryPool& pool, const char* file, int line) {
return pool.allocate(s, 0, file, line);
// return pool.calloc(s, 0, file, line);
}
#define FB_NEW(pool) new(pool,__FILE__,__LINE__)
#define FB_NEW_RPT(pool,count) new(pool,count,__FILE__,__LINE__)
#else
static inline void* operator new(size_t s, Firebird::MemoryPool& pool) {
return pool.allocate(s);
// return pool.calloc(s);
}
static inline void* operator new[](size_t s, Firebird::MemoryPool& pool) {
return pool.allocate(s);
// return pool.calloc(s);
}
#define FB_NEW(pool) new(pool)
#define FB_NEW_RPT(pool,count) new(pool,count)
#endif
#ifndef TESTING_ONLY
/**
This is the allocator template provided to be used with the STL.
@ -397,17 +462,6 @@ namespace Firebird
char* _Charalloc(size_type n)
{ return (char*) pool->allocate(n, 0); }
#endif
/*#ifdef DEBUG_GDS_ALLOC
pointer allocate(size_type s, const void * = 0)
{ return (pointer) pool->calloc(sizeof(T) * s, 0, __FILE__, __LINE__); }
char *_Charalloc(size_type n)
{ return (char*) pool->calloc(n, 0, __FILE__, __LINE__); }
#else
pointer allocate(size_type s, const void * = 0)
{ return (pointer) pool->calloc(sizeof(T) * s, 0); }
char *_Charalloc(size_type n)
{ return (char*) pool->calloc(n, 0); }
#endif*/
void deallocate(pointer p, size_type s) { pool->deallocate(p); }
void deallocate(void* p, size_type s) { pool->deallocate(p); }
@ -463,6 +517,7 @@ namespace Firebird
if (distance < 0) {
distance = -distance;
}
// Cannot use fb_assert in this header
fb_assert(distance < 64 * 1024);
#endif
}

View File

@ -32,7 +32,7 @@
* Contributor(s):
*
*
* $Id: class_perf.cpp,v 1.8 2003-09-08 20:23:32 skidder Exp $
* $Id: class_perf.cpp,v 1.9 2004-03-25 23:12:39 skidder Exp $
*
*/
@ -49,7 +49,7 @@ void start() {
t = clock();
}
#define TEST_ITEMS 1000000
#define TEST_ITEMS 10000000
void report(int scale) {
clock_t d = clock();
@ -166,7 +166,7 @@ void report() {
printf("Operation took %d milliseconds.\n", (int)(d-t)*1000/CLOCKS_PER_SEC);
}
#define ALLOC_ITEMS 1000000
#define ALLOC_ITEMS 10000000
#define MAX_ITEM_SIZE 50
#define BIG_ITEMS (ALLOC_ITEMS/10)
#define BIG_SIZE (MAX_ITEM_SIZE*5)
@ -174,7 +174,7 @@ void report() {
struct AllocItem {
int order;
void *item;
static int compare(const AllocItem &i1, const AllocItem &i2) {
static bool greaterThan(const AllocItem &i1, const AllocItem &i2) {
return i1.order > i2.order || (i1.order==i2.order && i1.item > i2.item);
}
};
@ -190,7 +190,7 @@ static void testAllocatorOverhead() {
int i;
for (i=0;i<ALLOC_ITEMS;i++) {
n = n * 47163 - 57412;
AllocItem temp = {n, (void*)i};
AllocItem temp = {n, (void*)(long)i};
items.add(temp);
}
// Deallocate half of small items
@ -202,7 +202,7 @@ static void testAllocatorOverhead() {
// Allocate big items
for (i=0;i<BIG_ITEMS;i++) {
n = n * 47163 - 57412;
AllocItem temp = {n, (void*)i};
AllocItem temp = {n, (void*)(long)i};
bigItems.add(temp);
}
// Deallocate the rest of small items

View File

@ -32,7 +32,7 @@
* Contributor(s):
*
*
* $Id: class_test.cpp,v 1.12 2004-02-02 11:00:57 robocop Exp $
* $Id: class_test.cpp,v 1.13 2004-03-25 23:12:39 skidder Exp $
*
*/
@ -270,24 +270,36 @@ void testBePlusTree() {
#define BIG_ITEMS (ALLOC_ITEMS/10)
#define BIG_SIZE (MAX_ITEM_SIZE*5)
#define LARGE_ITEMS 10
#define LARGE_ITEM_SIZE 300000
struct AllocItem {
int order;
void *item;
static int compare(const AllocItem &i1, const AllocItem &i2) {
static bool greaterThan(const AllocItem &i1, const AllocItem &i2) {
return i1.order > i2.order || (i1.order == i2.order && i1.item > i2.item);
}
};
void testAllocator() {
printf("Test Firebird::MemoryPool\n");
MemoryPool* pool = MemoryPool::createPool();
MemoryPool* parent = getDefaultMemoryPool();
MemoryPool* pool = MemoryPool::createPool(parent);
MallocAllocator allocator;
BePlusTree<AllocItem, AllocItem, MallocAllocator, DefaultKeyValue<AllocItem>, AllocItem> items(&allocator),
bigItems(&allocator);
Vector<void*, LARGE_ITEMS> la;
printf("Allocate %d large items: ", LARGE_ITEMS);
int i;
for (i = 0; i<LARGE_ITEMS; i++)
la.add(pool->allocate(LARGE_ITEM_SIZE));
pool->verify_pool();
printf(" DONE\n");
printf("Allocate %d items: ", ALLOC_ITEMS);
int n = 0;
int i;
pool->verify_pool();
for (i = 0; i < ALLOC_ITEMS; i++) {
n = n * 47163 - 57412;
@ -296,6 +308,7 @@ void testAllocator() {
}
printf(" DONE\n");
pool->verify_pool();
parent->verify_pool();
printf("Deallocate half of items in quasi-random order: ");
n = 0;
@ -305,6 +318,7 @@ void testAllocator() {
} while (n < ALLOC_ITEMS / 2 && items.getNext());
printf(" DONE\n");
pool->verify_pool();
parent->verify_pool();
printf("Allocate %d big items: ", BIG_ITEMS);
n = 0;
@ -316,6 +330,7 @@ void testAllocator() {
}
printf(" DONE\n");
pool->verify_pool();
parent->verify_pool();
printf("Deallocate the rest of small items in quasi-random order: ");
while (items.getNext()) {
@ -323,17 +338,30 @@ void testAllocator() {
}
printf(" DONE\n");
pool->verify_pool();
parent->verify_pool();
printf("Deallocate big items in quasi-random order: ");
if (bigItems.getFirst()) do {
pool->deallocate(bigItems.current().item);
} while (bigItems.getNext());
printf(" DONE\n");
printf("Deallocate %d large items: ", LARGE_ITEMS/2);
for (i = 0; i<LARGE_ITEMS/2; i++)
pool->deallocate(la[i]);
pool->verify_pool();
pool->print_contents(stdout, true);
printf(" DONE\n");
pool->verify_pool();
parent->verify_pool();
pool->print_contents(stdout, false);
parent->print_contents(stdout, false);
MemoryPool::deletePool(pool);
parent->verify_pool();
// TODO:
// Test critically low memory conditions
// Test that tree correctly recovers in low-memory conditions
}
int main() {

View File

@ -0,0 +1,194 @@
/*
* PROGRAM: Client/Server Common Code
* MODULE: fb_atomic.h
* DESCRIPTION: Atomic counters
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* You may obtain a copy of the Licence at
* http://www.gnu.org/licences/lgpl.html
*
* As a special exception this file can also be included in modules
* with other source code as long as that source code has been
* released under an Open Source Initiative certificed licence.
* More information about OSI certification can be found at:
* http://www.opensource.org
*
* This module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public Licence for more details.
*
* This module was created by members of the firebird development
* team. All individual contributions remain the Copyright (C) of
* those individuals and all rights are reserved. Contributors to
* this file are either listed below or can be obtained from a CVS
* history command.
*
* Created by: Nickolay Samofatov <skidder@bssys.com>
*
* Contributor(s):
*
*
* $Id: fb_atomic.h,v 1.1 2004-03-25 23:12:39 skidder Exp $
*
*/
#ifndef FB_ATOMIC_H
#define FB_ATOMIC_H
#if defined(WIN_NT)
#include <windows.h>
namespace Firebird {
// Win95 is not supported unless compiled conditionally and
// redirected to generic version below
class AtomicCounter
{
public:
typedef LONG counter_type;
AtomicCounter(counter_type value = 0) : counter(value) {}
~AtomicCounter() {}
counter_type exchangeAdd(counter_type value) {
return InterlockedExchangeAdd(&counter, value);
}
counter_type operator +=(counter_type value) {
return exchangeAdd(value) + value;
}
counter_type operator -=(counter_type value) {
return exchangeAdd(-value) - value;
}
counter_type operator ++() {
return InterlockedIncrement(&counter);
}
counter_type operator --() {
return InterlockedDecrement(&counter);
}
counter_type value() const { return counter; }
private:
# if (defined(_MSC_VER) && (_MSC_VER <= 1200)) || defined(MINGW)
counter_type counter;
# else
volatile counter_type counter;
# endif
};
} // namespace Firebird
#elif defined(__GNUC__) && (defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64))
// Assembler version for x86 and AMD64. Note it uses xaddl thus it requires i486
class AtomicCounter
{
public:
typedef int counter_type;
AtomicCounter(counter_type value = 0) : counter(value) {}
~AtomicCounter() {}
counter_type exchangeAdd(counter_type value) {
register counter_type result;
__asm __volatile (
"lock; xaddl %0, %1"
: "=r" (result), "=m" (counter)
: "0" (value), "m" (counter));
return result;
}
counter_type operator +=(counter_type value) {
return exchangeAdd(value) + value;
}
counter_type operator -=(counter_type value) {
return exchangeAdd(-value) - value;
}
counter_type operator ++() {
return exchangeAdd(1) + 1;
}
counter_type operator --() {
return exchangeAdd(-1) - 1;
}
counter_type value() const { return counter; }
private:
volatile counter_type counter;
};
#else
# include "../common/classes/locks.h"
namespace Firebird {
// Highly inefficient, but safe and portable implementation
class AtomicCounter
{
public:
typedef int counter_type;
AtomicCounter(counter_type value = 0) : counter(value) {}
~AtomicCounter() {}
counter_type exchangeAdd(counter_type value) {
lock.enter();
counter_type temp = counter;
counter += value;
lock.leave();
return temp;
}
counter_type operator +=(counter_type value) {
lock.enter();
counter_type temp = counter += value;
lock.leave();
return temp;
}
counter_type operator -=(counter_type value) {
lock.enter();
counter_type temp = counter -= value;
lock.leave();
return temp;
}
counter_type operator ++() {
lock.enter();
counter_type temp = counter++;
lock.leave();
return temp;
}
counter_type operator --() {
lock.enter();
counter_type temp = counter--;
lock.leave();
return temp;
}
counter_type value() const { return counter; }
private:
volatile counter_type counter;
Mutex lock;
};
} // namespace Firebird
#endif
#endif

104
src/common/classes/fb_tls.h Normal file
View File

@ -0,0 +1,104 @@
/*
* PROGRAM: Client/Server Common Code
* MODULE: fb_tls.h
* DESCRIPTION: Thread-local storage handlers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* You may obtain a copy of the Licence at
* http://www.gnu.org/licences/lgpl.html
*
* As a special exception this file can also be included in modules
* with other source code as long as that source code has been
* released under an Open Source Initiative certificed licence.
* More information about OSI certification can be found at:
* http://www.opensource.org
*
* This module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public Licence for more details.
*
* This module was created by members of the firebird development
* team. All individual contributions remain the Copyright (C) of
* those individuals and all rights are reserved. Contributors to
* this file are either listed below or can be obtained from a CVS
* history command.
*
* Created by: Nickolay Samofatov <skidder@bssys.com>
*
* Contributor(s):
*
*
* $Id: fb_tls.h,v 1.1 2004-03-25 23:12:39 skidder Exp $
*
*/
#ifndef FB_TLS_H
#define FB_TLS_H
// This unit defines a few handy macros
// TLS_DECLARE is used in place of variable declaration
// TLS_GET gives value of thread-specific variable
// TLS_SET sets value of thread-specific variable
//
// TLS variable type should be smaller than size of pointer to stay portable
#if !defined(MULTI_THREAD)
// Single-threaded case
# define TLS_DECLARE(TYPE, NAME) TYPE NAME
# define TLS_GET(NAME) NAME
# define TLS_SET(NAME,VALUE) NAME=(VALUE)
#elif defined(WIN_NT)
// Windows native. Does MinGW support it?
// If no MinGW should adapt Tls API approach like generic POSIX does
# define TLS_DECLARE(TYPE, NAME) __declspec(thread) TYPE NAME
# define TLS_GET(NAME) NAME
# define TLS_SET(NAME,VALUE) NAME=(VALUE)
#elif defined(HAVE___THREAD)
// Recent GCC supports __thread keyword. Sun compiler and HP-UX should have it too
# define TLS_DECLARE(TYPE, NAME) __thread TYPE NAME
# define TLS_GET(NAME) NAME
# define TLS_SET(NAME,VALUE) NAME=(VALUE)
#else
#include <pthread.h>
namespace Firebird {
template <typename T>
class TlsValue {
public:
TlsValue() {
if (pthread_key_create(&key, NULL))
system_call_failed::raise("pthread_key_create");
}
const T get() {
// We use double C-style cast to allow using scalar datatypes
// with sizes up to size of pointer without warnings
return (T)(IPTR)pthread_getspecific(key);
}
void set(const T value) {
if (pthread_setspecific(key, (void*)(IPTR)value))
system_call_failed::raise("pthread_setspecific");
}
~TlsValue() {
if (pthread_key_delete(key))
system_call_failed::raise("pthread_key_delete");
}
private:
pthread_key_t key;
};
} // namespace Firebird
# define TLS_DECLARE(TYPE, NAME) TlsValue<TYPE> NAME
# define TLS_GET(NAME) NAME.get()
# define TLS_SET(NAME,VALUE) NAME.set(VALUE)
#endif
#endif

View File

@ -32,7 +32,7 @@
* Contributor(s):
*
*
* $Id: rwlock.h,v 1.13 2004-03-18 05:54:22 robocop Exp $
* $Id: rwlock.h,v 1.14 2004-03-25 23:12:39 skidder Exp $
*
*/
@ -44,55 +44,26 @@
#include <windows.h>
#include <limits.h>
#define LOCK_WRITER_OFFSET 50000
#include "../common/classes/fb_atomic.h"
namespace Firebird
{
// This class works on Windows 98/NT4 or later. Win95 is not supported
// Should work pretty fast.
const int LOCK_WRITER_OFFSET = 50000;
// Should work pretty fast if atomic operations are native.
// This is not the case for Win95
class RWLock {
private:
volatile LONG lock; // This is the actual lock
AtomicCounter lock; // This is the actual lock
// -50000 - writer is active
// 0 - noone owns the lock
// positive value - number of concurrent readers
volatile LONG blockedReaders;
volatile LONG blockedWriters;
AtomicCounter blockedReaders;
AtomicCounter blockedWriters;
HANDLE writers_event, readers_semaphore;
//
// Those inlines are needed due to the different argument taken by msvc6 and msvc7
// funcions
//
#if (defined(_MSC_VER) && (_MSC_VER <= 1200)) || defined(MINGW)
inline LONG InterlockedIncrement_uni(volatile LONG* lock_p)
{
return InterlockedIncrement(const_cast<LONG*>(lock_p));
}
inline LONG InterlockedDecrement_uni(volatile LONG* lock_p)
{
return InterlockedDecrement(const_cast<LONG*>(lock_p));
}
inline LONG InterlockedExchangeAdd_uni(volatile LONG* lock_p, LONG value)
{
return InterlockedExchangeAdd(const_cast<LONG*>(lock_p), value);
}
#else
inline LONG InterlockedIncrement_uni(volatile LONG* lock_p)
{
return InterlockedIncrement(lock_p);
}
inline LONG InterlockedDecrement_uni(volatile LONG* lock_p)
{
return InterlockedDecrement(lock_p);
}
inline LONG InterlockedExchangeAdd_uni(volatile LONG* lock_p, LONG value)
{
return InterlockedExchangeAdd(lock_p, value);
}
#endif
public:
RWLock() : lock(0), blockedReaders(0), blockedWriters(0)
{
@ -115,7 +86,7 @@ public:
// Otherwise returns a number of readers
LONG getState() const
{
return lock;
return lock.value();
}
void unblockWaiting()
{
@ -131,19 +102,19 @@ public:
}
bool tryBeginRead()
{
if (lock < 0) return false;
if (InterlockedIncrement_uni(&lock) > 0) return true;
if (lock.value() < 0) return false;
if (++lock > 0) return true;
// We stepped on writer's toes. Fix our mistake
if (InterlockedDecrement_uni(&lock) == 0)
if (--lock == 0)
unblockWaiting();
return false;
}
bool tryBeginWrite()
{
if (lock) return false;
if (InterlockedExchangeAdd_uni(&lock, -LOCK_WRITER_OFFSET) == 0) return true;
if (lock.value()) return false;
if (lock.exchangeAdd(-LOCK_WRITER_OFFSET) == 0) return true;
// We stepped on somebody's toes. Fix our mistake
if (InterlockedExchangeAdd_uni(&lock, LOCK_WRITER_OFFSET) == -LOCK_WRITER_OFFSET)
if (lock.exchangeAdd(LOCK_WRITER_OFFSET) == -LOCK_WRITER_OFFSET)
unblockWaiting();
return false;
}
@ -169,12 +140,12 @@ public:
}
void endRead()
{
if (InterlockedDecrement_uni(&lock) == 0)
if (--lock == 0)
unblockWaiting();
}
void endWrite()
{
if (InterlockedExchangeAdd_uni(&lock, LOCK_WRITER_OFFSET) == -LOCK_WRITER_OFFSET)
if (lock.exchangeAdd(LOCK_WRITER_OFFSET) == -LOCK_WRITER_OFFSET)
unblockWaiting();
}
};

View File

@ -1,13 +1,14 @@
# Test for library integrity
# this should be compiled with optimization turned off and with NDEBUG undefined
#ulimit -s unlimited
#g++ -ggdb -Wall -I../../include -DTESTING_ONLY -DDEBUG_GDS_ALLOC class_test.cpp alloc.cpp ../fb_exception.cpp 2> aa
ulimit -s unlimited
ulimit -c unlimited
g++ -ggdb -Wall -I../../include -DTESTING_ONLY -DDEBUG_GDS_ALLOC class_test.cpp alloc.cpp ../fb_exception.cpp 2> aa
#./a.out
# Chose the best algorithm parameters for the target architecture
g++ -O3 -march=pentium4 -mfpmath=sse -DHAVE_STDLIB_H -DNDEBUG -DTESTING_ONLY \
-I../../include class_perf.cpp alloc.cpp ../fb_exception.cpp 2> aa
#g++ -O3 -DHAVE_STDLIB_H -DNDEBUG -DTESTING_ONLY \
#-I../../include class_perf.cpp alloc.cpp ../fb_exception.cpp 2> aa
#g++ -ggdb -I../../include class_perf.cpp alloc.cpp \
#../memory/memory_pool.cpp ../fb_exception.cpp ../memory/allocators.cpp 2> aa
#./a.out
./a.out

View File

@ -32,13 +32,14 @@
* Contributor(s):
*
*
* $Id: tree.h,v 1.23 2004-01-28 07:50:18 robocop Exp $
* $Id: tree.h,v 1.24 2004-03-25 23:12:39 skidder Exp $
*
*/
#ifndef TREE_H
#define TREE_H
#include <exception>
#include "../jrd/gdsassert.h"
#include <string.h>
#ifdef HAVE_STDLIB_H
@ -46,24 +47,27 @@
stdlib.h (EKU) */
#endif
#include "vector.h"
#if !defined(__GNUC__) || defined(MINGW)
#include <new>
#endif
namespace Firebird {
// This macro controls merging of nodes of all B+ trees
// Now it merges pages only when resulting page will be 3/4 filled or less
// Be careful while changing this expression. N=2 must always cause merge
#define NEED_MERGE(N,COUNT) ((N)*4/3<=(COUNT))
static inline bool NEED_MERGE(int current_count, int page_count) {
return current_count*4/3 <= page_count;
}
// Note: small values will cause wasting of memory because overhead for
// each page is 28-32 bytes (on 32-bit platforms)
// 100 is an optimal value for range 10^5 - 10^7 items and it generates
// total tree overhead of ~10%
#define LEAF_PAGE_SIZE 100
#define NODE_PAGE_SIZE 100
const int LEAF_PAGE_SIZE = 100;
const int NODE_PAGE_SIZE = 100;
namespace Firebird {
// This is maximum level of tree nesting. 10^9 elements for binary tree case
// should be more than enough. No checks are performed in code against overflow of this value
const int MAX_TREE_LEVEL = 30;
class MallocAllocator {
public:
@ -109,11 +113,12 @@ template <typename Value, typename Key = Value, typename Allocator = MallocAlloc
int NodeCount = NODE_PAGE_SIZE >
class BePlusTree {
public:
BePlusTree(Allocator *_pool) : pool(_pool), level(0), defaultAccessor(this)
{
root = new (_pool->allocate(sizeof(ItemList))) ItemList();
};
BePlusTree(Allocator *_pool) : pool(_pool), level(0), root(NULL), defaultAccessor(this) { };
~BePlusTree() {
// We delete tree which was not fully created
if (!root) return;
// Find first items page
void *temp = root;
for (int i=level;i>0;i--)
@ -142,7 +147,7 @@ public:
}
}
bool add(const Value& item) { return defaultAccessor.add(item); }
bool add(const Value& item);
/* Remove item as quickly as possible. Current position is undefined after this call */
void fastRemove() { defaultAccessor.fastRemove(); }
@ -161,8 +166,6 @@ public:
Value& current() const { return defaultAccessor.current(); }
Value& getAddErrorValue() { return defaultAccessor.getAddErrorValue(); }
private:
BePlusTree(Allocator *_pool, void *rootPage) : pool(_pool), level(0),
root(new(rootPage) ItemList()), defaultAccessor(this) {}
@ -230,185 +233,6 @@ public:
public:
Accessor(BePlusTree* _tree) : tree(_tree), curr(NULL), curPos(0) {}
bool add(const Value& item) {
// Find leaf page for our item
void *vList = tree->root;
const Key& key = KeyOfValue::generate(NULL, item);
for (int lev=tree->level; lev > 0 ; lev--) {
int pos;
if (!((NodeList *)vList)->find(key, pos))
if ( --pos < 0 ) pos = 0;
vList = (*(NodeList *)vList)[pos];
}
ItemList *leaf = (ItemList *)vList;
int pos;
if (leaf->find(key, pos)) return false;
if (leaf->getCount() < LeafCount) {
leaf->insert(pos, item);
return true;
}
// Page is full. Look up nearby pages for space if possible
ItemList *temp;
// Adding items to the next page is cheaper in most cases that
// is why it is checked first
if ((temp = leaf->next) && temp->getCount() < LeafCount) {
// Found space on the next page
if (pos == LeafCount) {
// This would be ok if items were unique: temp->insert(0, item);
// The same applies to all simular cases below
temp->insert(0,item);
}
else {
// Maybe splitting array by half would make things faster ?
// It should do it in case of random size items.
// It would make things slower in case of sequental items addition.
// Let's leave it as is now.
temp->insert(0, (*leaf)[LeafCount-1]);
leaf->shrink(LeafCount-1);
leaf->insert(pos, item);
}
return true;
}
if ((temp = leaf->prev) && temp->getCount() < LeafCount) {
// Found space on the previous page
if (pos == 0) {
temp->insert(temp->getCount(), item);
}
else {
temp->insert(temp->getCount(), (*leaf)[0]);
leaf->remove(0);
leaf->insert(pos-1, item);
}
return true;
}
// Nearby pages are also full. We need to add one more leaf page to the list
// This shouldn't happen very often. Traverse tree up trying to add node
ItemList *newLeaf;
try {
// No re-enterance allowed !!!
// Exception here doesn't
// invalidate tree structure
newLeaf = new(tree->pool->allocate(sizeof(ItemList))) ItemList(leaf);
} catch(const std::exception&) {
addErrorValue = item;
throw;
}
if (pos == LeafCount) {
newLeaf->insert(0,item);
}
else {
newLeaf->insert(0, (*leaf)[LeafCount-1]);
leaf->shrink(leaf->getCount()-1);
leaf->insert(pos, item);
}
void *newNode = newLeaf;
NodeList *nodeList = leaf->parent;
int curLevel = 0;
try {
while (nodeList) {
// Easy case. We've got some space on the node page
if (nodeList->getCount() < NodeCount) {
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->add(newNode);
return true;
}
// Page is full. Look up nearby pages for space if possible
nodeList->find(NodeList::generate(nodeList, newNode), pos);
NodeList *list;
if ((list = nodeList->next) && list->getCount() < NodeCount) {
// Found space on the next page
if (pos == NodeCount) {
NodeList::setNodeParentAndLevel(newNode, curLevel, list);
list->insert(0, newNode);
}
else {
void *t = (*nodeList)[NodeCount-1];
NodeList::setNodeParent(t, curLevel, list);
list->insert(0, t);
nodeList->shrink(NodeCount-1);
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->insert(pos, newNode);
}
return true;
}
if ((list = nodeList->prev) && list->getCount() < NodeCount) {
// Found space on the previous page
if (pos == 0) {
NodeList::setNodeParentAndLevel(newNode, curLevel, list);
list->insert(list->getCount(), newNode);
}
else {
void *t = (*nodeList)[0];
NodeList::setNodeParent(t, curLevel, list);
list->insert(list->getCount(), t);
nodeList->remove(0);
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->insert(pos-1, newNode);
}
return true;
}
// No space found. Allocate NodeList page and climb up the tree
// No re-enterance allowed !!!
// Exceptions from this point
// are cleaned up lower
NodeList *newList = new(tree->pool->allocate(sizeof(NodeList))) NodeList(nodeList);
if (pos == NodeCount) {
NodeList::setNodeParentAndLevel(newNode, curLevel, newList);
newList->insert(0, newNode);
}
else {
void *t = (*nodeList)[NodeCount-1];
NodeList::setNodeParent(t, curLevel, newList);
newList->insert(0, t);
nodeList->shrink(NodeCount-1);
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->insert(pos, newNode);
}
newNode = newList;
nodeList = nodeList->parent;
curLevel++;
}
// This is a worst case. We reached the top of tree but were not able to insert node
// Allocate new root page and increase level of our tree
nodeList = new(tree->pool->allocate(sizeof(NodeList))) NodeList();
nodeList->level = tree->level;
nodeList->insert(0,tree->root);
NodeList::setNodeParentAndLevel(newNode, tree->level, nodeList);
NodeList::setNodeParent(tree->root, tree->level, nodeList);
nodeList->add(newNode);
tree->root = nodeList;
tree->level++;
} catch(const std::exception&) {
while (curLevel) {
void *lower = (*(NodeList *)newNode)[0];
((NodeList *)newNode)->~NodeList();
tree->pool->deallocate(newNode);
newNode = lower;
curLevel--;
}
addErrorValue = (*(ItemList*)newNode)[0];
((ItemList *)newNode)->~ItemList();
tree->pool->deallocate(newNode);
throw;
}
return true;
}
/* Remove item as quickly as possible. Current position is undefined after this call */
void fastRemove() {
if ( !tree->level ) {
@ -468,6 +292,7 @@ public:
// and compiler will be able to eliminate most of code
bool locate(LocType lt, Key& key) {
void *list = tree->root;
if (!list) return false; // Uninitalized tree
for (int lev=tree->level; lev; lev--) {
int pos;
if (!((NodeList *)list)->find(key, pos))
@ -507,6 +332,7 @@ public:
}
bool getFirst() {
void *items = tree->root;
if (!items) return false; // Uninitalized tree
for (int i=tree->level;i>0;i--)
items = (*(NodeList *)items)[0];
curr = (ItemList *)items;
@ -515,6 +341,7 @@ public:
}
bool getLast() {
void *items = tree->root;
if (!items) return false; // Uninitalized tree
for (int i=tree->level;i>0;i--)
items = (*(NodeList *)items)[((NodeList *)items)->getCount()-1];
curr = (ItemList *)items;
@ -539,12 +366,10 @@ public:
return true;
}
Value& current() const { return (*curr)[curPos]; }
Value& getAddErrorValue() { return addErrorValue; }
private:
BePlusTree* tree;
ItemList *curr;
int curPos;
Value addErrorValue;
};
private:
@ -562,6 +387,209 @@ private:
/************************ BePlusTree implementation ******************/
template <typename Value, typename Key, typename Allocator, typename KeyOfValue, typename Cmp, int LeafCount, int NodeCount>
bool BePlusTree<Value, Key, Allocator, KeyOfValue, Cmp, LeafCount, NodeCount>::add(const Value& item)
{
// Finish initialization of the tree if necessary
if (!root) root = new (pool->allocate(sizeof(ItemList))) ItemList();
// Find leaf page for our item
void *vList = this->root;
const Key& key = KeyOfValue::generate(NULL, item);
for (int lev=this->level; lev > 0 ; lev--) {
int pos;
if (!((NodeList *)vList)->find(key, pos))
if ( --pos < 0 ) pos = 0;
vList = (*(NodeList *)vList)[pos];
}
ItemList *leaf = (ItemList *)vList;
int pos;
if (leaf->find(key, pos)) return false;
if (leaf->getCount() < LeafCount) {
leaf->insert(pos, item);
return true;
}
// Page is full. Look up nearby pages for space if possible
ItemList *temp;
// Adding items to the next page is cheaper in most cases that
// is why it is checked first
if ((temp = leaf->next) && temp->getCount() < LeafCount) {
// Found space on the next page
if (pos == LeafCount) {
// This would be ok if items were unique: temp->insert(0, item);
// The same applies to all simular cases below
temp->insert(0,item);
}
else {
// Maybe splitting array by half would make things faster ?
// It should do it in case of random size items.
// It would make things slower in case of sequental items addition.
// Let's leave it as is now.
temp->insert(0, (*leaf)[LeafCount-1]);
leaf->shrink(LeafCount-1);
leaf->insert(pos, item);
}
return true;
}
if ((temp = leaf->prev) && temp->getCount() < LeafCount) {
// Found space on the previous page
if (pos == 0) {
temp->insert(temp->getCount(), item);
}
else {
temp->insert(temp->getCount(), (*leaf)[0]);
leaf->remove(0);
leaf->insert(pos-1, item);
}
return true;
}
// Nearby pages are also full. We need to add one more leaf page to the list
// This shouldn't happen very often. Traverse tree up trying to add node
// No re-enterance allowed !!!
// Since we haven't done anything with tree yet, thus we don't need to recover
// anything in case of error thrown at this allocation here
ItemList *newLeaf = new(this->pool->allocate(sizeof(ItemList))) ItemList(leaf);
// Start building recovery map.
// This array contains index of the element we try to add on page of each level
// -1 means that element is on new page
// In case of low memory condition we use this data to recover to innocent state
int recovery_map[MAX_TREE_LEVEL];
if (pos == LeafCount) {
newLeaf->insert(0,item);
recovery_map[0] = -1;
}
else {
newLeaf->insert(0, (*leaf)[LeafCount-1]);
leaf->shrink(leaf->getCount()-1);
leaf->insert(pos, item);
recovery_map[0] = pos;
}
void *newNode = newLeaf;
NodeList *nodeList = leaf->parent;
int curLevel = 0;
try {
while (nodeList) {
// Easy case. We've got some space on the node page
if (nodeList->getCount() < NodeCount) {
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->add(newNode);
return true;
}
// Page is full. Look up nearby pages for space if possible
nodeList->find(NodeList::generate(nodeList, newNode), pos);
NodeList *list;
if ((list = nodeList->next) && list->getCount() < NodeCount) {
// Found space on the next page
if (pos == NodeCount) {
NodeList::setNodeParentAndLevel(newNode, curLevel, list);
list->insert(0, newNode);
}
else {
void *t = (*nodeList)[NodeCount-1];
NodeList::setNodeParent(t, curLevel, list);
list->insert(0, t);
nodeList->shrink(NodeCount-1);
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->insert(pos, newNode);
}
return true;
}
if ((list = nodeList->prev) && list->getCount() < NodeCount) {
// Found space on the previous page
if (pos == 0) {
NodeList::setNodeParentAndLevel(newNode, curLevel, list);
list->insert(list->getCount(), newNode);
}
else {
void *t = (*nodeList)[0];
NodeList::setNodeParent(t, curLevel, list);
list->insert(list->getCount(), t);
nodeList->remove(0);
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->insert(pos-1, newNode);
}
return true;
}
// No space found. Allocate NodeList page and climb up the tree
// No re-enterance allowed !!!
// Exceptions from this point
// are cleaned up lower
NodeList *newList = new(this->pool->allocate(sizeof(NodeList))) NodeList(nodeList);
if (pos == NodeCount) {
NodeList::setNodeParentAndLevel(newNode, curLevel, newList);
newList->insert(0, newNode);
recovery_map[curLevel+1] = -1;
}
else {
void *t = (*nodeList)[NodeCount-1];
NodeList::setNodeParent(t, curLevel, newList);
newList->insert(0, t);
nodeList->shrink(NodeCount-1);
NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList);
nodeList->insert(pos, newNode);
recovery_map[curLevel+1] = pos;
}
newNode = newList;
nodeList = nodeList->parent;
curLevel++;
}
// This is the worst case. We reached the top of tree but were not able to insert node
// Allocate new root page and increase level of our tree
nodeList = new(this->pool->allocate(sizeof(NodeList))) NodeList();
nodeList->level = this->level;
nodeList->insert(0, this->root);
NodeList::setNodeParentAndLevel(newNode, this->level, nodeList);
NodeList::setNodeParent(this->root, this->level, nodeList);
nodeList->add(newNode);
this->root = nodeList;
this->level++;
} catch(const std::exception&) {
// Recover tree to innocent state
while (curLevel) {
NodeList *item = reinterpret_cast<NodeList*>(newNode);
void *lower;
if (recovery_map[curLevel] < 0) {
lower = (*item)[0];
} else {
lower = (*item->prev)[recovery_map[curLevel]];
item->prev->remove(recovery_map[curLevel]);
item->prev->insert(item->prev->getCount(), (*item)[0]);
NodeList::setNodeParent((*item)[0], curLevel-1, item->prev);
}
item->~NodeList();
this->pool->deallocate(newNode);
newNode = lower;
curLevel--;
}
ItemList *item = reinterpret_cast<ItemList*>(newNode);
if (recovery_map[0] >= 0) {
item->prev->remove(recovery_map[0]);
item->prev->insert(item->prev->getCount(), (*item)[0]);
}
item->~ItemList();
this->pool->deallocate(newNode);
throw;
}
return true;
}
template <typename Value, typename Key, typename Allocator, typename KeyOfValue, typename Cmp, int LeafCount, int NodeCount>
void BePlusTree<Value, Key, Allocator, KeyOfValue, Cmp, LeafCount, NodeCount>::_removePage(int nodeLevel, void *node)
{
@ -616,7 +644,7 @@ void BePlusTree<Value, Key, Allocator, KeyOfValue, Cmp, LeafCount, NodeCount>::_
else
{
int pos;
#ifdef NDEBUG
#ifndef DEV_BUILD
list->find(NodeList::generate(list,node),pos);
#else
bool found = list->find(NodeList::generate(list,node),pos);

View File

@ -30,6 +30,7 @@
#include "firebird.h"
#include "../../common/classes/alloc.h"
#include "../../common/classes/auto.h"
#include "../../common/config/config_file.h"
#include "../jrd/os/fbsyslog.h"

View File

@ -33,7 +33,7 @@ class DsqlMemoryPool : public MemoryPool
{
protected:
// Dummy constructor and destructor. Should never be called
DsqlMemoryPool() : MemoryPool(NULL, NULL), lls_cache(*this) {}
DsqlMemoryPool() : MemoryPool(NULL, default_stats_group, NULL, NULL), lls_cache(*this) {}
~DsqlMemoryPool() {}
public:
static DsqlMemoryPool* createPool();

View File

@ -28,7 +28,7 @@
* Contributor(s):
*
*
* $Id: keywords.cpp,v 1.28 2004-03-07 07:58:27 robocop Exp $
* $Id: keywords.cpp,v 1.29 2004-03-25 23:12:43 skidder Exp $
*
*/
@ -320,6 +320,8 @@ static const TOK tokens[] = {
MOD 29-June-2002
*/
extern "C" {
bool KEYWORD_stringIsAToken(const char* in_str)
{
const TOK* tok_ptr = tokens;
@ -337,3 +339,4 @@ const TOK* KEYWORD_getTokens()
return tokens;
}
}

View File

@ -31,6 +31,9 @@ typedef struct tok {
USHORT tok_version;
} TOK;
// These symbols are exported
extern "C" {
bool KEYWORD_stringIsAToken(const char*);
const TOK* KEYWORD_getTokens();
}

View File

@ -30,7 +30,7 @@
* John Bellardo <bellardo@cs.ucsd.edu>
*
*
* $Id: firebird.h,v 1.17 2003-12-31 05:35:43 robocop Exp $
* $Id: firebird.h,v 1.18 2004-03-25 23:12:44 skidder Exp $
*
*/
@ -75,9 +75,5 @@
#define NULL 0L
#endif
#if defined __cplusplus && (defined __GNUC__ && !defined(MINGW))
#include "../common/classes/alloc.h"
#endif
#endif /* INCLUDE_Firebird */

View File

@ -210,6 +210,9 @@
/* Support databases on Raw Devices (UNIX only) */
#undef SUPPORT_RAW_DEVICES
/* Support for ISO syntax for thread-local data */
#undef HAVE___THREAD
/* Inet service name and port */
#define FB_SERVICE_NAME "gds_db"
#define FB_SERVICE_PORT 3050

View File

@ -119,32 +119,30 @@ void ALL_check_memory()
#endif /* DEV_BUILD */
JrdMemoryPool *JrdMemoryPool::createPool(int *cur_mem, int *max_mem) {
Database* dbb = GET_DBB;
JrdMemoryPool* result = (JrdMemoryPool *)internal_create(sizeof(JrdMemoryPool),
cur_mem, max_mem);
JrdMemoryPool *JrdMemoryPool::createDbPool(Firebird::MemoryStats &stats) {
JrdMemoryPool* result = (JrdMemoryPool *)internal_create(
sizeof(JrdMemoryPool), NULL, stats);
result->plb_buckets = NULL;
result->plb_segments = NULL;
result->plb_dccs = NULL;
new (&result->lls_cache) BlockCache<lls> (*result);
if (dbb)
dbb->dbb_pools.push_back(result);
return result;
}
JrdMemoryPool *JrdMemoryPool::createPool() {
Database* dbb = GET_DBB;
fb_assert(dbb);
#ifdef SUPERSERVER
JrdMemoryPool* result = (JrdMemoryPool *)internal_create(sizeof(JrdMemoryPool),
(int*)&dbb->dbb_current_memory, (int*)&dbb->dbb_max_memory);
dbb->dbb_permanent, dbb->dbb_memory_stats);
#else
JrdMemoryPool *result = (JrdMemoryPool *)internal_create(sizeof(JrdMemoryPool));
JrdMemoryPool *result = (JrdMemoryPool *)internal_create(sizeof(JrdMemoryPool), dbb->dbb_permanent);
#endif
result->plb_buckets = NULL;
result->plb_segments = NULL;
result->plb_dccs = NULL;
new (&result->lls_cache) BlockCache<lls> (*result);
if (dbb)
dbb->dbb_pools.push_back(result);
return result;
}

View File

@ -53,10 +53,10 @@ class JrdMemoryPool : public MemoryPool
{
protected:
// Dummy constructor and destructor. Should never be called
JrdMemoryPool() : MemoryPool(NULL, NULL), lls_cache(*this) {}
JrdMemoryPool() : MemoryPool(NULL, default_stats_group, NULL, NULL), lls_cache(*this) {}
~JrdMemoryPool() {}
public:
static JrdMemoryPool *createPool(int *cur_mem, int *max_mem);
static JrdMemoryPool *createDbPool(Firebird::MemoryStats &stats);
static JrdMemoryPool *createPool();
static void deletePool(JrdMemoryPool* pool);
static void noDbbDeletePool(JrdMemoryPool* pool);

View File

@ -21,9 +21,7 @@
*/
#include "firebird.h"
#include <algorithm>
#include "../common/config/config.h"
#include "../common/config/config_file.h"
#include "../jrd/os/path_utils.h"

View File

@ -269,19 +269,16 @@ static CLEAN cleanup_handlers = NULL;
static gds_msg* global_default_msg = NULL;
static bool initialized = false;
#ifdef DEBUG_GDS_ALLOC
void* API_ROUTINE gds__alloc_debug(SLONG size_request,
const TEXT* filename,
ULONG lineno)
{
return getDefaultMemoryPool()->allocate_nothrow(size_request, 0, filename, lineno);
}
#else
void* API_ROUTINE gds__alloc(SLONG size_request)
{
return getDefaultMemoryPool()->allocate_nothrow(size_request);
}
return getDefaultMemoryPool()->allocate_nothrow(size_request, 0
#ifdef DEBUG_GDS_ALLOC
, filename, lineno
#endif
);
}
ULONG API_ROUTINE gds__free(void* blk) {
getDefaultMemoryPool()->deallocate(blk);
@ -726,8 +723,6 @@ SINT64 API_ROUTINE isc_portable_integer(const UCHAR* ptr, SSHORT length)
return value;
}
#ifdef DEBUG_GDS_ALLOC
void API_ROUTINE gds_alloc_flag_unfreed(void *blk)
{
/**************************************
@ -745,11 +740,8 @@ void API_ROUTINE gds_alloc_flag_unfreed(void *blk)
// Skidder: Not sure we need to rework this routine.
// What we really need is to fix all memory leaks including very old.
}
#endif // DEBUG_GDS_ALLOC
#ifdef DEBUG_GDS_ALLOC
void API_ROUTINE gds_alloc_report(ULONG flags, const char* filename, int lineno)
{
/**************************************
@ -765,8 +757,6 @@ void API_ROUTINE gds_alloc_report(ULONG flags, const char* filename, int lineno)
**************************************/
// Skidder: Calls to this function must be replaced with MemoryPool::print_contents
}
#endif // DEBUG_GDS_ALLOC
/* CVC: See comment below. Basically, it provides the needed const correctness,
but throws away the const to make the callee happy, knowing that the callee
@ -3647,27 +3637,13 @@ void gds__trace_printer(void* arg, SSHORT offset, const TEXT* line)
gds__trace_raw(buffer);
}
#ifdef DEBUG_GDS_ALLOC
#undef gds__alloc
void* API_ROUTINE gds__alloc(SLONG size)
void* API_ROUTINE gds__alloc(SLONG size_request)
{
/**************************************
*
* g d s _ $ a l l o c (alternate debug entrypoint)
*
**************************************
*
* Functional description
*
* NOTE: This function should be the last in the file due to
* the undef of gds__alloc above.
*
* For modules not recompiled with DEBUG_GDS_ALLOC, this provides
* an entry point to malloc again.
*
**************************************/
return gds__alloc_debug(size, "-- Unknown --", 0);
}
return getDefaultMemoryPool()->allocate_nothrow(size_request, 0
#ifdef DEBUG_GDS_ALLOC
, __FILE__, __LINE__
#endif
);
}

View File

@ -27,6 +27,8 @@
#ifndef JRD_GDS_PROTO_H
#define JRD_GDS_PROTO_H
#include "../jrd/common.h"
#ifndef IB_PREFIX_TYPE
#define IB_PREFIX_TYPE 0
#define IB_PREFIX_LOCK_TYPE 1
@ -44,9 +46,6 @@ extern "C" {
#endif
#ifdef DEBUG_GDS_ALLOC
#define gds__alloc(s) gds__alloc_debug ((s),(TEXT*)__FILE__,(ULONG)__LINE__)
void* API_ROUTINE gds__alloc_debug(SLONG, const TEXT*, ULONG);
void API_ROUTINE gds_alloc_flag_unfreed(void*);
void API_ROUTINE gds_alloc_report(ULONG, const char*, int);
@ -58,12 +57,13 @@ void API_ROUTINE gds_alloc_report(ULONG, const char*, int);
#define ALLOC_check_each_call (1L << 4) /* Check memory integrity on each alloc/free call */
#define ALLOC_dont_check (1L << 5) /* Stop checking integrity on each call */
#else /* DEBUG_GDS_ALLOC */
void* API_ROUTINE gds__alloc(SLONG);
#ifdef DEBUG_GDS_ALLOC
#define gds__alloc(s) gds__alloc_debug ((s),(TEXT*)__FILE__,(ULONG)__LINE__)
#endif /* DEBUG_GDS_ALLOC */
ISC_STATUS API_ROUTINE gds__decode(ISC_STATUS, USHORT*, USHORT*);
void API_ROUTINE isc_decode_date(const ISC_QUAD*, void*);
void API_ROUTINE isc_decode_sql_date(const GDS_DATE*, void*);

View File

@ -321,19 +321,19 @@ int INF_database_info(const SCHAR* items,
#ifdef SUPERSERVER
case isc_info_current_memory:
length = INF_convert(dbb->dbb_current_memory, buffer);
length = INF_convert(dbb->dbb_memory_stats.get_current_usage(), buffer);
break;
case isc_info_max_memory:
length = INF_convert(dbb->dbb_max_memory, buffer);
length = INF_convert(dbb->dbb_memory_stats.get_maximum_usage(), buffer);
break;
#else
case isc_info_current_memory:
length = INF_convert(MemoryPool::process_current_memory, buffer);
length = INF_convert(MemoryPool::default_stats_group.get_current_usage(), buffer);
break;
case isc_info_max_memory:
length = INF_convert(MemoryPool::process_max_memory, buffer);
length = INF_convert(MemoryPool::default_stats_group.get_maximum_usage(), buffer);
break;
#endif

View File

@ -5501,12 +5501,12 @@ static Database* init(thread_db* tdbb,
try {
#ifdef SUPERSERVER
int cur_perm = 0, max_perm = 0;
JrdMemoryPool* perm = JrdMemoryPool::createPool(&cur_perm, &max_perm);
Firebird::MemoryStats temp_stats;
JrdMemoryPool* perm = JrdMemoryPool::createDbPool(temp_stats);
dbb = Database::newDbb(*perm);
perm->moveStats((int*)&dbb->dbb_current_memory, (int*)&dbb->dbb_max_memory);
perm->setStatsGroup(dbb->dbb_memory_stats);
#else
JrdMemoryPool* perm = JrdMemoryPool::createPool();
JrdMemoryPool* perm = JrdMemoryPool::createDbPool(MemoryPool::default_stats_group);
dbb = Database::newDbb(*perm);
#endif
//temp.blk_type = type_dbb;

View File

@ -234,8 +234,8 @@ public:
BlockingThread* dbb_update_que; /* Attachments waiting for update */
BlockingThread* dbb_free_btbs; /* Unused BlockingThread blocks */
SLONG dbb_current_memory;
SLONG dbb_max_memory;
Firebird::MemoryStats dbb_memory_stats;
SLONG dbb_reads;
SLONG dbb_writes;
SLONG dbb_fetches;
@ -1056,7 +1056,8 @@ extern Jrd::thread_db* gdbb;
? (PLATFORM_GET_THREAD_DATA) \
: (BUGCHECK (147), (PLATFORM_GET_THREAD_DATA))) \
: (PLATFORM_GET_THREAD_DATA))
#define CHECK_DBB(dbb) fb_assert ((dbb) && (MemoryPool::blk_type(dbb) == type_dbb) && ((dbb)->dbb_permanent->verify_pool()))
//#define CHECK_DBB(dbb) fb_assert ((dbb) && (MemoryPool::blk_type(dbb) == type_dbb) && ((dbb)->dbb_permanent->verify_pool()))
#define CHECK_DBB(dbb) fb_assert ((dbb) && (MemoryPool::blk_type(dbb) == type_dbb))
#define CHECK_TDBB(tdbb) fb_assert ((tdbb) && \
(((THDD)(tdbb))->thdd_type == THDD_TYPE_TDBB) && \
((!(tdbb)->tdbb_database)||MemoryPool::blk_type((tdbb)->tdbb_database) == type_dbb))

View File

@ -32,7 +32,7 @@
*
*/
/*
$Id: inet_server.cpp,v 1.34 2004-03-12 07:00:52 skidder Exp $
$Id: inet_server.cpp,v 1.35 2004-03-25 23:12:50 skidder Exp $
*/
#include "firebird.h"
#include "../jrd/ib_stdio.h"
@ -79,10 +79,6 @@ $Id: inet_server.cpp,v 1.34 2004-03-12 07:00:52 skidder Exp $
#endif
#ifdef WINDOWS_ROUTER
#define MAX_ARGS 6
#endif /* WINDOWS_ROUTER */
#ifdef VMS
#include <descrip.h>
#endif
@ -143,21 +139,13 @@ static void signal_sigpipe_handler(int);
#endif
static void set_signal(int, void (*)(int));
#ifdef WINDOWS_ROUTER
static int atov(UCHAR *, UCHAR **, SSHORT);
#endif /* WINDOWS_ROUTER */
static TEXT protocol[128];
static int INET_SERVER_start = 0;
static USHORT INET_SERVER_flag = 0;
#ifdef WINDOWS_ROUTER
int PASCAL WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
#else /* WINDOWS_ROUTER */
int CLIB_ROUTINE main( int argc, char** argv)
#endif /* WINDOWS_ROUTER */
extern "C" {
int CLIB_ROUTINE server_main( int argc, char** argv)
{
/**************************************
*
@ -185,19 +173,6 @@ int CLIB_ROUTINE main( int argc, char** argv)
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
#endif
#ifdef WINDOWS_ROUTER
/*
* Construct an argc, argv so we can use the old parse code.
*/
char* argv2[MAX_ARGS];
char** argv = argv2;
argv[0] = "IB_server";
int argc = 1 + atov(lpszCmdLine, argv + 1, MAX_ARGS - 1);
#endif /* WINDOWS_ROUTER */
#ifdef VMS
argc = VMS_parse(&argv, argc);
#endif
@ -438,12 +413,7 @@ int CLIB_ROUTINE main( int argc, char** argv)
if (multi_threaded)
SRVR_multi_thread(port, INET_SERVER_flag);
else
#ifdef WINDOWS_ROUTER
SRVR_WinMain(port, INET_SERVER_flag, hInstance, hPrevInstance,
nCmdShow);
#else
SRVR_main(port, INET_SERVER_flag);
#endif
#ifdef DEBUG_GDS_ALLOC
/* In Debug mode - this will report all server-side memory leaks
@ -463,59 +433,7 @@ int CLIB_ROUTINE main( int argc, char** argv)
exit(FINI_OK);
}
#ifdef WINDOWS_ROUTER
static int atov( UCHAR * str, UCHAR ** vec, SSHORT len)
{
/**************************************
*
* a t o v
*
**************************************
*
* Functional description
* Take a string and convert it to a vector.
* White space delineates, but things in quotes are
* kept together.
*
**************************************/
int i = 0, qt = 0, qq;
char *p1, *p2;
vec[0] = str;
for (p1 = p2 = str; i < len; i++) {
while (*p1 == ' ' || *p1 == '\t')
p1++;
while (qt || (*p1 != ' ' && *p1 != '\t')) {
qq = qt;
if (*p1 == '\'')
if (!qt)
qt = -1;
else if (qt == -1)
qt = 0;
if (*p1 == '"')
if (!qt)
qt = 1;
else if (qt == 1)
qt = 0;
if (*p1 == '\0' || *p1 == '\n') {
*p2++ = '\0';
vec[++i] = 0;
return i;
}
if (qq == qt)
*p2++ = *p1;
p1++;
}
p1++;
*p2++ = '\0';
vec[i + 1] = p2;
}
*p2 = '\0';
vec[i] = 0;
return i - 1;
}
#endif /* WINDOWS_ROUTER */
#ifdef VMS

View File

@ -33,11 +33,7 @@ extern "C" {
#endif
#ifdef WINDOWS_ROUTER
void SRVR_WinMain(rem_port*, USHORT, HINSTANCE, HINSTANCE, int);
#else /* WINDOWS_ROUTER */
void SRVR_main(rem_port*, USHORT);
#endif /* WINDOWS_ROUTER */
void SRVR_multi_thread(rem_port*, USHORT);
bool process_packet(rem_port*, PACKET *, PACKET *, rem_port**);

View File

@ -0,0 +1,15 @@
#include "firebird.h"
#include "../jrd/common.h"
#ifndef MINGW
extern "C" {
int CLIB_ROUTINE server_main( int argc, char** argv);
}
// This routine invokes server loop implemented in the shared library
int CLIB_ROUTINE main( int argc, char** argv) {
return server_main(argc, argv);
}
#endif