diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-12 09:25:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-12 09:25:27 +0100 |
commit | 69632c9c3291a7bb9d465495943aa1dbe12c5af2 (patch) | |
tree | 8d812de9c8ed5079a758a8010a4392e93f211458 /external | |
parent | 57205b9e853316832ee8ad8437c457bc0882d177 (diff) |
Revert "Update firebird to version 2.5.4"
This reverts commit e63673f8991492aaf814665f58435bc6884ca06d.
Diffstat (limited to 'external')
-rw-r--r-- | external/firebird/ExternalPackage_firebird.mk | 4 | ||||
-rw-r--r-- | external/firebird/ExternalProject_firebird.mk | 2 | ||||
-rw-r--r-- | external/firebird/UnpackedTarball_firebird.mk | 3 | ||||
-rw-r--r-- | external/firebird/firebird-configure-x86-64-macosx.patch.1 | 20 | ||||
-rw-r--r-- | external/firebird/firebird-cygwin-msvc.patch.1 | 25 | ||||
-rw-r--r-- | external/firebird/firebird-icu.patch.1 | 28 | ||||
-rw-r--r-- | external/firebird/firebird-macosx.patch.1 | 10 | ||||
-rw-r--r-- | external/firebird/firebird-no-open-temp-on-shutdown.patch.1 | 359 | ||||
-rw-r--r-- | external/firebird/firebird-vs2013.patch.1 | 11 |
9 files changed, 415 insertions, 47 deletions
diff --git a/external/firebird/ExternalPackage_firebird.mk b/external/firebird/ExternalPackage_firebird.mk index 3b921edfada3..98917f8ae0a1 100644 --- a/external/firebird/ExternalPackage_firebird.mk +++ b/external/firebird/ExternalPackage_firebird.mk @@ -14,9 +14,9 @@ $(eval $(call gb_ExternalPackage_use_external_project,firebird,firebird)) ifeq ($(OS)-$(COM),WNT-MSC) $(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/ifbembed.dll,gen/firebird/bin/ifbembed.dll)) else ifeq ($(OS),MACOSX) -$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbembed.dylib,gen/firebird/lib/libfbembed.dylib.2.5.4)) +$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbembed.dylib,gen/firebird/lib/libfbembed.dylib.2.5.2)) else ifeq ($(DISABLE_DYNLOADING),) -$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbembed.so.2.5,gen/firebird/lib/libfbembed.so.2.5.4)) +$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbembed.so.2.5,gen/firebird/lib/libfbembed.so.2.5.2)) endif $(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_SHARE_FOLDER)/firebird/firebird.msg,gen/firebird/firebird.msg)) diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk index f1dbb2fc7ba8..d2607f0e3ca2 100644 --- a/external/firebird/ExternalProject_firebird.mk +++ b/external/firebird/ExternalProject_firebird.mk @@ -63,6 +63,6 @@ $(call gb_ExternalProject_get_state_target,firebird,build): $(MAKE) firebird_embedded \ $(if $(filter MACOSX,$(OS)),&& $(PERL) \ $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ - $(gb_Package_SOURCEDIR_firebird)/gen/firebird/lib/libfbembed.dylib.2.5.4) \ + $(gb_Package_SOURCEDIR_firebird)/gen/firebird/lib/libfbembed.dylib.2.5.2) \ ) # vim: set noet sw=4 ts=4: diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk index abee5ec6e989..ee29b09f0fff 100644 --- a/external/firebird/UnpackedTarball_firebird.mk +++ b/external/firebird/UnpackedTarball_firebird.mk @@ -12,9 +12,11 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,firebird)) $(eval $(call gb_UnpackedTarball_set_tarball,firebird,$(FIREBIRD_TARBALL))) $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ + external/firebird/firebird-icu.patch.1 \ external/firebird/firebird-rpath.patch.0 \ external/firebird/firebird-c++11.patch.1 \ external/firebird/firebird-c++11replfn.patch.0 \ + external/firebird/firebird-no-open-temp-on-shutdown.patch.1 \ external/firebird/firebird.disable-ib-util-not-found.patch.1 \ )) @@ -28,7 +30,6 @@ endif ifeq ($(OS),MACOSX) $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/firebird-macosx.patch.1 \ - external/firebird/firebird-configure-x86-64-macosx.patch.1 \ )) endif # vim: set noet sw=4 ts=4: diff --git a/external/firebird/firebird-configure-x86-64-macosx.patch.1 b/external/firebird/firebird-configure-x86-64-macosx.patch.1 deleted file mode 100644 index eddd0fa6e600..000000000000 --- a/external/firebird/firebird-configure-x86-64-macosx.patch.1 +++ /dev/null @@ -1,20 +0,0 @@ ---- firebird.org/configure 2015-03-27 16:00:42.000000000 +0200 -+++ firebird/configure 2015-06-09 15:33:26.000000000 +0300 -@@ -2373,7 +2373,7 @@ - ;; - - i*86-*-darwin* | i*86_*-darwin*) -- MAKEFILE_PREFIX=darwin_i386 -+ MAKEFILE_PREFIX=darwin_x86_64 - MAKEFILE_POSTFIX=darwin - PLATFORM=DARWIN - INSTALL_PREFIX=darwin -@@ -2386,7 +2386,7 @@ - EDITLINE_FLG=Y - SHRLIB_EXT=dylib - ICU_PLATFORM=MacOSX -- CPU_TYPE=i386 -+ CPU_TYPE=x86_64 - ;; - - powerpc-*-darwin*) diff --git a/external/firebird/firebird-cygwin-msvc.patch.1 b/external/firebird/firebird-cygwin-msvc.patch.1 index 9c24ebf91d11..b563a1063a9a 100644 --- a/external/firebird/firebird-cygwin-msvc.patch.1 +++ b/external/firebird/firebird-cygwin-msvc.patch.1 @@ -422,10 +422,9 @@ unchanged: -case "$target" in +case "$host" in - x*64-*-darwin* | x*64_*-darwin*) + i*86-*-darwin*) + dnl MAKEFILE_PREFIX=darwin_i386 MAKEFILE_PREFIX=darwin_x86_64 - MAKEFILE_POSTFIX=darwin - @@ -112,7 +86,7 @@ amd64-*-freebsd* | x86_64*-*-freebsd* | x86_64*-*-k*bsd*-gnu) @@ -484,8 +483,8 @@ unchanged: [AC_DEFINE(WORKING_SEM_INIT,1,[Define this if sem_init() works on the platform]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) --AC_SEARCH_LIBS(sem_open, rt pthread)]) -+AC_SEARCH_LIBS(sem_open, rt pthread)]), +-AC_SEARCH_LIBS(sem_open, rt)]) ++AC_SEARCH_LIBS(sem_open, rt)], +[AC_DEFINE(WORKING_SEM_INIT,1,[Define this if sem_init() works on the platform]) +AC_MSG_RESULT(cross-compiling, assuming yes)]) fi @@ -660,15 +659,15 @@ unchanged: #include <io.h> // umask, close, lseek, read, open, _sopen #include <process.h> #include <sys/types.h> -@@ -122,7 +124,7 @@ +@@ -121,7 +123,7 @@ + #ifdef WIN_NT #include <shlobj.h> - #if _MSC_VER <= 1500 -#include <shfolder.h> +//#include <shfolder.h> - #endif #define _WINSOCKAPI_ #include <share.h> + #include "err_proto.h" unchanged: --- firebird.org/src/jrd/isc.cpp 2013-06-26 10:05:24.922009300 +0100 +++ firebird/src/jrd/isc.cpp 2013-06-29 10:38:56.698423800 +0100 @@ -715,12 +714,14 @@ unchanged: unchanged: --- firebird.org/src/jrd/os/win32/mod_loader.cpp 2013-06-26 10:05:25.006951300 +0100 +++ firebird/src/jrd/os/win32/mod_loader.cpp 2013-06-27 18:30:42.642374700 +0100 -@@ -95,6 +95,8 @@ +@@ -93,6 +93,10 @@ + "msvcr80.dll", + #elif _MSC_VER == 1500 "msvcr90.dll", - #elif _MSC_VER == 1600 - "msvcr100.dll", ++#elif _MSC_VER == 1600 ++ "mscvr100.dll", +#elif _MSC_VER == 1700 -+ "msvcr110.dll", ++ "mscvr110.dll", #else #error Specify CRT DLL name here ! #endif diff --git a/external/firebird/firebird-icu.patch.1 b/external/firebird/firebird-icu.patch.1 new file mode 100644 index 000000000000..6045ee19f0b0 --- /dev/null +++ b/external/firebird/firebird-icu.patch.1 @@ -0,0 +1,28 @@ +diff -ur firebird.org/builds/posix/Makefile.in.examples firebird/builds/posix/Makefile.in.examples +--- firebird.org/builds/posix/Makefile.in.examples 2013-06-21 20:47:17.047657633 +0100 ++++ firebird/builds/posix/Makefile.in.examples 2013-06-21 21:01:45.297638456 +0100 +@@ -53,10 +53,10 @@ + export PATH + + ifeq ($(PLATFORM),DARWIN) +-DYLD_LIBRARY_PATH := $(GEN_ROOT)/firebird/lib ++DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(GEN_ROOT)/firebird/lib + export DYLD_LIBRARY_PATH + else +-LD_LIBRARY_PATH := $(GEN_ROOT)/firebird/lib ++LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(GEN_ROOT)/firebird/lib + export LD_LIBRARY_PATH + endif + GPRE_FLAGS= -r -m -z -n +diff -ur firebird.org/builds/posix/Makefile.in.firebird firebird/builds/posix/Makefile.in.firebird +--- firebird.org/builds/posix/Makefile.in.firebird 2013-06-21 20:47:17.060657632 +0100 ++++ firebird/builds/posix/Makefile.in.firebird 2013-06-21 21:12:00.559624868 +0100 +@@ -44,7 +44,7 @@ + TEST_PATH = @FIREBIRD_BUILD_DIR@ + # Firebird libs path set at link time (-R) so do not override local requirements - nmcc 28/12/2002 + #LD_LIBRARY_PATH=$(RealFirebirdPath)/lib +-LD_LIBRARY_PATH=$(LIB) ++LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH):$(LIB) + + #export ISC_USER + #export ISC_PASSWORD diff --git a/external/firebird/firebird-macosx.patch.1 b/external/firebird/firebird-macosx.patch.1 index 8a492898f96e..42007d50a38f 100644 --- a/external/firebird/firebird-macosx.patch.1 +++ b/external/firebird/firebird-macosx.patch.1 @@ -21,7 +21,7 @@ +PLAT_CLASSIC_POST_TARGET= -PLAT_SUPER_PRE_TARGET=darwin_setup_framework --PLAT_SUPER_POST_TARGET=darwin_finish_ss_framework +-PLAT_SUPER_POST_TRAGET=darwin_finish_ss_framework +PLAT_SUPER_PRE_TARGET= +PLAT_SUPER_POST_TRAGET= @@ -65,7 +65,7 @@ diff -ur firebird.org/builds/posix/postfix.darwin firebird/builds/posix/postfix. mkdir -p $(FB_FW)/Resources/doc --- firebird.org/builds/posix/prefix.darwin_i386 +++ firebird/builds/posix/prefix.darwin_i386 -@@ -24,7 +24,7 @@ +@@ -19,7 +19,7 @@ # 4. for CFLAGS, CXXFLAGS, LDFLAGS export '-m32 -arch i386' # 5. export MACOSX_DEPLOYMENT_TARGET=10.6 @@ -74,19 +74,17 @@ diff -ur firebird.org/builds/posix/postfix.darwin firebird/builds/posix/postfix. export DYLD_LIBRARY_PATH MACOSX_DEPLOYMENT_TARGET=10.6 -@@ -32,9 +32,9 @@ +@@ -32,8 +32,8 @@ OS_ServerFiles=inet_server.cpp -PROD_FLAGS=-O1 -DDARWIN -pipe -p -MMD -fPIC -fno-common -arch i386 -mmacosx-version-min=10.6 -DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -arch i386 -mmacosx-version-min=10.6 --CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -fno-weak +PROD_FLAGS=-O1 -DDARWIN -pipe -p -MMD -fPIC -fno-common +DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -+CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden + CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -fno-weak EMBED_UTIL_TARGETS=gstat gds_relay gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr CLIENT_UTIL_TARGETS=gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print fbsvcmgr \ - fbtracemgr --- firebird.org/builds/posix/prefix.darwin_x86_64 +++ firebird/builds/posix/prefix.darwin_x86_64 @@ -19,7 +19,7 @@ diff --git a/external/firebird/firebird-no-open-temp-on-shutdown.patch.1 b/external/firebird/firebird-no-open-temp-on-shutdown.patch.1 new file mode 100644 index 000000000000..5ce748ca8e5d --- /dev/null +++ b/external/firebird/firebird-no-open-temp-on-shutdown.patch.1 @@ -0,0 +1,359 @@ +Only in firebird: Makefile +Only in firebird: build.log +diff -ur firebird.org/builds/posix/Makefile.in.client.gfix firebird/builds/posix/Makefile.in.client.gfix +--- firebird.org/builds/posix/Makefile.in.client.gfix 2014-07-03 13:40:07.000000000 +0200 ++++ firebird/builds/posix/Makefile.in.client.gfix 2014-07-03 13:45:17.000000000 +0200 +@@ -39,7 +39,8 @@ + @SET_MAKE@ + + +-GFIX_Other_Sources = jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp common/UtilSvc.cpp ++GFIX_Other_Sources = jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp common/UtilSvc.cpp \ ++ $(OS_SPECIFIC_Sources) + + GFIX_Files = alice_meta.epp alice.cpp exe.cpp tdr.cpp aliceMain.cpp + GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources) +diff -ur firebird.org/builds/posix/Makefile.in.client.util firebird/builds/posix/Makefile.in.client.util +--- firebird.org/builds/posix/Makefile.in.client.util 2014-07-03 13:40:07.000000000 +0200 ++++ firebird/builds/posix/Makefile.in.client.util 2014-07-03 13:45:17.000000000 +0200 +@@ -90,7 +90,7 @@ + $(FBCLASSES_MsgObjects) $(CLUMPLETS_Objects) $(FBCOMMON_ClientObjects) + + +-FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp ++FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp $(OS_SPECIFIC_Sources) + FBGUARD_Files = guard.cpp util.cpp + FBGUARD_Sources = $(addprefix utilities/guard/, $(FBGUARD_Files)) $(FBGUARD_Other_Sources) + FBGUARD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBGUARD_Sources)))) $(FBCLASSES_ClientObjects) +diff -ur firebird.org/builds/posix/Makefile.in.embed.gfix firebird/builds/posix/Makefile.in.embed.gfix +--- firebird.org/builds/posix/Makefile.in.embed.gfix 2014-07-03 13:40:07.000000000 +0200 ++++ firebird/builds/posix/Makefile.in.embed.gfix 2014-07-03 13:54:55.000000000 +0200 +@@ -43,7 +43,8 @@ + alice.cpp exe.cpp tdr.cpp aliceMain.cpp + + GFIX_Other_Sources += jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp \ +- common/UtilSvc.cpp ++ common/UtilSvc.cpp \ ++ $(OS_SPECIFIC_Sources) + + GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources) + GFIX_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GFIX_Sources)))) +Only in firebird/builds/posix: Makefile.in.embed.gfix.orig +Only in firebird/builds/posix: Makefile.in.embed.gfix.rej +Only in firebird/builds/posix: Makefile.in.embed.gfix~ +diff -ur firebird.org/builds/posix/Makefile.in.embed.util firebird/builds/posix/Makefile.in.embed.util +--- firebird.org/builds/posix/Makefile.in.embed.util 2014-07-03 13:40:07.000000000 +0200 ++++ firebird/builds/posix/Makefile.in.embed.util 2014-07-03 13:45:17.000000000 +0200 +@@ -103,7 +103,7 @@ + $(FBCLASSES_MsgObjects) $(CLUMPLETS_Objects) $(FBCOMMON_ClientObjects) + + +-FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp ++FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp $(OS_SPECIFIC_Sources) + FBGUARD_Files = guard.cpp util.cpp + FBGUARD_Sources = $(addprefix utilities/guard/, $(FBGUARD_Files)) $(FBGUARD_Other_Sources) + FBGUARD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBGUARD_Sources)))) $(FBCLASSES_ClientObjects) +diff -ur firebird.org/builds/posix/prefix.aix_powerpc_xlc firebird/builds/posix/prefix.aix_powerpc_xlc +--- firebird.org/builds/posix/prefix.aix_powerpc_xlc 2014-07-03 13:40:07.000000000 +0200 ++++ firebird/builds/posix/prefix.aix_powerpc_xlc 2014-07-03 13:45:17.000000000 +0200 +@@ -118,7 +118,7 @@ + common/classes/MsgPrint.cpp common/classes/SafeArg.cpp \ + common/classes/BaseStream.cpp common/classes/fb_string.cpp \ + common/classes/TempFile.cpp \ +- jrd/gds.cpp jrd/isc.cpp \ ++ jrd/gds.cpp jrd/isc.cpp $(OS_SPECIFIC_Sources)\ + jrd/os/posix/path_utils.cpp jrd/os/posix/os_utils.cpp \ + jrd/os/posix/config_root.cpp jrd/os/posix/fbsyslog.cpp + +Only in firebird: config.log +Only in firebird: config.status +Only in firebird/extern/btyacc: btyacc +Only in firebird: gen +Only in firebird: libtool +Only in firebird/src/dsql: dsql.tab.h +Only in firebird/src/dsql: parse.cpp +Only in firebird/src/gpre: gpre_meta.cpp +Only in firebird/src/include/gen: autoconfig.h +Only in firebird/src/include/gen: blrtable.h +diff -ur firebird.org/src/jrd/gds.cpp firebird/src/jrd/gds.cpp +--- firebird.org/src/jrd/gds.cpp 2014-07-03 13:40:08.000000000 +0200 ++++ firebird/src/jrd/gds.cpp 2014-07-03 13:45:17.000000000 +0200 +@@ -200,8 +200,6 @@ + + static void sanitize(Firebird::string& locale); + +-static void safe_concat_path(TEXT* destbuf, const TEXT* srcbuf); +- + // New functions that try to be safe. + static SLONG safe_interpret(char* const s, const size_t bufsize, + const ISC_STATUS** const vector, bool legacy = false); +@@ -1734,7 +1732,7 @@ + GDS_init_prefix(); + + strcpy(resultString, fb_prefix); // safe - no BO +- safe_concat_path(resultString, file); ++ iscSafeConcatPath(resultString, file); + } + + +@@ -1755,12 +1753,7 @@ + GDS_init_prefix(); + + strcpy(string, fb_prefix_lock); // safe - no BO +- +- // if someone wants to know prefix for lock files, +- // sooner of all he wants that directory to exist +- os_utils::createLockDirectory(string); +- +- safe_concat_path(string, root); ++ iscSafeConcatPath(string, root); + } + + +@@ -1784,7 +1777,7 @@ + GDS_init_prefix(); + + strcpy(string, fb_prefix_msg); // safe - no BO +- safe_concat_path(string, root); ++ iscSafeConcatPath(string, root); + } + + +@@ -3553,43 +3546,6 @@ + } + } + +-static void safe_concat_path(TEXT *resultString, const TEXT *appendString) +-{ +-/************************************** +- * +- * s a f e _ c o n c a t _ p a t h +- * +- ************************************** +- * +- * Functional description +- * Safely appends appendString to resultString using paths rules. +- * resultString must be at most MAXPATHLEN size. +- * Thread/signal safe code. +- * +- **************************************/ +- size_t len = strlen(resultString); +- fb_assert(len > 0); +- +- if (resultString[len - 1] != PathUtils::dir_sep && len < MAXPATHLEN - 1) +- { +- resultString[len++] = PathUtils::dir_sep; +- resultString[len] = 0; +- } +- +- size_t alen = strlen(appendString); +- if (len + alen > MAXPATHLEN - 1) +- { +- alen = MAXPATHLEN - 1 - len; +- } +- +- fb_assert(len < MAXPATHLEN); +- fb_assert(alen < MAXPATHLEN); +- fb_assert(len + alen < MAXPATHLEN); +- +- memcpy(&resultString[len], appendString, alen); +- resultString[len + alen] = 0; +-} +- + + void FB_EXPORTED gds__default_printer(void* /*arg*/, SSHORT offset, const TEXT* line) + { +Only in firebird/src/jrd: gds.cpp.orig +diff -ur firebird.org/src/jrd/isc.cpp firebird/src/jrd/isc.cpp +--- firebird.org/src/jrd/isc.cpp 2014-07-03 13:40:08.000000000 +0200 ++++ firebird/src/jrd/isc.cpp 2014-07-03 13:45:17.000000000 +0200 +@@ -48,6 +48,8 @@ + #include "../jrd/gds_proto.h" + #include "../jrd/isc_proto.h" + #include "../jrd/jrd_proto.h" ++#include "../jrd/os/os_utils.h" ++#include "../jrd/os/path_utils.h" + + #include "../common/classes/init.h" + +@@ -632,3 +634,61 @@ + iscLogStatus(text, s); + } + ++ ++void iscPrefixLock(TEXT* string, const TEXT* root, bool createLockDir) ++{ ++/************************************** ++ * ++ * i s c P r e f i x L o c k ++ * ++ ************************************** ++ * ++ * Functional description ++ * Find appropriate Firebird lock file prefix. ++ * ++ **************************************/ ++ gds__prefix_lock(string, ""); ++ ++ if (createLockDir) ++ os_utils::createLockDirectory(string); ++ ++ iscSafeConcatPath(string, root); ++} ++ ++ ++void iscSafeConcatPath(TEXT *resultString, const TEXT *appendString) ++{ ++/************************************** ++ * ++ * i s c S a f e C o n c a t P a t h ++ * ++ ************************************** ++ * ++ * Functional description ++ * Safely appends appendString to resultString using paths rules. ++ * resultString must be at most MAXPATHLEN size. ++ * Thread/signal safe code. ++ * ++ **************************************/ ++ size_t len = strlen(resultString); ++ fb_assert(len > 0); ++ ++ if (resultString[len - 1] != PathUtils::dir_sep && len < MAXPATHLEN - 1) ++ { ++ resultString[len++] = PathUtils::dir_sep; ++ resultString[len] = 0; ++ } ++ ++ size_t alen = strlen(appendString); ++ if (len + alen > MAXPATHLEN - 1) ++ { ++ alen = MAXPATHLEN - 1 - len; ++ } ++ ++ fb_assert(len < MAXPATHLEN); ++ fb_assert(alen < MAXPATHLEN); ++ fb_assert(len + alen < MAXPATHLEN); ++ ++ memcpy(&resultString[len], appendString, alen); ++ resultString[len + alen] = 0; ++} +diff -ur firebird.org/src/jrd/isc_proto.h firebird/src/jrd/isc_proto.h +--- firebird.org/src/jrd/isc_proto.h 2014-07-03 13:40:08.000000000 +0200 ++++ firebird/src/jrd/isc_proto.h 2014-07-03 13:45:17.000000000 +0200 +@@ -44,4 +44,7 @@ + struct _SECURITY_ATTRIBUTES* ISC_get_security_desc(); + #endif + ++void iscPrefixLock(TEXT* string, const TEXT* root, bool createLockDir); ++void iscSafeConcatPath(TEXT *resultString, const TEXT *appendString); ++ + #endif // JRD_ISC_PROTO_H +diff -ur firebird.org/src/jrd/isc_sync.cpp firebird/src/jrd/isc_sync.cpp +--- firebird.org/src/jrd/isc_sync.cpp 2014-07-03 13:40:08.000000000 +0200 ++++ firebird/src/jrd/isc_sync.cpp 2014-07-03 13:45:17.000000000 +0200 +@@ -2296,7 +2296,7 @@ + { + #ifndef WIN_NT + TEXT expanded_filename[MAXPATHLEN]; +- gds__prefix_lock(expanded_filename, filename); ++ iscPrefixLock(expanded_filename, filename, false); + + // We can't do much (specially in dtors) when it fails + // therefore do not check for errors - at least it's just /tmp. +@@ -2332,7 +2332,7 @@ + **************************************/ + + TEXT expanded_filename[MAXPATHLEN]; +- gds__prefix_lock(expanded_filename, filename); ++ iscPrefixLock(expanded_filename, filename, true); + + /* make the complete filename for the init file this file is to be used as a + master lock to eliminate possible race conditions with just a single file +@@ -2340,7 +2340,7 @@ + lock to a LCK_SHARED lock is not atomic*/ + + TEXT init_filename[MAXPATHLEN]; +- gds__prefix_lock(init_filename, INIT_FILE); ++ iscPrefixLock(init_filename, INIT_FILE, true); + + const bool trunc_flag = (length != 0); + +@@ -2373,7 +2373,7 @@ + if (fdSem < 0) + { + TEXT sem_filename[MAXPATHLEN]; +- gds__prefix_lock(sem_filename, SEM_FILE); ++ iscPrefixLock(sem_filename, SEM_FILE, true); + const int f = openFile(sem_filename); + if (f == -1) + { +@@ -2554,7 +2554,7 @@ + int retry_count = 0; + + TEXT expanded_filename[MAXPATHLEN]; +- gds__prefix_lock(expanded_filename, filename); ++ iscPrefixLock(expanded_filename, filename, true); + + const bool trunc_flag = (length != 0); + bool init_flag = false; +@@ -4187,7 +4187,7 @@ + CloseHandle(shmem_data->sh_mem_hdr_object); + + TEXT expanded_filename[MAXPATHLEN]; +- gds__prefix_lock(expanded_filename, shmem_data->sh_mem_name); ++ iscPrefixLock(expanded_filename, shmem_data->sh_mem_name, false); + + // Delete file only if it is not used by anyone else + HANDLE hFile = CreateFile(expanded_filename, +Only in firebird/src/jrd: isc_sync.cpp.orig +diff -ur firebird.org/src/jrd/svc.cpp firebird/src/jrd/svc.cpp +--- firebird.org/src/jrd/svc.cpp 2014-07-03 13:40:08.000000000 +0200 ++++ firebird/src/jrd/svc.cpp 2014-07-03 13:45:17.000000000 +0200 +@@ -1360,7 +1360,7 @@ + gds__prefix(auxBuf, ""); + break; + case isc_info_svc_get_env_lock: +- gds__prefix_lock(auxBuf, ""); ++ iscPrefixLock(auxBuf, "", false); + break; + case isc_info_svc_get_env_msg: + gds__prefix_msg(auxBuf, ""); +@@ -1844,7 +1844,7 @@ + gds__prefix(PathBuffer, ""); + break; + case isc_info_svc_get_env_lock: +- gds__prefix_lock(PathBuffer, ""); ++ iscPrefixLock(PathBuffer, "", false); + break; + case isc_info_svc_get_env_msg: + gds__prefix_msg(PathBuffer, ""); +Only in firebird/src/jrd: svc.cpp.orig +diff -ur firebird.org/src/jrd/trace/TraceConfigStorage.cpp firebird/src/jrd/trace/TraceConfigStorage.cpp +--- firebird.org/src/jrd/trace/TraceConfigStorage.cpp 2014-07-03 13:40:08.000000000 +0200 ++++ firebird/src/jrd/trace/TraceConfigStorage.cpp 2014-07-03 13:45:17.000000000 +0200 +@@ -221,7 +221,7 @@ + fb_assert(m_base->cnt_uses == 0); + + char dir[MAXPATHLEN]; +- gds__prefix_lock(dir, ""); ++ iscPrefixLock(dir, "", true); + + PathName filename = TempFile::create("fb_trace_", dir); + filename.copyTo(cfg_file_name, sizeof(m_base->cfg_file_name)); +Only in firebird/src/jrd/trace: TraceConfigStorage.cpp.orig +diff -ur firebird.org/src/jrd/trace/TraceLog.cpp firebird/src/jrd/trace/TraceLog.cpp +--- firebird.org/src/jrd/trace/TraceLog.cpp 2014-07-03 13:40:08.000000000 +0200 ++++ firebird/src/jrd/trace/TraceLog.cpp 2014-07-03 13:45:17.000000000 +0200 +@@ -69,7 +69,7 @@ + } + + char dir[MAXPATHLEN]; +- gds__prefix_lock(dir, ""); ++ iscPrefixLock(dir, "", true); + PathUtils::concatPath(m_baseFileName, dir, fileName); + + TraceLogGuard guard(this); +Only in firebird/src/jrd/trace: TraceLog.cpp.orig +Only in firebird/src/misc: codes.cpp +Only in firebird: temp diff --git a/external/firebird/firebird-vs2013.patch.1 b/external/firebird/firebird-vs2013.patch.1 index b7f90d391a74..4b930d111f8b 100644 --- a/external/firebird/firebird-vs2013.patch.1 +++ b/external/firebird/firebird-vs2013.patch.1 @@ -1,11 +1,12 @@ ---- firebird/src/jrd/os/win32/mod_loader.cpp.orig 2015-06-05 07:18:34.639613335 +0300 -+++ firebird/src/jrd/os/win32/mod_loader.cpp 2015-06-05 07:41:08.383489041 +0300 +# -*- Mode: Diff -*- +--- firebird/src/jrd/os/win32/mod_loader.cpp ++++ firebird/src/jrd/os/win32/mod_loader.cpp @@ -97,6 +97,8 @@ - "msvcr100.dll", + "mscvr100.dll", #elif _MSC_VER == 1700 - "msvcr110.dll", + "mscvr110.dll", +#elif _MSC_VER == 1800 -+ "mscvr120.dll", ++ "mscvr120.dll", #else #error Specify CRT DLL name here ! #endif |