cxxtools: update to cxxtools-2.2. disable broken autoreconf

This commit is contained in:
Stefan Saraev 2013-10-06 14:40:02 +03:00
parent 184023138a
commit 4779a50864
6 changed files with 43 additions and 280 deletions

View File

@ -34,6 +34,7 @@ mkdir -p .build-host && cd .build-host
--disable-static \
--enable-shared \
--disable-demos \
--with-atomictype=pthread \
--disable-unittest
make
@ -55,6 +56,7 @@ mkdir -p .build-target && cd .build-target
--enable-static \
--disable-shared \
--disable-demos \
--with-atomictype=pthread \
--disable-unittest
$MAKEINSTALL

View File

@ -19,7 +19,7 @@
################################################################################
PKG_NAME="cxxtools"
PKG_VERSION="2.1.1"
PKG_VERSION="2.2"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL-2"
@ -33,4 +33,4 @@ PKG_SHORTDESC="cxxtools: a collection of general-purpose C++ classes"
PKG_LONGDESC="Cxxtools is a collection of general-purpose C++ classes"
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_AUTORECONF="no"

View File

@ -1,278 +0,0 @@
diff --git a/src/bin/formatter.cpp b/src/bin/formatter.cpp
index 020475e..516d145 100644
--- a/src/bin/formatter.cpp
+++ b/src/bin/formatter.cpp
@@ -218,7 +218,7 @@ void Formatter::addValueString(const std::string& name, const std::string& type,
if (type == "int")
{
- if (value.size() > 0 && (value[0] == L'-' || value[0] == L'+'))
+ if (value.size() > 0 && ( (int) value[0] == (int) L'-' || (int) value[0] == (int) L'+'))
{
int64_t v = convert<int64_t>(value);
printInt(*_out, v, name);
diff --git a/src/csvparser.cpp b/src/csvparser.cpp
index f9ee8dd..9d57dc8 100644
--- a/src/csvparser.cpp
+++ b/src/csvparser.cpp
@@ -76,23 +76,23 @@ void CsvParser::begin(DeserializerBase& handler)
void CsvParser::advance(Char ch)
{
- if (ch == L'\n')
+ if ( (int) ch == (int) L'\n')
++_lineNo;
switch (_state)
{
case state_detectDelim:
- if (isalnum(ch) || ch == L'_' || ch == ' ')
+ if (isalnum(ch) || (int) ch == (int) L'_' || (int) ch == (int) ' ')
{
_titles.back() += ch.narrow();
}
- else if (ch == L'\n' || ch == L'\r')
+ else if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
{
log_debug("title=\"" << _titles.back() << '"');
_noColumns = 1;
- _state = (ch == L'\r' ? state_cr : state_rowstart);
+ _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
}
- else if (ch == L'\'' || ch == L'"')
+ else if ( (int) ch == (int) L'\'' || (int) ch == (int) L'"')
{
_quote = ch;
_state = state_detectDelim_q;
@@ -119,17 +119,17 @@ void CsvParser::advance(Char ch)
break;
case state_detectDelim_postq:
- if (isalnum(ch) || ch == L'_' || ch == L'\'' || ch == L'"' || ch == L' ')
+ if (isalnum(ch) || (int) ch == (int) L'_' || (int) ch == (int) L'\'' || (int) ch == (int) L'"' || (int) ch == (int) L' ')
{
std::ostringstream msg;
msg << "invalid character '" << ch.narrow() << "' within csv title of column " << _titles.size();
SerializationError::doThrow(msg.str());
}
- else if (ch == L'\n' || ch == L'\r')
+ else if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
{
log_debug("title=\"" << _titles.back() << '"');
_noColumns = 1;
- _state = (ch == L'\r' ? state_cr : state_rowstart);
+ _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
}
else
{
@@ -142,10 +142,10 @@ void CsvParser::advance(Char ch)
break;
case state_title:
- if (ch == L'\n' || ch == L'\r')
+ if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
{
log_debug("title=\"" << _titles.back() << '"');
- _state = (ch == L'\r' ? state_cr : state_rowstart);
+ _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
_noColumns = _titles.size();
}
else if (ch == _delimiter)
@@ -153,7 +153,7 @@ void CsvParser::advance(Char ch)
log_debug("title=\"" << _titles.back() << '"');
_titles.push_back(std::string());
}
- else if (ch == '\'' || ch == '\"')
+ else if ( (int) ch == (int) '\'' || (int) ch == (int) '\"')
{
if (_titles.back().empty())
{
@@ -185,10 +185,10 @@ void CsvParser::advance(Char ch)
break;
case state_qtitlep:
- if (ch == L'\n' || ch == L'\r')
+ if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
{
log_debug("title=\"" << _titles.back() << '"');
- _state = (ch == L'\r' ? state_cr : state_rowstart);
+ _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
_noColumns = _titles.size();
}
else if (ch == _delimiter)
@@ -207,7 +207,7 @@ void CsvParser::advance(Char ch)
case state_cr:
_state = state_rowstart;
- if (ch == L'\n')
+ if ( (int) ch == (int) L'\n')
{
break;
}
@@ -228,14 +228,14 @@ void CsvParser::advance(Char ch)
_column < _titles.size() ? _titles[_column] : std::string(),
std::string(), SerializationInfo::Value);
- if (ch == L'\n' || ch == L'\r')
+ if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
{
_deserializer->leaveMember();
checkNoColumns(_column, _noColumns, _lineNo);
_deserializer->leaveMember();
- _state = (ch == L'\r' ? state_cr : state_rowstart);
+ _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
}
- else if (ch == L'"' || ch == L'\'')
+ else if ((int) ch == L'"' || (int) ch == L'\'')
{
_quote = ch;
_state = state_qdata;
@@ -253,7 +253,7 @@ void CsvParser::advance(Char ch)
break;
case state_data0:
- if (ch == L'"' || ch == L'\'')
+ if ( (int) ch == (int) L'"' || (int) ch == (int) L'\'')
{
_quote = ch;
_state = state_qdata;
@@ -261,7 +261,7 @@ void CsvParser::advance(Char ch)
}
case state_data:
- if (ch == L'\n' || ch == L'\r')
+ if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
{
log_debug("value \"" << _value << '"');
_deserializer->setValue(_value);
@@ -269,7 +269,7 @@ void CsvParser::advance(Char ch)
checkNoColumns(_column, _noColumns, _lineNo);
_deserializer->leaveMember(); // leave data item
_deserializer->leaveMember(); // leave row
- _state = (ch == L'\r' ? state_cr : state_rowstart);
+ _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
}
else if (ch == _delimiter)
{
@@ -307,11 +307,11 @@ void CsvParser::advance(Char ch)
break;
case state_qdata_end:
- if (ch == L'\n' || ch == L'\r')
+ if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
{
checkNoColumns(_column, _noColumns, _lineNo);
_deserializer->leaveMember(); // leave row
- _state = (ch == L'\r' ? state_cr : state_rowstart);
+ _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
}
else if (ch == _delimiter)
{
diff --git a/src/jsonformatter.cpp b/src/jsonformatter.cpp
index 1604d3e..07ada52 100644
--- a/src/jsonformatter.cpp
+++ b/src/jsonformatter.cpp
@@ -323,25 +323,25 @@ void JsonFormatter::stringOut(const std::string& str)
{
for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
{
- if (*it == '"')
+ if ( (int) *it == (int) '"')
*_ts << L'\\'
<< L'\"';
- else if (*it == '\\')
+ else if ( (int) *it == (int) '\\')
*_ts << L'\\'
<< L'\\';
- else if (*it == '\b')
+ else if ( (int) *it == (int) '\b')
*_ts << L'\\'
<< L'b';
- else if (*it == '\f')
+ else if ( (int) *it == (int) '\f')
*_ts << L'\\'
<< L'f';
- else if (*it == '\n')
+ else if ( (int) *it == (int) '\n')
*_ts << L'\\'
<< L'n';
- else if (*it == '\r')
+ else if ( (int) *it == (int) '\r')
*_ts << L'\\'
<< L'r';
- else if (*it == '\t')
+ else if ( (int) *it == (int) '\t')
*_ts << L'\\'
<< L't';
else if (static_cast<unsigned char>(*it) >= 0x80 || static_cast<unsigned char>(*it) < 0x20)
@@ -364,25 +364,25 @@ void JsonFormatter::stringOut(const cxxtools::String& str)
{
for (cxxtools::String::const_iterator it = str.begin(); it != str.end(); ++it)
{
- if (*it == L'"')
+ if ( (int) *it == (int) L'"')
*_ts << L'\\'
<< L'\"';
- else if (*it == L'\\')
+ else if ( (int) *it == (int) L'\\')
*_ts << L'\\'
<< L'\\';
- else if (*it == L'\b')
+ else if ( (int) *it == (int) L'\b')
*_ts << L'\\'
<< L'b';
- else if (*it == L'\f')
+ else if ( (int) *it == (int) L'\f')
*_ts << L'\\'
<< L'f';
- else if (*it == L'\n')
+ else if ( (int) *it == (int) L'\n')
*_ts << L'\\'
<< L'n';
- else if (*it == L'\r')
+ else if ( (int) *it == (int) L'\r')
*_ts << L'\\'
<< L'r';
- else if (*it == L'\t')
+ else if ( (int) *it == (int) L'\t')
*_ts << L'\\'
<< L't';
else if (it->value() >= 0x80 || it->value() < 0x20)
diff --git a/src/xml/entityresolver.cpp b/src/xml/entityresolver.cpp
index fb55f08..58ea86a 100644
--- a/src/xml/entityresolver.cpp
+++ b/src/xml/entityresolver.cpp
@@ -563,19 +563,19 @@ namespace
String EntityResolver::resolveEntity(const String& entity) const
{
- if (!entity.empty() && entity[0] == L'#')
+ if (!entity.empty() && (int) entity[0] == (int) L'#')
{
int code = 0;
- if (entity.size() > 2 && entity[1] == L'x')
+ if (entity.size() > 2 && (int) entity[1] == (int) L'x')
{
// hex notation: &#xABCD;
for (String::const_iterator it = entity.begin() + 2; it != entity.end(); ++it)
{
- if (*it >= L'0' && *it <= L'9')
+ if ( (int) *it >= (int) L'0' && (int) *it <= (int) L'9')
code = code * 16 + (it->value() - L'0');
- else if (*it >= L'A' && *it <= L'F')
+ else if ( (int) *it >= (int) L'A' && (int) *it <= (int) L'F')
code = code * 16 + (it->value() - L'A' + 10);
- else if (*it >= L'a' && *it <= L'f')
+ else if ( (int) *it >= (int) L'a' && (int) *it <= (int) L'f')
code = code * 16 + (it->value() - L'a' + 10);
else
throw std::runtime_error(std::string("invalid entity ") + entity.narrow());
@@ -586,7 +586,7 @@ String EntityResolver::resolveEntity(const String& entity) const
// dec notation: &#9999;
for (String::const_iterator it = entity.begin() + 1; it != entity.end(); ++it)
{
- if (*it >= L'0' && *it <= L'9')
+ if ( (int) *it >= (int) L'0' && (int) *it <= (int) L'9')
code = code * 10 + (it->value() - '0');
else
throw std::runtime_error(std::string("invalid entity ") + entity.narrow());

View File

@ -0,0 +1,17 @@
Index: cxxtools-2.2/include/cxxtools/char.h
===================================================================
--- cxxtools-2.2.orig/include/cxxtools/char.h 2013-05-05 14:18:00.180572107 +0300
+++ cxxtools-2.2/include/cxxtools/char.h 2013-05-05 14:18:00.176571966 +0300
@@ -148,6 +148,12 @@
friend bool operator==(char a, const Char& b)
{ return a == b.value(); }
+ //! @brief Returns $true$ if the a and b are the same character; $false$ otherwise.
+ //! @return $true$ if the a and b are the same character; $false$ otherwise.
+ friend bool operator==(const Char& a, unsigned int b)
+ { return a.value() == b; }
+
+
//! @brief Returns $true$ if the a and b are not the same character; $false$ otherwise.
//! @return $true$ if the a and b are not the same character; $false$ otherwise.
friend bool operator!=(const Char& a, const Char& b)

View File

@ -0,0 +1,12 @@
Index: cxxtools-2.0/src/hdstream.cpp
===================================================================
--- cxxtools-2.0.orig/src/hdstream.cpp 2011-08-08 13:07:59.567275994 +0300
+++ cxxtools-2.0/src/hdstream.cpp 2011-08-08 13:08:11.447275959 +0300
@@ -30,6 +30,7 @@
#include <ios>
#include <iomanip>
#include <cctype>
+#include <cstdio>
namespace cxxtools
{

View File

@ -0,0 +1,10 @@
Index: cxxtools-2.2/src/Makefile.am
===================================================================
--- cxxtools-2.2.orig/src/Makefile.am 2013-05-05 13:56:03.225204926 +0300
+++ cxxtools-2.2/src/Makefile.am 2013-05-05 13:56:14.017219885 +0300
@@ -215,4 +215,4 @@
endif
libcxxtools_la_LIBADD = $(LIBICONV)
-libcxxtools_la_LDFLAGS = -version-info @sonumber@ @SHARED_LIB_FLAG@
+libcxxtools_la_LDFLAGS = -version-info @sonumber@