zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #16549
[Merge] lp:~zorba-coders/zorba/llvm into lp:zorba
William Candillon has proposed merging lp:~zorba-coders/zorba/llvm into lp:zorba.
Commit message:
Fix build with the following options:
- ZORBA_NO_ICU
- ZORBA_NO_XMLSCHEMA
- ZORBA_NO_FULLTEXT
- ZORBA_WITH_FILE_ACCESS=OFF
Requested reviews:
Paul J. Lucas (paul-lucas)
Matthias Brantner (matthias-brantner)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/llvm/+merge/141181
Fix build with the following options:
- ZORBA_NO_ICU
- ZORBA_NO_XMLSCHEMA
- ZORBA_NO_FULLTEXT
- ZORBA_WITH_FILE_ACCESS=OFF
--
https://code.launchpad.net/~zorba-coders/zorba/llvm/+merge/141181
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'bin/zorbacmd.cpp'
--- bin/zorbacmd.cpp 2012-11-06 10:11:37 +0000
+++ bin/zorbacmd.cpp 2012-12-23 12:55:26 +0000
@@ -622,6 +622,7 @@
void
removeOutputFileIfNeeded(const ZorbaCMDProperties& lProperties)
{
+#ifdef ZORBA_WITH_FILE_ACCESS
if (lProperties.outputFile().size() > 0)
{
File_t lFile = zorba::File::createFile(lProperties.outputFile());
@@ -630,6 +631,7 @@
lFile->remove();
}
}
+#endif
}
=== modified file 'src/api/CMakeLists.txt'
--- src/api/CMakeLists.txt 2012-12-05 03:33:46 +0000
+++ src/api/CMakeLists.txt 2012-12-23 12:55:26 +0000
@@ -46,7 +46,6 @@
invoke_item_sequence.cpp
item_sequence_chainer.cpp
empty_sequence.cpp
- fileimpl.cpp
serializerimpl.cpp
base64impl.cpp
base64_streambuf.cpp
@@ -63,6 +62,10 @@
uuid.cpp
)
+IF (ZORBA_WITH_FILE_ACCESS)
+ LIST(APPEND API_SRCS fileimpl.cpp)
+ENDIF (ZORBA_WITH_FILE_ACCESS)
+
IF (NOT ZORBA_NO_FULL_TEXT)
LIST(APPEND API_SRCS
stemmer.cpp
=== modified file 'src/api/staticcontextimpl.cpp'
--- src/api/staticcontextimpl.cpp 2012-10-10 21:15:05 +0000
+++ src/api/staticcontextimpl.cpp 2012-12-23 12:55:26 +0000
@@ -39,6 +39,7 @@
#include "api/staticcollectionmanagerimpl.h"
#include "api/vectoriterator.h"
+#include "context/dynamic_context.h"
#include "context/static_context.h"
#include "context/static_context_consts.h"
#ifndef ZORBA_NO_FULL_TEXT
@@ -59,10 +60,10 @@
#include "types/typeops.h"
#include "diagnostics/xquery_diagnostics.h"
+#include "diagnostics/assert.h"
#include "runtime/util/flowctl_exception.h"
-
namespace zorba {
/*******************************************************************************
=== modified file 'src/compiler/expression/expr_manager.cpp'
--- src/compiler/expression/expr_manager.cpp 2012-10-26 07:13:42 +0000
+++ src/compiler/expression/expr_manager.cpp 2012-12-23 12:55:26 +0000
@@ -813,7 +813,7 @@
CREATE_AND_RETURN_EXPR(function_item_expr, sctx, udf, loc);
}
-
+#ifndef ZORBA_NO_FULL_TEXT
ftcontains_expr* ExprManager::create_ftcontains_expr(
static_context* sctx,
user_function* udf,
@@ -824,7 +824,7 @@
{
CREATE_AND_RETURN_EXPR(ftcontains_expr, sctx, udf, loc, range, ftselection, ftignore);
}
-
+#endif
////////////////////////////////////////////////////////////////////////////////
=== modified file 'src/compiler/expression/expr_manager.h'
--- src/compiler/expression/expr_manager.h 2012-10-26 07:13:42 +0000
+++ src/compiler/expression/expr_manager.h 2012-12-23 12:55:26 +0000
@@ -495,6 +495,7 @@
user_function* udf,
const QueryLoc& loc);
+#ifndef ZORBA_NO_FULL_TEXT
ftcontains_expr* create_ftcontains_expr(
static_context*,
user_function* udf,
@@ -502,6 +503,7 @@
expr* range,
ftnode* ftselection,
expr* ftignore);
+#endif
////////////////////////////////////////////////////////////////////////////////
=== modified file 'src/compiler/parsetree/parsenode_print_xml_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2012-09-19 21:16:15 +0000
+++ src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2012-12-23 12:55:26 +0000
@@ -323,7 +323,6 @@
void *begin_visit(const SchemaImport &n)
{
-#ifndef ZORBA_NO_XMLSCHEMA
INDENT;
os << "<SchemaImport" << IDS;
@@ -332,9 +331,6 @@
INDENT_INC; NL;
return no_state;
-#else
- throw XQUERY_EXCEPTION(err::XQST0009);
-#endif
}
void *begin_visit (const URILiteralList &n)
=== modified file 'src/context/default_url_resolvers.cpp'
--- src/context/default_url_resolvers.cpp 2012-11-06 10:11:37 +0000
+++ src/context/default_url_resolvers.cpp 2012-12-23 12:55:26 +0000
@@ -113,12 +113,14 @@
if (lScheme != uri::file) {
return NULL;
}
- zstring lPath = fs::get_normalized_path(aUrl);
+#ifdef ZORBA_WITH_FILE_ACCESS
+ zstring lPath = fs::get_normalized_path(aUrl);
if (fs::get_type(lPath) == fs::file) {
std::ifstream* lStream = new std::ifstream(lPath.c_str());
return new StreamResource(
lStream, &fileStreamReleaser, "", true /* seekable */);
}
+#endif
return NULL;
}
=== modified file 'src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp'
--- src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp 2012-12-23 12:55:26 +0000
@@ -205,7 +205,7 @@
throw XQUERY_EXCEPTION(
err::XQDY0027,
ERROR_PARAMS(lSb.str()),
- ERROR_LOC( loc ));
+ ERROR_LOC( aLoc ));
}
#endif
}
@@ -220,7 +220,7 @@
throw XQUERY_EXCEPTION(
err::XQDY0027,
ERROR_PARAMS(lSb.str()),
- ERROR_LOC( loc ));
+ ERROR_LOC( aLoc ));
}
#endif
}
=== modified file 'src/types/typemanagerimpl.cpp'
--- src/types/typemanagerimpl.cpp 2012-10-08 12:09:36 +0000
+++ src/types/typemanagerimpl.cpp 2012-12-23 12:55:26 +0000
@@ -1093,7 +1093,7 @@
case IdentTypes::EMPTY_TYPE:
return create_empty_type();
-
+#ifndef ZORBA_NO_XMLSCHEMA
case IdentTypes::SCHEMA_ELEMENT_TYPE:
{
store::Item_t ename;
@@ -1119,7 +1119,7 @@
q,
QueryLoc::null);
}
-
+#endif
default:
break;
}
=== modified file 'src/unit_tests/test_fs_iterator.cpp'
--- src/unit_tests/test_fs_iterator.cpp 2012-04-22 15:49:55 +0000
+++ src/unit_tests/test_fs_iterator.cpp 2012-12-23 12:55:26 +0000
@@ -31,6 +31,7 @@
int test_fs_iterator( int argc, char *argv[] ) {
int result = 0;
+#ifdef ZORBA_WITH_FILE_ACCESS
try {
#ifndef WIN32
fs::iterator dir_iter( "/" );
@@ -44,7 +45,7 @@
cerr << e << endl;
result = 2;
}
-
+#endif
return result;
}
=== modified file 'src/util/file.cpp'
--- src/util/file.cpp 2012-09-19 21:16:15 +0000
+++ src/util/file.cpp 2012-12-23 12:55:26 +0000
@@ -319,6 +319,7 @@
#ifndef _WIN32_WCE
void file::chdir() {
+#ifdef ZORBA_WITH_FILE_ACCESS
if ( is_directory() ) {
try {
fs::chdir( c_str() );
@@ -327,6 +328,7 @@
throw ZORBA_IO_EXCEPTION( e.function(), e.path() );
}
}
+#endif
}
#endif
=== modified file 'src/util/regex_xquery.cpp'
--- src/util/regex_xquery.cpp 2012-09-19 21:16:15 +0000
+++ src/util/regex_xquery.cpp 2012-12-23 12:55:26 +0000
@@ -21,9 +21,11 @@
#include "regex_xquery.h"
#include <string.h>
#include "zorbatypes/chartype.h"
+#include "util/utf8_util_base.h"
#include "util/unicode_categories.h"
#include "util/ascii_util.h"
#include "util/utf8_string.h"
+#include "util/utf8_util.h"
namespace zorba {
namespace regex_xquery{
Follow ups