summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-13 17:04:54 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-13 17:04:54 (GMT)
commit5342ef51367116726454ebdbd4bc27f0de3354b2 (patch)
tree506ee7b8ce873b6024baf59b3cafecc4fb3c9770 /src
parentf52a7dce4ada921094ab6bff7df7faa81d7a3924 (diff)
downloaduscxml-5342ef51367116726454ebdbd4bc27f0de3354b2.zip
uscxml-5342ef51367116726454ebdbd4bc27f0de3354b2.tar.gz
uscxml-5342ef51367116726454ebdbd4bc27f0de3354b2.tar.bz2
Windows port compiles again
Diffstat (limited to 'src')
-rw-r--r--src/bindings/swig/php/uscxmlNativePHP.php2
-rw-r--r--src/uscxml/concurrency/tinythread.h1
-rw-r--r--src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp42
-rw-r--r--src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp11
4 files changed, 27 insertions, 29 deletions
diff --git a/src/bindings/swig/php/uscxmlNativePHP.php b/src/bindings/swig/php/uscxmlNativePHP.php
index eb66b3d..25ce9fa 100644
--- a/src/bindings/swig/php/uscxmlNativePHP.php
+++ b/src/bindings/swig/php/uscxmlNativePHP.php
@@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.9
+ * Version 2.0.7
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
diff --git a/src/uscxml/concurrency/tinythread.h b/src/uscxml/concurrency/tinythread.h
index 9dd2fcb..71edf6c 100644
--- a/src/uscxml/concurrency/tinythread.h
+++ b/src/uscxml/concurrency/tinythread.h
@@ -59,6 +59,7 @@ freely, subject to the following restrictions:
#if !defined(_TTHREAD_PLATFORM_DEFINED_)
#if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
#define _TTHREAD_WIN32_
+#include <boost/cstdint.hpp>
#else
#define _TTHREAD_POSIX_
#endif
diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
index 6f28464..8f7e5e9 100644
--- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
@@ -188,16 +188,16 @@ bool XPathDataModel::evalAsBool(const std::string& expr) {
std::string XPathDataModel::evalAsString(const std::string& expr) {
XPathValue<std::string> result = _xpath.evaluate_expr(expr, _doc);
switch (result.type()) {
- case STRING:
+ case Arabica::XPath::STRING:
return result.asString();
break;
- case BOOL:
+ case Arabica::XPath::BOOL:
return (result.asBool() ? "true" : "false");
break;
- case NUMBER:
+ case Arabica::XPath::NUMBER:
return toStr(result.asNumber());
break;
- case NODE_SET: {
+ case Arabica::XPath::NODE_SET: {
NodeSet<std::string> nodeSet = result.asNodeSet();
std::stringstream ss;
for (int i = 0; i < nodeSet.size(); i++) {
@@ -206,7 +206,7 @@ std::string XPathDataModel::evalAsString(const std::string& expr) {
return ss.str();
break;
}
- case ANY:
+ case Arabica::XPath::ANY:
throw Event("error.execution", Event::PLATFORM);
break;
}
@@ -369,19 +369,19 @@ void XPathDataModel::assign(XPathValue<std::string>& key,
const XPathValue<std::string>& value,
const Arabica::DOM::Element<std::string>& assignElem) {
switch (value.type()) {
- case STRING:
+ case Arabica::XPath::STRING:
assign(key, value.asString(), assignElem);
break;
- case BOOL:
+ case Arabica::XPath::BOOL:
assign(key, value.asBool(), assignElem);
break;
- case NUMBER:
+ case Arabica::XPath::NUMBER:
assign(key, value.asNumber(), assignElem);
break;
- case NODE_SET:
+ case Arabica::XPath::NODE_SET:
assign(key, value.asNodeSet(), assignElem);
break;
- case ANY:
+ case Arabica::XPath::ANY:
throw Event("error.execution", Event::PLATFORM);
}
}
@@ -390,7 +390,7 @@ void XPathDataModel::assign(XPathValue<std::string>& key,
const std::string& value,
const Arabica::DOM::Element<std::string>& assignElem) {
switch (key.type()) {
- case NODE_SET: {
+ case Arabica::XPath::NODE_SET: {
if (key.asNodeSet().size() == 0)
return;
for (int i = 0; i < key.asNodeSet().size(); i++) {
@@ -430,10 +430,10 @@ void XPathDataModel::assign(XPathValue<std::string>& key,
}
break;
}
- case STRING:
- case BOOL:
- case NUMBER:
- case ANY:
+ case Arabica::XPath::STRING:
+ case Arabica::XPath::BOOL:
+ case Arabica::XPath::NUMBER:
+ case Arabica::XPath::ANY:
throw Event("error.execution", Event::PLATFORM);
break;
default:
@@ -456,7 +456,7 @@ void XPathDataModel::assign(XPathValue<std::string>& key,
const NodeSet<std::string>& value,
const Arabica::DOM::Element<std::string>& assignElem) {
switch (key.type()) {
- case NODE_SET: {
+ case Arabica::XPath::NODE_SET: {
if (key.asNodeSet().size() == 0)
return;
for (int i = 0; i < key.asNodeSet().size(); i++) {
@@ -535,10 +535,10 @@ void XPathDataModel::assign(XPathValue<std::string>& key,
}
break;
}
- case STRING:
- case BOOL:
- case NUMBER:
- case ANY:
+ case Arabica::XPath::STRING:
+ case Arabica::XPath::BOOL:
+ case Arabica::XPath::NUMBER:
+ case Arabica::XPath::ANY:
throw Event("error.execution", Event::PLATFORM);
break;
}
@@ -574,7 +574,7 @@ bool XPathFunctionIn::doEvaluate(const Node<std::string>& context,
const ExecutionContext<std::string>& executionContext) const {
for (int i = 0; i < argCount(); i++) {
XPathValue<std::string> stateName = arg(i, context, executionContext);
- if (stateName.type() == STRING) {
+ if (stateName.type() == Arabica::XPath::STRING) {
if (!Interpreter::isMember(_interpreter->getState(stateName.asString()), _interpreter->getConfiguration())) {
return false;
}
diff --git a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp
index b2a16f3..882c174 100644
--- a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp
+++ b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp
@@ -275,23 +275,21 @@ void DirectoryWatch::updateEntries(bool reportAsExisting) {
hFind = FindFirstFile(szDir, &ffd);
do {
- string dname = ffd.cFileName;
+ std::string dname = ffd.cFileName;
#endif
// see if the file was changed
- char* filename;
- asprintf(&filename, "%s/%s", (_dir + _relDir).c_str(), dname.c_str());
+ std::string filename = _dir + _relDir + "/" + dname;
+// asprintf(&filename, "%s/%s", (_dir + _relDir).c_str(), dname.c_str());
struct stat fileStat;
- if (stat(filename, &fileStat) != 0) {
+ if (stat(filename.c_str(), &fileStat) != 0) {
LOG(ERROR) << "Error with stat on directory entry: " << filename << ": " << strerror(errno);
- free(filename);
continue;
}
if (fileStat.st_mode & S_IFDIR) {
if (boost::equals(dname, ".") || boost::equals(dname, "..")) {
- free(filename);
continue; // do not report . or ..
}
}
@@ -330,7 +328,6 @@ void DirectoryWatch::updateEntries(bool reportAsExisting) {
}
}
- free(filename);
_knownEntries[dname] = fileStat; // gets copied on insertion
#ifndef WIN32
}