configure.ac | 3 firebird/UnpackedTarball_firebird.mk | 4 firebird/firebird-c++11.patch.1 | 215 +++++++++++++++++++++++++++++++++++ firebird/firebird-macosx.patch.1 | 41 ++++-- 4 files changed, 247 insertions(+), 16 deletions(-)
New commits: commit becbe844a3ee14319d46717074ac4bd6b6b0da72 Author: Tor Lillqvist <[email protected]> Date: Wed Jul 17 11:04:29 2013 +0300 Correct help message for --disable-firebird-sdbc Change-Id: Ia05e09cff1a71237abc487a550dabacd39844c41 diff --git a/configure.ac b/configure.ac index 4ee8955..6c1d695 100644 --- a/configure.ac +++ b/configure.ac @@ -1171,8 +1171,7 @@ AC_ARG_ENABLE(lotuswordpro, AC_ARG_ENABLE(firebird-sdbc, AS_HELP_STRING([--disable-firebird-sdbc], - [Enable the build of the Firebird-SDBC driver. Work in progress, - use only if you are hacking on it.]), + [Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]), ,enable_firebird_sdbc=yes) AC_ARG_ENABLE(coretext, commit 9fe159ef7cb7cfe5c1c91a6fbf1aa02fe79fec69 Author: Tor Lillqvist <[email protected]> Date: Wed Jul 17 10:57:27 2013 +0300 Partial patch for C++11 compilation of the Firebird code Fixes for three classes of C++ errors (real errors, not warnings): "C++11 requires a space between literal and identifier", "non-constant-expression cannot be narrowed from type 'int' to 'size_t'" and "constant expression evaluates to -2147483648 which cannot be narrowed to type 'ULONG'". I didn't bother any more and just use --disable-firebird-sdbc instead now in the tree where I use Clang and C++11. Change-Id: Ie47e2ceef8e014c48e50f5afa5df6f625040974c diff --git a/firebird/UnpackedTarball_firebird.mk b/firebird/UnpackedTarball_firebird.mk index b474b00..8370f31 100644 --- a/firebird/UnpackedTarball_firebird.mk +++ b/firebird/UnpackedTarball_firebird.mk @@ -15,6 +15,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ firebird/firebird-icu.patch.1 \ )) +$(eval $(call gb_UnpackedTarball_add_patches,firebird,\ + firebird/firebird-c++11.patch.1 \ +)) + ifeq ($(OS)-$(COM),WNT-MSC) $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ firebird/firebird-cygwin-msvc.patch.1 \ diff --git a/firebird/firebird-c++11.patch.1 b/firebird/firebird-c++11.patch.1 new file mode 100644 index 0000000..e8cb52d --- /dev/null +++ b/firebird/firebird-c++11.patch.1 @@ -0,0 +1,215 @@ +# -*- Mode: Diff -*- +--- firebird/src/gpre/c_cxx.cpp ++++ firebird/src/gpre/c_cxx.cpp +@@ -876,7 +876,7 @@ + if (based_on->bas_flags & BAS_segment) + { + if (*variable != '*') +- fprintf(gpreGlob.out_file, "[%"SLONGFORMAT"]", length); ++ fprintf(gpreGlob.out_file, "[%" SLONGFORMAT "]", length); + } + else if (field->fld_array_info) + { +@@ -885,7 +885,7 @@ + for (const dim* dimension = field->fld_array_info->ary_dimension; + dimension; dimension = dimension->dim_next) + { +- fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1); ++ fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1); + } + + if (field->fld_array_info->ary_dtype <= dtype_varying && field->fld_length > 1) +@@ -1577,7 +1577,7 @@ + const gpre_dbb* db = (gpre_dbb*) action->act_object; + align(column); + +- fprintf(gpreGlob.out_file, "isc_drop_database (%s, %"SIZEFORMAT", \"%s\", rdb$k_db_type_gds);", ++ fprintf(gpreGlob.out_file, "isc_drop_database (%s, %" SIZEFORMAT ", \"%s\", rdb$k_db_type_gds);", + status_vector(action), + strlen(db->dbb_filename), db->dbb_filename); + set_sqlcode(action, column); +@@ -3471,7 +3471,7 @@ + + static void gen_type( const act* action, int column) + { +- printa(column, "%"SLONGFORMAT, (SLONG)(IPTR)action->act_object); ++ printa(column, "%" SLONGFORMAT, (SLONG)(IPTR)action->act_object); + } + + +@@ -3623,7 +3623,7 @@ + for (const dim* dimension = field->fld_array_info->ary_dimension; dimension; + dimension = dimension->dim_next) + { +- fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1); ++ fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1); + } + + if (field->fld_array_info->ary_dtype <= dtype_varying) +--- firebird/src/gpre/exp.cpp ++++ firebird/src/gpre/exp.cpp +@@ -398,7 +398,7 @@ + if (gpreGlob.token_global.tok_type != tok_number) + CPR_s_error("<number>"); + +- const char format[8] = "%"SQUADFORMAT; ++ const char format[8] = "%" SQUADFORMAT; + SINT64 n; + sscanf(gpreGlob.token_global.tok_string, format, &n); + +@@ -428,7 +428,7 @@ + + const SLONG n = atoi(gpreGlob.token_global.tok_string); + char buffer[32]; +- sprintf(buffer, "%"SLONGFORMAT, n); ++ sprintf(buffer, "%" SLONGFORMAT, n); + if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0) + PAR_error("Numeric value out of range"); + +@@ -478,7 +478,7 @@ + + const ULONG n = atoi(gpreGlob.token_global.tok_string); + char buffer[32]; +- sprintf(buffer, "%"ULONGFORMAT, n); ++ sprintf(buffer, "%" ULONGFORMAT, n); + if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0) + PAR_error("Numeric value out of range"); + +--- firebird/src/gpre/gpre.cpp ++++ firebird/src/gpre/gpre.cpp +@@ -2525,9 +2525,9 @@ + if (line_pending) + { + if (line == 1) +- fprintf(gpreGlob.out_file, "#line %"SLONGFORMAT" \"%s\"\n", line, backlash_fixed_file_name); ++ fprintf(gpreGlob.out_file, "#line %" SLONGFORMAT " \"%s\"\n", line, backlash_fixed_file_name); + else +- fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line, backlash_fixed_file_name); ++ fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line, backlash_fixed_file_name); + + line_pending = false; + } +@@ -2668,7 +2668,7 @@ + { + if (c == '\n' && line_pending) + { +- fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line + 1, backlash_fixed_file_name); ++ fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line + 1, backlash_fixed_file_name); + line_pending = false; + } + if (c == EOF) +--- firebird/src/gpre/int_cxx.cpp ++++ firebird/src/gpre/int_cxx.cpp +@@ -290,7 +290,7 @@ + fprintf(gpreGlob.out_file, "if (!%s)", request->req_handle); + align(column); + fprintf(gpreGlob.out_file, +- "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%"ULONGFORMAT", sizeof(jrd_%"ULONGFORMAT"), true);", ++ "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%" ULONGFORMAT ", sizeof(jrd_%" ULONGFORMAT "), true);", + request->req_handle, request->req_ident, request->req_ident); + } + +@@ -478,7 +478,7 @@ + { + + fprintf(gpreGlob.out_file, +- "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");", ++ "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");", + request->req_handle, port->por_msg_number, port->por_length, + port->por_ident); + } +@@ -495,7 +495,7 @@ + if (!(request->req_flags & REQ_exp_hand)) + fprintf(gpreGlob.out_file, "static void\t*%s;\t// request handle \n", request->req_handle); + +- fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%"ULONGFORMAT" [%d] =", ++ fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%" ULONGFORMAT " [%d] =", + request->req_ident, request->req_length); + align(INDENT); + fprintf(gpreGlob.out_file, "{\t// blr string \n"); +@@ -588,7 +588,7 @@ + } + align(column); + +- fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");", ++ fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");", + request->req_handle, port->por_msg_number, port->por_length, port->por_ident); + } + +@@ -716,7 +716,7 @@ + fprintf(gpreGlob.out_file, fmtstr, reference->ref_ident, name); + } + align(column); +- fprintf(gpreGlob.out_file, "} jrd_%"ULONGFORMAT";", port->por_ident); ++ fprintf(gpreGlob.out_file, "} jrd_%" ULONGFORMAT ";", port->por_ident); + } + + +--- firebird/src/gpre/pat.cpp ++++ firebird/src/gpre/pat.cpp +@@ -417,7 +417,7 @@ + } + } + else if (long_flag) { +- sprintf(p, "%"SLONGFORMAT, long_value); ++ sprintf(p, "%" SLONGFORMAT , long_value); + } + else { + sprintf(p, "%d", value); +--- firebird/src/common/classes/alloc.cpp ++++ firebird/src/common/classes/alloc.cpp +@@ -1100,7 +1100,7 @@ + if (blk->mbk_flags & MBK_LAST) + break; + } +- fprintf(file, "Blocks %"SIZEFORMAT" min %"SIZEFORMAT" max %"SIZEFORMAT" size %"SIZEFORMAT" \n\n", ++ fprintf(file, "Blocks %" SIZEFORMAT " min %" SIZEFORMAT " max %" SIZEFORMAT " size %" SIZEFORMAT " \n\n", + cnt, min, max, sum); + } + +@@ -1303,7 +1303,7 @@ + FreeMemoryBlock* freeBlock = blockToPtr<FreeMemoryBlock*>(blk); + freeBlock->fbk_next_fragment = NULL; + +- BlockInfo temp = {blockLength, freeBlock}; ++ BlockInfo temp = {static_cast<size_t>(blockLength), freeBlock}; + pool->freeBlocks.add(temp); + if (!pool->parent_redirect) + { +--- firebird/src/common/cvt.cpp ++++ firebird/src/common/cvt.cpp +@@ -144,7 +144,7 @@ + + #ifndef NATIVE_QUAD + #ifndef WORDS_BIGENDIAN +-static const SQUAD quad_min_int = { 0, SLONG_MIN }; ++static const SQUAD quad_min_int = { 0, static_cast<ULONG>(SLONG_MIN) }; + static const SQUAD quad_max_int = { -1, SLONG_MAX }; + #else + static const SQUAD quad_min_int = { SLONG_MIN, 0 }; +--- firebird/src/jrd/perf.cpp ++++ firebird/src/jrd/perf.cpp +@@ -164,20 +164,20 @@ + case 'b': + case 'c': + case 'x': +- sprintf(p, "%"SQUADFORMAT, delta); ++ sprintf(p, "%" SQUADFORMAT , delta); + while (*p) + p++; + break; + + case 'u': + case 's': +- sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / TICK, (delta % TICK) * 100 / TICK); ++ sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / TICK, (delta % TICK) * 100 / TICK); + while (*p) + p++; + break; + + case 'e': +- sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / 100, delta % 100); ++ sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / 100, delta % 100); + while (*p) + p++; + break; commit 83364ad1ec3850a519551c6ae32e63902599b6dc Author: Tor Lillqvist <[email protected]> Date: Wed Jul 17 10:17:52 2013 +0300 We already have the -mmacosx-version-min option we want in CXX No need to add a hardcoded -mmacosx-version-min=10.6 that overrides the switch in our CXX, especially as that causes a linking error when using libc++, as that requires OS X 10.7. Change-Id: Ieb0ccad7613fae793387e38be617e0cb6ac23d06 diff --git a/firebird/firebird-macosx.patch.1 b/firebird/firebird-macosx.patch.1 index 984003e8..a92b813 100644 --- a/firebird/firebird-macosx.patch.1 +++ b/firebird/firebird-macosx.patch.1 @@ -138,3 +138,29 @@ diff -ur firebird.org/builds/posix/postfix.darwin firebird/builds/posix/postfix. cp -r ../gen/firebird/help $(FB_FW)/Resources/English.lproj/var/help cp ../gen/firebird/security2.fdb $(FB_FW)/Resources/English.lproj/var mkdir -p $(FB_FW)/Resources/doc +--- firebird.org/builds/posix/prefix.darwin_i386 ++++ firebird/builds/posix/prefix.darwin_i386 +@@ -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 ++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 -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 \ +--- firebird.org/builds/posix/prefix.darwin_x86_64 ++++ firebird/builds/posix/prefix.darwin_x86_64 +@@ -27,8 +27,8 @@ + + OS_ServerFiles=inet_server.cpp + +-PROD_FLAGS=-O1 -DDARWIN -pipe -p -MMD -fPIC -fno-common -mmacosx-version-min=10.6 +-DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -mmacosx-version-min=10.6 ++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 -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 \ commit 09ed8830982f6947ee7fcb46a0ab7f4a68c41297 Author: Tor Lillqvist <[email protected]> Date: Wed Jul 17 09:47:04 2013 +0300 Add Emacs mode line Change-Id: I8c4632ff8e38340c1e5474d86ed5c5ab1212cd17 diff --git a/firebird/firebird-macosx.patch.1 b/firebird/firebird-macosx.patch.1 index 132b06f..984003e8 100644 --- a/firebird/firebird-macosx.patch.1 +++ b/firebird/firebird-macosx.patch.1 @@ -1,3 +1,4 @@ +# -*- Mode: Diff -*- diff -ur firebird.org/builds/posix/Makefile.in.codes firebird/builds/posix/Makefile.in.codes --- firebird.org/builds/posix/Makefile.in.codes 2013-07-12 20:55:46.000000000 +0200 +++ firebird/builds/posix/Makefile.in.codes 2013-07-15 11:43:26.000000000 +0200 commit 43287f3e7b0160a24220231abcadb3bb7da813c3 Author: Tor Lillqvist <[email protected]> Date: Wed Jul 17 09:46:04 2013 +0300 Bin "Only in" lines Change-Id: I65c77736c348078838382ab895749e7a63682fec diff --git a/firebird/firebird-macosx.patch.1 b/firebird/firebird-macosx.patch.1 index 5794a96..132b06f 100644 --- a/firebird/firebird-macosx.patch.1 +++ b/firebird/firebird-macosx.patch.1 @@ -1,5 +1,3 @@ -Only in firebird: Makefile -Only in firebird: build.log diff -ur firebird.org/builds/posix/Makefile.in.codes firebird/builds/posix/Makefile.in.codes --- firebird.org/builds/posix/Makefile.in.codes 2013-07-12 20:55:46.000000000 +0200 +++ firebird/builds/posix/Makefile.in.codes 2013-07-15 11:43:26.000000000 +0200 @@ -139,15 +137,3 @@ diff -ur firebird.org/builds/posix/postfix.darwin firebird/builds/posix/postfix. cp -r ../gen/firebird/help $(FB_FW)/Resources/English.lproj/var/help cp ../gen/firebird/security2.fdb $(FB_FW)/Resources/English.lproj/var mkdir -p $(FB_FW)/Resources/doc -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 -Only in firebird/src/misc: codes.cpp -Only in firebird: temp _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
