GithubHelp home page GithubHelp logo
poco

pocoproject / poco Goto Github PK

View Code? Open in Web Editor NEW
6.3K 410.0 1.7K 144.1 MB

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.

Home Page: https://pocoproject.org

License: Other

CMake 0.48% Makefile 0.21% C++ 47.21% C 51.55% HTML 0.04% CSS 0.03% JavaScript 0.23% Shell 0.10% Perl 0.01% PowerShell 0.04% Batchfile 0.12% Rich Text Format 0.01%
c-plus-plus xml json networking logging http-client http-server configuration cross-platform sql database-access poco

poco's Introduction

alt text

poco-ci CII Best Practices

POCO (Portable Components) C++ Libraries are:

  • A collection of C++ class libraries, conceptually similar to the Java Class Library or the .NET Framework.
  • Focused on solutions to frequently-encountered practical problems.
  • Focused on "internet-age" network-centric applications.
  • Written in efficient, modern, 100% ANSI/ISO Standard C++.
  • Based on and complementing the C++ Standard Library/STL.
  • Highly portable and available on many different platforms, from embedded to server.
  • Open Source, licensed under the Boost Software License.

alt text

To start using POCO, see the Guided Tour and Getting Started documents.

Quick Start (with CMake)

Prerequisites

  • CMake 3.5 or newer
  • A C++14 compiler (Visual C++ 2015, GCC 5.0, Clang 3.4, or newer)
  • OpenSSL headers and libraries (optional, but recommended)
  • MySQL, PostgreSQL and ODBC client libraries (optional)

Most Unix/Linux systems already have OpenSSL preinstalled. If your system does not have OpenSSL, please get it from http://www.openssl.org or another source. You do not have to build OpenSSL yourself - a binary distribution is fine. For example, via Debian APT:

$ apt-get install openssl libssl-dev

On macOS, the easiest way to install OpenSSL is via Homebrew:

$ brew install openssl

The easiest way to install OpenSSL on Windows is to use a binary (prebuild) release, for example the one from Shining Light Productions that comes with a Windows installer.

On Windows, POCO can also use the native Windows TLS APIs (SChannel).

Installing All Dependencies (Linux and macOS)

All dependencies can be installed with the following commands:

Debian Linux (including Ubuntu and Raspbian)

$ sudo apt-get -y update && sudo apt-get -y install git g++ make cmake libssl-dev

RedHat Linux

$ sudo yum install -y git gcc-c++ make cmake3 openssl-devel

macOS (with Homebrew)

$ brew install cmake openssl

Building with CMake (Linux, macOS, Windows)

CMake (version 3.5 or newer) is the recommended build system for building the POCO C++ Libraries.

$ git clone -b master https://github.com/pocoproject/poco.git
$ cd poco
$ mkdir cmake-build
$ cd cmake-build
$ cmake ..
$ cmake --build . --config Release

On macOS, it's necessary to tell CMake where to find the OpenSSL headers and libraries by setting the OPENSSL_ROOT_DIR CMake variable. For example, if OpenSSL has been installed with Homebrew, the cmake invocation becomes:

$ cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl

Other common ways of building with CMake (e.g., cmake-gui) will also work.

There are also a number of project-specific CMake variables that can be changed.

Cross-Compiling

With a proper CMake toolchain file (specified via the CMAKE_TOOLCHAIN_FILE CMake variable), the POCO C++ Libraries can be cross-compiled for embedded Linux systems:

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mytoolchain.cmake -DCMAKE_INSTALL_PREFIX=/path/to/target

Installing

The POCO C++ Libraries headers and libraries can be optionally be installed by building the install target.

$ sudo cmake --build . --target install

The default install location is /usr/local/ on Linux and macOS and C:\Program Files (x64)\ on Windows and can be overridden by setting the CMAKE_INSTALL_PREFIX CMake variable.

Building and Installing - Using vcpkg

You can download and install poco using the vcpkg dependency manager:

$ git clone https://github.com/Microsoft/vcpkg.git
$ cd vcpkg
$ ./bootstrap-vcpkg.sh
$ ./vcpkg integrate install
$ ./vcpkg install poco

The poco port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Building and Installing - Using Conan

You can download and install poco using the Conan(https://github.com/conan-io/conan) package manager. It needed to be installed first(https://conan.io/downloads.html):

You can install Poco libraries from Conan Center(https://conan.io/center.html):

$ conan install -r conancenter poco/[email protected]

Or, you can download Poco recipe and build locally:

$ conan install -r conancenter poco/[email protected] --build=poco

The Poco recipe and packages in Conan Center are kept up to date by Conan team members and community contributors. If the version is out of date, or you detect any wrong behavior, please create an issue or pull request(https://github.com/conan-io/conan-center-index) on the Conan Center Index repository.

Building Without CMake

If you do not want to or cannot use CMake, POCO can also be built with Visual Studio (project and solution files included) or GNU Make (Linux, macOS and other supported Unix platforms).

Please refer to the documentation for more information.

Getting POCO via a Package Manager

POCO can also be obtained via different package managers.

Community and Contributing

POCO has an active user and contributing community, please visit our website and blog. Answers to POCO-related questions can also be found on Stack Overflow.

Please see CONTRIBUTING for submitting contributions, bugs reports, feature requests or security issues.

POCO vs. Boost

In regards to Boost, in spite of some functional overlapping, POCO is best thought of as a Boost complement (rather than replacement). Side-by-side use of Boost and POCO is a very common occurrence.

poco's People

Contributors

obiltschnig avatar aleks-f avatar zosrothko avatar fbraem avatar Bjoe avatar bachp avatar cristiantm avatar bakercp avatar RangelReale avatar fandremxw avatar karlr42 avatar hmartinez82 avatar Kontinuation avatar bufferoverflow avatar pasorobo avatar devcjohnson avatar martin-osborne avatar linquize avatar cryptoknight avatar bschramke avatar JackyWoo avatar guruofquality avatar fat-crocodile avatar KevDi avatar Burgch avatar saschazelzer avatar brice-gros avatar adrianimboden avatar agalanin avatar WesternStar avatar

Stargazers

tengdecheng avatar  avatar Shiwei Wang avatar  avatar  avatar  avatar  avatar Bemied avatar Larry avatar  avatar  avatar  avatar zhaofuqiang avatar  avatar Onur Demiralay avatar Shi Bin avatar Ryan Liu avatar SSS_Krut avatar Daniel Bruno avatar  avatar Patrick José Pereira avatar Ismaël Mejía avatar Minh-Thanh Hoang avatar James Moreau avatar Zhang howe avatar  avatar  avatar Giovanny Gutiérrez avatar  avatar David Gannerud avatar ttldtor avatar  avatar  avatar  avatar Hnanibalpy avatar Oleksandr Balyshyn avatar Randy MacLeod avatar Alexander Osipov avatar tomisawk avatar s1mple avatar  avatar btw i use arch avatar  avatar ds avatar  avatar chaohuzhang avatar shik avatar Liu Xuebai avatar Vivek Nair avatar  avatar  avatar maurice avatar @s_saichansut avatar lxulxu avatar  avatar  avatar xxx-git avatar  avatar Konstantin Tomashevich avatar Artem avatar  avatar  avatar  avatar wangxiaokun avatar Jovian-wang avatar Rebot D avatar Alejandro Garcia Arriaga avatar pn avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar Danny许 avatar  avatar Ram Chaithanya avatar 蒋延岗 avatar Carson avatar  avatar Bendi avatar  avatar  avatar clamxyz avatar  avatar Enyan Liu avatar ryuya11235 avatar Francis avatar Aaron Konishi avatar  avatar Eagle Dai avatar 莱维贝贝 avatar  avatar Yapay Zeka ve Benzetim Sistemleri Araştırma Geliştirme Lab avatar pazu avatar Mirac1e avatar  avatar

Watchers

Rob Fischer avatar arden avatar Kozo Nishida avatar yatsen1 avatar John M. Drescher avatar  avatar Anatoly Borodin avatar  avatar Javanesevn avatar Aakarsh Nair avatar pmr avatar  avatar  avatar Dmitry Kuzminskiy avatar davidwei_001 avatar Tiger Lee avatar Allen Galler avatar Long Dao avatar Herb Stahl avatar Günter Obiltschnig avatar cntoby avatar Richard Lee avatar Felix Ulber avatar send2vinnie avatar  avatar cnmade avatar Nash Bean avatar Jiri Kastner avatar  avatar  avatar Leo An avatar Jinliang Ou avatar Vinícius Schmidt avatar alexis avatar senseb avatar Raymond Tay avatar Moez Bouselmi avatar Marcelle von Wendland avatar Jianshuai avatar wangchen avatar  avatar ElliotShin avatar  avatar  avatar sutm avatar HoNooD avatar hellfire avatar Matej Kenda avatar  avatar Joerg-Christian Boehme avatar  avatar =o= avatar Rebecca Heineman avatar James Cloos avatar Gabriele Pongelli avatar  avatar Rafael Augusto Souza avatar  avatar Björn Schramke avatar  avatar 平江 avatar Kenneth Lind avatar DAO LONG avatar gotomypc avatar lark avatar Rob Barnett avatar  avatar Brandon Mayer avatar andy avatar madmax avatar André Jacobs avatar kylinx.shen avatar  avatar Ismail K avatar yuntinghill avatar 吴铭 avatar Kevin Dick avatar  avatar  avatar Stéphane Adam Garnier avatar  avatar  avatar kwan avatar  avatar Hongxiang Wu avatar Byun Sang June avatar Dahang avatar Zhiheng Li avatar Linker Guo avatar  avatar Igor Lugansky avatar Kimik avatar Mr.Fang avatar Liange avatar  avatar Lakshmi AIyer avatar Cyuan avatar Bruce Shum avatar Li Yuxing avatar UMU avatar

poco's Issues

JSON::Object::stringify throw BadCastException

Hello

this piece of code throws an exception BadCastException, the reason is that the types are not properly tested in the method "void Stringifier :: stringify (const Var & any, std :: ostream & out, unsigned int indent)".
it lacks the verfication following cases: any.type () == typeid (Object) && any.type () == typeid (Array)

int main(int argc, char** argv) {


    JSON::Object obj;

    JSON::Array array;
    JSON::Object obj2;

    obj.set("array", array);
    obj.set("obj2", obj2);

    obj.stringify(std::cout);

    return 0;
}

thank you for telling me if I'm wrong
Fabrizio

name conflict in Data::Keywords::bind

There is a name conflict between std::bind and Poco::Data:Keywords::bind when using c++11 in gcc.

Code:
Poco::Data::Session session(...);
session << "somesql ?", bind(std::string("Text"));

Error:
error: cannot convert 'std::Bind_helper<false, std::basic_string&, const char (&)[1]>::type {aka std::Bindstd::basic_string<char(const char)>}' to 'Poco::Data::CopyBindingstd::basic_string' in return

Regarding Poco build system

I've been poking around with Poco source code lately, and found out that the build system is really broken.

I would like to know if CMake is going to be the 'official' way to build Poco, because there are some odds that need to be fixed (like the third-party dependencies mixed along with Poco source code).

Perhaps Poco should support only one way to build it's libraries since it is way easier to mantain than a bunch of VS projects and outdated makefiles.

Signed / unsigned comparison issue in Data\ODBC\include\Poco\Data\ODBC\Extractor.h

Abovementioned file contains the following assertion check inside function:

template<typename T>
bool extractManualImpl(std::size_t pos, T& val, SQLSMALLINT cType):
//for fixed-length data, buffer must be large enough
//otherwise, driver may write past the end
poco_assert_dbg (len <= sizeof(T));

Unfortunately len may very well be negative (e.g. SQL_NULL_DATA predefined value).
In this case signed / unsigned comparison between signed len and unsigned sizeof() result has unexpected behavior (false assertion is raised).

This is reproduced in VS 2012 by simplistic sample as well:

if (-1 <= sizeof(int))
{
     std::cout << "good" << std::endl;
}
else
{
    std::cout << "bad" << std::endl;
}

Casting sizeof() result in place to signed value fixes the issue.

vs2012 express desktop build support

Found I could get a build (or at least as much as I wanted) using:

buildwin 110 build shared release Win32 nosamples msbuild

Note that:

  • adding 'notests' in there breaks it, seems to be a problem with the number of arg shifts
  • x64 build does not work - the link line is right but we still use the 32 bit compiler
  • change the include in DLLVersion.rc to "windows.h" from "afxres.h" (not present in this release; should be portable with windows.h though AFAIK)

The components setting isn't robust; if you disable XML then utils will not build.

Typo in Data/SQLite/src/Utility.cpp

It says 'Unkown' instead of 'Unknown'
line:

throw SQLiteException(std::string("Unkown error code: ") + Poco::NumberFormatter::format(rc), addErrMsg);

Android should use isfinite, isinf, isnan and signbit from the std namespace

https://bugs.webkit.org/show_bug.cgi?id=37948

same here with latest ndk and poco 1.4.5, overwise it fails on
Foundation/include/Poco/FPEnvironment_DUMMY.h

to fix a problem

include

inline bool FPEnvironmentImpl::isInfiniteImpl(float value)
{
return std::isinf(value) != 0;
}

inline bool FPEnvironmentImpl::isInfiniteImpl(double value)
{
return std::isinf(value) != 0;
}

inline bool FPEnvironmentImpl::isInfiniteImpl(long double value)
{
return std::isinf((double) value) != 0;
}

Poco::Crypto::DigestEngine requires OpenSSL_add_all_digests() init call

From [SF #606][https://sourceforge.net/p/poco/bugs/606/]:

Currently usage of Poco::Crypto::DigestEngine class is impossible without explicit prior call to
OpenSSL_add_all_digests() function. Without this initialization call EVP_get_digestbyname(), used
by DigestEngine, always returns NULL. This is 100% reproducible on my machine via supplied
Poco's > DigetEngine unit tests: they just crash.
Requirement to call this initialization method is covered in OpenSSL's docs as well:
http://www.openssl.org/docs/crypto/EVP_DigestInit.html
I searched poco's source tree and haven't found any references to OpenSSL_add_all_digests(),
meaning that I don't seem to miss anyhing :)
Environment:

  • poco 1.4.5 (complete);
  • msvs 2012;
  • openssl 1.0.1c official win binaries (prebuilt);
  • win7 x64.

I tested with current develop branch from github (DigestEngine constructor did not change from 1.4.5), VS 2010, 32-bit build on Win7 64-bit, OpenSSL 1.0.0g 18 Jan 2012 and I can not reproduce this.

DigestEngineTest::testMD5() passes; in DigestEngine ctor, EVP_get_digestbyname() returns valid pointer which is then, alongside the context obtained from EVP_MD_CTX_create(), passed to EVP_DigestInit_ex() and all is good. It may have to do with OpenSSL version.

NetworkInterface::list doesn't return MAC addresses

Calling NetworkInterface::list doesn't return MAC addresses for the interfaces. Calling NetworkInterface::map correctly returns the addresses, they seem to be lost when using ::list (which calls ::map).

poco-1.5.1: Facebook GraphAPI JSON question

Hi,

I'm using poco to deal with facebook GraphAPI. I managed to do most of the work but i'm struggling with the latest bit. Here is my code:

try {
    // Target URI
    Poco::URI uri("https://graph.facebook.com/me/friends?access_token=" + AppDelegate::getAccessToken());
    std::string path(uri.getPathEtc());

    // SSL Context
    const Poco::Net::Context::Ptr context(new Poco::Net::Context(Poco::Net::Context::CLIENT_USE, "", "", "", Poco::Net::Context::VERIFY_NONE, 9, true, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"));

    // HTTP Session
    Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort(), context);

    // Request
    Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, path, Poco::Net::HTTPMessage::HTTP_1_1);
    session.sendRequest(request);

    // Response
    Poco::Net::HTTPResponse response;
    std::istream& rs = session.receiveResponse(response);
    std::cout << response.getStatus() << " " << response.getReason() << std::endl;
    for (auto response_header: response) {
      std::cout << response_header.first << " = " << response_header.second << std::endl;
    }

    std::ostringstream responseBody;
    if (response.getStatus() != Poco::Net::HTTPResponse::HTTP_UNAUTHORIZED) {
      Poco::StreamCopier::copyStream(rs, responseBody);
//      Poco::StreamCopier::copyStream(rs, std::cout);
    } else {
      Poco::NullOutputStream null;
      Poco::StreamCopier::copyStream(rs, null);
      return;
    }

    // Parsing JSON response
    Poco::JSON::DefaultHandler handler;
    Poco::JSON::Parser parser;

    parser.setHandler(&handler);
    parser.parse(responseBody.str());
    Poco::DynamicAny result = handler.result();

    Poco::JSON::Object::Ptr obj;
    //if (result.type() == typeid(Poco::JSON::Object::Ptr)) {
      obj = result.extract<Poco::JSON::Object::Ptr>();
    //}

    // Serialize to string
//      std::ostringstream out;
    obj->stringify(std::cout);
  } catch (Poco::Exception& exc) {
    CCLOG("error =  %s", exc.displayText().c_str());
  }

And here is the output:

200 OK 
Access-Control-Allow-Origin = * 
Cache-Control = private, no-cache, no-store, must-revalidate 
Connection = close 
Content-Length = 3149 
Content-Type = text/javascript; charset=UTF-8 
Date = Sun, 13 Jan 2013 10:46:44 GMT 
ETag = "1bfe8dcc4ef3831df52f40d3457c8744b129908a" 
Expires = Sat, 01 Jan 2000 00:00:00 GMT 
Pragma = no-cache 
X-FB-Debug = PzikR8+tz4SyqNBlz0WiHLKUQhql4FsoiTEitZK/EJ0= 
X-FB-Rev = 711202 
{"data":[Cocos2d: error =  Bad cast exception: Can not convert to std::string

As you can see, everything works like a charm except the:

  obj->stringify(std::cout);

Any ideas of what I'm doing wrong ?

Thanks,
BQ.

Monotonic time

Timer, Util::Timer, TimedNotificationQueue (and possibly others) could be changed not to use Timestamps, which are based on the system clock, and instead use some form of processor ticks to provide a monotonic time source.

The reasoning for this is that backwards system clock jumps may delay the firing of timers by the amount of time the clock was changed.

'distclean' requires 3 traversals of project tree

The sequence:

   find $(POCO_BUILD) -name obj -type d -print0 | xargs -0 rm -rf
   find $(POCO_BUILD) -name .dep -type d -print0 | xargs -0 rm -rf
   find $(POCO_BUILD) -name bin -type d -print0 | xargs -0 rm -rf

can be refactored as:

   find $(POCO_BUILD) \( -name obj -o -name .dep -o -name bin \) -type d -print0 | xargs -0 rm -rf

and do the same in a single traversal.

Linux unbundled builds don't link

For quite some time, building on Linux (CentOS 6.x in this case) with --shared --unbundled fails with libpcre, libz, and libexpat symbols all missing.

$(SYSLIBS) should include "-lz -lpcre -lexpat" when building unbundled/shared on Linux, but doesn't.

Route_Linux adds dependency to C++0x compiler

Looks like libmnl, used in Net/Route_Linux.cpp, depends on a C++0x compatible compiler, is this requirement being added to Poco?

** Compiling src/Route.cpp (debug, shared)
g++ -Iinclude -I/home/rreale/Documents/prog/src/poco/CppUnit/include -I/home/rreale/Documents/prog/src/poco/Foundation/include -I/home/rreale/Documents/prog/src/poco/XML/include -I/home/rreale/Documents/prog/src/poco/JSON/include -I/home/rreale/Documents/prog/src/poco/Util/include -I/home/rreale/Documents/prog/src/poco/Net/include -I/home/rreale/Documents/prog/src/poco/Crypto/include -I/home/rreale/Documents/prog/src/poco/NetSSL_OpenSSL/include -I/home/rreale/Documents/prog/src/poco/Data/include -I/home/rreale/Documents/prog/src/poco/Data/SQLite/include -I/home/rreale/Documents/prog/src/poco/Data/ODBC/include -I/home/rreale/Documents/prog/src/poco/Data/MySQL/include -I/home/rreale/Documents/prog/src/poco/Zip/include -I/home/rreale/Documents/prog/src/poco/PageCompiler/include -I/home/rreale/Documents/prog/src/poco/PageCompiler/File2Page/include -I/home/rreale/Documents/prog/src/poco/ApacheConnector/include -I/home/rreale/Documents/prog/src/poco/PDF/include -I/home/rreale/Documents/prog/src/poco/CppParser/include -I/home/rreale/Documents/prog/src/poco/PocoDoc/include -I/home/rreale/Documents/prog/src/poco/ProGen/include -Wall -Wno-sign-compare -DPOCO_BUILD_HOST=rangel-linux-32 -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPOCO_HAVE_FD_EPOLL -g -D_DEBUG -fPIC -DNet_EXPORTS -c src/Route.cpp -o /home/rreale/Documents/prog/src/poco/Net/obj/Linux/i686/debug_shared/Route.o
In file included from /usr/include/c++/4.6/cstdint:35:0,
from /usr/include/libmnl/libmnl.h:6,
from src/Route_Linux.cpp:42,
from src/Route.cpp:53:
/usr/include/c++/4.6/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

Net tests has errors and failure in Mac OS X

I built Poco with those options:

./configure --static --cflags=-fvisibility=hidden --no-samples --omit=Data/ODBC,Data/MySQL --config=Darwin32-clang
make -s -j 4

I got the following errors when running Net library testsuite in debug mode:

!!!FAILURES!!!
Runs: 206 Failures: 1 Errors: 4

There were 4 errors:
1: N7CppUnit10TestCallerI13RawSocketTestEE.testEchoIPv4
"N4Poco11IOExceptionE: I/O error"
in "", line -1
2: N7CppUnit10TestCallerI13RawSocketTestEE.testSendToReceiveFromIPv4
"N4Poco11IOExceptionE: I/O error"
in "", line -1
3: N7CppUnit10TestCallerI14ICMPClientTestEE.testPing
"N4Poco11IOExceptionE: I/O error"
in "", line -1
4: N7CppUnit10TestCallerI10SyslogTestEE.testOldBSD
"N4Poco3Net21HostNotFoundExceptionE: Host not found"
in "", line -1

There was 1 failure:
1: N7CppUnit10TestCallerI7DNSTestEE.testHostByName
"he1.name() == "dnstest.appinf.com" || he1.name() == "aliastest.appinf.com""
in "src/DNSTest.cpp", line 64

JSON parser does not handle 64-bit numbers correctly

When you give a number that is greater than 2^32, the JSON parser converts it to a 32-bit integer. The following code illustrates:

std::string json = "{ \"test\" : 5000000000000000 }";
Parser parser;
Var result;

try
{
    DefaultHandler handler;
    parser.setHandler(&handler);
    parser.parse(json);
    result = handler.result();
}
catch(JSONException& jsone)
{
    std::cout << jsone.message() << std::endl;
    assert(false);
}

assert(result.type() == typeid(Object::Ptr));

Object::Ptr object = result.extract<Object::Ptr>();
Var test = object->get("test");
assert(test.isInteger());
Int64 value = test;
assert(value == 5000000000000000); // fails here, value gets truncated

ParallelSocketAcceptor virtual functions

You are not able to inherit from ParallelSocketAcceptor to implement their own createServiceHandler() because the destructor and the method createServiceHandler() are not virtual!!

And a method like nextReactor() is also needed to get the next reactor at the createServiceHandler(). Take a look at the single thread version SocketAcceptor.h

Cannot compile on gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 using compiler flag pedantic

We started using POCO -1.4.5 in our project (was 1.3.6). When we compile heaps of warnings/errors in that fashion pop up:
poco-1.4.5/include/Poco/Exception.h:274:74: error: invoking macro POCO_DECLARE_EXCEPTION_CODE argument 1: empty macro arguments are undefined in ISO C90 and ISO C++98

In this version of POCO calls to a macro called POCO_DECLARE_EXCEPTION are forwarded to POCO_DECLARE_EXCEPTION_CODE. Since we are working on linux the macro FOUNDATION_API is empty and nothing reaches POCO_DECLARE_EXCEPTION_CODE as first argument.

Is the forwarding necessary? Could FOUNDATION_API be set to some dummy statement?

We do want compile using pedantic, to keep our code base as clean and stable as possible.

1.5.1 build fails on OS X when using libc++

Compiling the 1.5.1 prerelease using libc++ fails in the file DirectoryWatcher.cpp.

src/DirectoryWatcher.cpp:419:4: error: use of undeclared identifier 'close'
                        close(_dirFD);
                        ^
src/DirectoryWatcher.cpp:426:3: error: use of undeclared identifier 'close'
                close(_dirFD);
                ^
src/DirectoryWatcher.cpp:427:3: error: use of undeclared identifier 'close'
                close(_queueFD);
                ^

My configure command was

../src/configure --prefix=../install --no-tests --no-samples --cflags='-fPIC -stdlib=libc++' --static --omit=Data,Zip --config=Darwin64-clang

As a fix, #include <unistd.h> should be inserted in the file on OS X. I have not submitted a pull request since I'm not 100% sure where in the file to put it.

Poco::Thread leak on Linux

http://pocoproject.org/forum/viewtopic.php?f=12&t=5760

by rd » Thu Feb 07, 2013 5:43 am

Hi,

It seems to me there is a problem when using a Poco::Thread on linux when you do not call join() on it and the thread function simply finishes before the Thread object destructor is called.

The destructor only calls pthread_detach() if isRunningImpl() is true, but if the ThreadImpl::runnableEntry(void* pThread) function finishes, it will set pData->pRunnableTarget = 0, so isRunningImpl() will return false then.

This causes the virtual memory usage of the process to increase with every thread, an after a few hundred started&stopped threads you will get "cannot start thread" exceptions.

Thread_POSIX.cpp:

ThreadImpl::~ThreadImpl()
{
   if (isRunningImpl())
      pthread_detach(_pData->thread);
}

DateTime issue with MySQL Database

I've found an issue when using multiple DateTime columns in a MySQL table.
The following code statement produces table content as stated below:

Poco::Data::Session sess("MySQL", "host=localhost;user=root;password=;db=mydb");
sess << "DROP TABLE IF EXISTS test;", now;
sess << "CREATE TABLE test (field1 DATETIME, field2 DATETIME)", now;
Poco::DateTime date(2013, 01, 02, 01, 02, 03, 4, 5);
sess << "INSERT INTO test (field1) VALUES(?)", use(date), now;
sess << "INSERT INTO test (field2) VALUES(?)", use(date), now;
sess << "INSERT INTO test (field1, field2) VALUES(?, ?)", use(date), use(date), now;

Table content afterwards:
| field1 | field2 |
| 2013-01-02 01:02:03 | NULL |
| NULL | 2013-01-02 01:02:03 |
| 0000-00-02 01:02:03 | 2013-01-02 01:02:03 |

The first two rows are as expected, but the last row is clearly malformed.

I'm using gcc 4.7.2 on Debian Wheezy and the mysqlclient library in version 5.5.28

libltdl.dylib not available under OS X 10.8

Hi

when building 1.5.1 ...

make -C /Sources/poco-1.5.1-all/Data/ODBC/testsuite

died with

ld: library not found for -lltdl

just commenting it out from the Makefile made the build continue

Best,

Stefan Csomor

Need a way to disable *_API macros with GCC

In the develop branch we have started defining the *_API macros (e.g., Foundation_API) to attribute ((visibility ("default"))) if we detect GCC. Unfortunately, there is no easy way to globally disable this.This would be required, as CppParser does not understand GCC-specific keywords (like attribute) and thus PocoDoc cannot parse the header files (without explicitely defining every *_API macro to an empty string on the command line, which is ugly).
Before defining *_API, we should check for POCO_NO_GCC_API_ATTRIBUTE macro and only define *_API if this macro has not been defined.

Buffer::resize crash

In poco Version 1.5.0 up the resize code isn't correct:

if (newCapacity > _capacity)
{
T* ptr = new T[newCapacity];
if (preserveContent)
std::memcpy(ptr, _ptr, newCapacity); <<<<<< since newCapacity is bigger than the allocated memory it tries to access memory outside the allowed boundaries.

Calling NetworkInterface::map several times it will crash from time to time.
if (ERROR_BUFFER_OVERFLOW == (dwRetVal = GetAdaptersAddresses(family, flags, 0, pAddress, &outBufLen)))
memory.resize(outBufLen); // adjust size and try again

Don't know why not calling memory.resize(outBufLen, false); there.
Is preserving the memory necessary?

In poco 1.4.4 the resize is fine!

Problems with win x64 build

  1. PocoDoc_x64 and ProGen_x64 dosn't compile. PocoJSONmtd.lib isn't built in the x64 version of the build script (the project doens't have x64 settings)
  2. Missing symbol when trying to link to an existing application.
    PocoNetSSLmtd.lib(PrivateKeyPassphraseHandler.obj) : error LNK2001: unresolved external symbol _pocoNetworkInitializer
    PocoNetmtd.lib(HTTPServerConnection.obj) : error LNK2001: unresolved external symbol _pocoNetworkInitializer

If I change the following it works:
Net.cpp
Line 101: const NetworkInitializer _pocoNetworkInitializer; // was pocoNetworkInitializer

Net.h
Line 131: extern "C" const struct NetworkInitializer _pocoNetworkInitializer; // was pocoNetworkInitializer

poco-1.5.1: Doesn't compile for Android

Hi,

I just downloaded poco-1.5.1-all and it doesn't compile out of the box for android.

I'm using android-ndk-r8d with gcc 4.7 toolchain on MacOS (but it shouldn't matter which OS i'm using when cross compiling).

I setup my toolchain like this:

./make-standalone-toolchain.sh --ndk-dir=/Users/bquenin/android-ndk-r8d --platform=android-8 --install-dir=/Users/bquenin/android-toolchain --toolchain=arm-linux-androideabi-4.7

Then I configured poco like this:

./configure --config=Android --no-samples --no-tests --omit=Data

And run the compilation:

make -s -j16

[email protected]:~/poco-1.5.1-all$ make -j16
make -C /Users/bquenin/poco-1.5.1-all/Foundation
** Compiling src/ArchiveStrategy.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/ArchiveStrategy.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/ArchiveStrategy.o
** Compiling src/DateTimeFormatter.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/DateTimeFormatter.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/DateTimeFormatter.o
** Compiling src/Exception.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/Exception.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/Exception.o
** Compiling src/FIFOBufferStream.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/FIFOBufferStream.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/FIFOBufferStream.o
** Compiling src/FPEnvironment.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/FPEnvironment.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/FPEnvironment.o
** Compiling src/File.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/File.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/File.o
** Compiling src/FileChannel.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/FileChannel.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/FileChannel.o
** Compiling src/Formatter.cpp (debug, static)
** Compiling src/FormattingChannel.cpp (debug, static)
** Compiling src/Glob.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/Glob.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/Glob.o
** Compiling src/HexBinaryDecoder.cpp (debug, static)
** Compiling src/LineEndingConverter.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/LineEndingConverter.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/LineEndingConverter.o
** Compiling src/HexBinaryEncoder.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/HexBinaryEncoder.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/HexBinaryEncoder.o
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/HexBinaryDecoder.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/HexBinaryDecoder.o
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/FormattingChannel.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/FormattingChannel.o
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/Formatter.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/Formatter.o
** Compiling src/Latin1Encoding.cpp (debug, static)
** Compiling src/Latin2Encoding.cpp (debug, static)
** Compiling src/InflatingStream.cpp (debug, static)
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/Latin2Encoding.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/Latin2Encoding.o
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/Latin1Encoding.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/Latin1Encoding.o
arm-linux-androideabi-g++  -Iinclude -I/Users/bquenin/poco-1.5.1-all/CppUnit/include -I/Users/bquenin/poco-1.5.1-all/Foundation/include -I/Users/bquenin/poco-1.5.1-all/XML/include -I/Users/bquenin/poco-1.5.1-all/JSON/include -I/Users/bquenin/poco-1.5.1-all/Util/include -I/Users/bquenin/poco-1.5.1-all/Net/include -I/Users/bquenin/poco-1.5.1-all/Crypto/include -I/Users/bquenin/poco-1.5.1-all/NetSSL_OpenSSL/include -I/Users/bquenin/poco-1.5.1-all/Data/include -I/Users/bquenin/poco-1.5.1-all/Data/SQLite/include -I/Users/bquenin/poco-1.5.1-all/Data/ODBC/include -I/Users/bquenin/poco-1.5.1-all/Data/MySQL/include -I/Users/bquenin/poco-1.5.1-all/Zip/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/include -I/Users/bquenin/poco-1.5.1-all/PageCompiler/File2Page/include -mthumb -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions -DPOCO_BUILD_HOST=Bertrand-Quenins-MacBook-Pro.local  -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY  -g -D_DEBUG  -c src/InflatingStream.cpp -o /Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/InflatingStream.o
In file included from src/FPEnvironment_DUMMY.cpp:37:0,
                 from src/FPEnvironment.cpp:42:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:98:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:104:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:110:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:116:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:122:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:128:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static float Poco::FPEnvironmentImpl::copySignImpl(float, float)':
include/Poco/FPEnvironment_DUMMY.h:134:9: error: 'copysignf' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:134:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from src/FPEnvironment_DUMMY.cpp:37,
                 from src/FPEnvironment.cpp:42:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:352:7: note:   'copysignf'
In file included from src/FPEnvironment_DUMMY.cpp:37:0,
                 from src/FPEnvironment.cpp:42:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static double Poco::FPEnvironmentImpl::copySignImpl(double, double)':
include/Poco/FPEnvironment_DUMMY.h:140:9: error: 'copysign' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:140:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from src/FPEnvironment_DUMMY.cpp:37,
                 from src/FPEnvironment.cpp:42:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:275:8: note:   'copysign'
make[1]: *** [/Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/FPEnvironment.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from include/Poco/FPEnvironment.h:47:0,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from src/DateTimeFormatter.cpp:40:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:98:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:104:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:110:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:116:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:122:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:128:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static float Poco::FPEnvironmentImpl::copySignImpl(float, float)':
include/Poco/FPEnvironment_DUMMY.h:134:9: error: 'copysignf' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:134:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from include/Poco/FPEnvironment.h:47,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from src/DateTimeFormatter.cpp:40:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:352:7: note:   'copysignf'
In file included from include/Poco/FPEnvironment.h:47:0,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from src/DateTimeFormatter.cpp:40:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static double Poco::FPEnvironmentImpl::copySignImpl(double, double)':
include/Poco/FPEnvironment_DUMMY.h:140:9: error: 'copysign' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:140:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from include/Poco/FPEnvironment.h:47,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from src/DateTimeFormatter.cpp:40:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:275:8: note:   'copysign'
In file included from include/Poco/FPEnvironment.h:47:0,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/ArchiveStrategy.cpp:37:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:98:14: error: expected unqualified-id before '(' token
In file included from include/Poco/FPEnvironment.h:47:0,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/FileChannel.cpp:38:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:98:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:104:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:110:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:116:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:122:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:128:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static float Poco::FPEnvironmentImpl::copySignImpl(float, float)':
include/Poco/FPEnvironment_DUMMY.h:134:9: error: 'copysignf' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:134:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from include/Poco/FPEnvironment.h:47,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/FileChannel.cpp:38:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:352:7: note:   'copysignf'
In file included from include/Poco/FPEnvironment.h:47:0,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/FileChannel.cpp:38:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static double Poco::FPEnvironmentImpl::copySignImpl(double, double)':
include/Poco/FPEnvironment_DUMMY.h:140:9: error: 'copysign' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:140:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from include/Poco/FPEnvironment.h:47,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/FileChannel.cpp:38:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:275:8: note:   'copysign'
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:104:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isInfiniteImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:110:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(float)':
include/Poco/FPEnvironment_DUMMY.h:116:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(double)':
include/Poco/FPEnvironment_DUMMY.h:122:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static bool Poco::FPEnvironmentImpl::isNaNImpl(long double)':
include/Poco/FPEnvironment_DUMMY.h:128:14: error: expected unqualified-id before '(' token
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static float Poco::FPEnvironmentImpl::copySignImpl(float, float)':
include/Poco/FPEnvironment_DUMMY.h:134:9: error: 'copysignf' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:134:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from include/Poco/FPEnvironment.h:47,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/ArchiveStrategy.cpp:37:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:352:7: note:   'copysignf'
In file included from include/Poco/FPEnvironment.h:47:0,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/ArchiveStrategy.cpp:37:
include/Poco/FPEnvironment_DUMMY.h: In static member function 'static double Poco::FPEnvironmentImpl::copySignImpl(double, double)':
include/Poco/FPEnvironment_DUMMY.h:140:9: error: 'copysign' is not a member of 'std'
include/Poco/FPEnvironment_DUMMY.h:140:9: note: suggested alternative:
In file included from /Users/bquenin/android-toolchain/bin/../lib/gcc/../../include/c++/4.7/cmath:46:0,
                 from include/Poco/FPEnvironment_DUMMY.h:45,
                 from include/Poco/FPEnvironment.h:47,
                 from include/Poco/NumericString.h:45,
                 from include/Poco/NumberFormatter.h:44,
                 from include/Poco/ArchiveStrategy.h:47,
                 from src/ArchiveStrategy.cpp:37:
/Users/bquenin/android-toolchain/bin/../sysroot/usr/include/math.h:275:8: note:   'copysign'
make[1]: *** [/Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/DateTimeFormatter.o] Error 1
make[1]: *** [/Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/FileChannel.o] Error 1
make[1]: *** [/Users/bquenin/poco-1.5.1-all/Foundation/obj/Android/armeabi/debug_static/ArchiveStrategy.o] Error 1
make: *** [Foundation-libexec] Error 2

Anyone knows what i'm doing wrong ?

Thanks,
BQ.

Poco::format() misorders sign and padding specifiers

If I run in a debugger:

Poco::format("%+03d", -7)

I get "0-7" as the output. This is wrong.

This breaks down as:

stream << setiosflags(ios::showpos) << setfill('0') << setw(3) << -7 << endl;

which not surprisingly, generates the same incorrect response...

I'd recommend processing the sign separately in formatOne() for the specifier '+', i.e.

stream << setiosflags(ios::showpos) << setw(1) << -7

then resetting the ios::showpos flag and shaving 1 off the width, and setting the fill, then passing the value a 2nd time.

JSON implementation bug

posted in forum:

http://pocoproject.org/forum/viewtopic.php?f=10&t=5670

JSON implementation, bug or not....
by ScorpZ » Tue Dec 11, 2012 9:02 am

Hello to all.
-> I downloaded 1.5.0 POCO with JSON support.
-> Compiled and run my application (with POCO::JSON)
-> All object types (Include/Poco/Json/Object.h) return as Arrays and Objects (Poco::JSON::Object::isArray() and ... isObject() return true)
-> I looked Object.h header file and i saw there -
//-----------------------------------------------------------------------------------------------------------
CODE: SELECT ALL
inline bool Object::isArray(const std::string& key) const
{
ValueMap::const_iterator it = _values.find(key);
return it != _values.end() || it->second.type() == typeid(Array::Ptr);
}

//-----------------------------------------------------------------------------------------------------------
-> It method returns true for all found properties
-> Maybe must by

CODE: SELECT ALL
inline bool Object::isArray(const std::string& key) const
{
ValueMap::const_iterator it = _values.find(key);
return it != _values.end() && it->second.type() == typeid(Array::Ptr);
}

.Thanks
ScorpZ

Posts: 1
Joined: Tue Dec 11, 2012 8:47 am

Xcode problems with libstdc++(GNU) vs. libc++(LLVM)

I was having trouble getting a project to compile in Xcode using Poco and then saw this forum answer

http://pocoproject.org/forum/viewtopic.php?f=12&t=5620&p=9665&hilit=Undefined#p9665

The user figures out how to get around the compile errors by changing the target "C++ Standard Library" from libc++ to libstdc++. It solves the problem for me as well. But I find that the compiler for libstdc++ doesn't support C++11. Has Apple dropped support for the GNU C++ standard library? What is the best solution here? Why doesn't the LLVM compiler work with the Poco library?

Thanks,
David

Net::NameValueCollection::size() returns int

This function returns an int, despite the fact that the design pattern for a size() method is consistently std::size_t.

This method and others should be homogenized to return std::size_t since a signed value is inappropriate and generates (1) sign-conversion warnings when compiled with strict flags, and (2) an [ERRFMT] in Poco::format when you naively assume it's a %z format (as most ::size() return values would be).

Ditto for: Poco::TimedNotificationQueue, Poco::NotificationQueue, Poco::PriorityNotificationQueue, Poco::Manifest, Poco::Crypto/RSAKey, Poco::Crypto::RSAKeyImpl...

WebSocket and broken Timeouts (POCO_BROKEN_TIMEOUTS)

WebSocketImpl needs to override setReceiveTimeout(), etc. and forward to internal StreamSocketImpl in case POCO_BROKEN_TIMEOUTS is defined. Otherwise, setting timeouts will not work if POCO_BROKEN_TIMEOUTS is defined.

Net::HTTPClientSession HTTP CONNECT support is not RFC-compliant

HTTPClientSession::proxyConnect() sends a CONNECT message to the proxy and then returns the initialised socket. However, the CONNECT message it sends to the server contains the IP address and port of the intended remote server, not the hostname and port as RFC seems to require:

The Request-URI portion of the Request-Line is always
an 'authority' as defined by URI Generic Syntax [2], which is to say
the host name and port number destination of the requested connection
separated by a colon:"

Some Wireshark output of the relevant request, cropped to the relevant bit: https://gist.github.com/4567639

The cause is the line in HTTPClientSession::proxyConnect()

SocketAddress targetAddress(getHost(), getPort());

which does a DNS lookup on the hostname.

I have locally patched to this to some ugly slow std::stringsteam code:

std::string domain = getHost();
std::stringstream ss; ss << getPort(); std::string port(ss.str());
domain = (domain.append(":")).append(port);
HTTPRequest proxyRequest(HTTPRequest::HTTP_CONNECT, domain, HTTPMessage::HTTP_1_1);

, but my upstream proxy(which I think is Squid) accepts either form so this isn't that important really.

MySQL empty text/blob

Assertion violation in debug binary with empty text field:

    Poco::Data::Session ses(Poco::Data::MySQL::Connector::KEY,...);
    ses << "DROP TABLE IF EXISTS Dummy", Poco::Data::now;
    ses <<  "CREATE TABLE Dummy(data TEXT)", Poco::Data::now;
    ses << "INSERT INTO Dummy VALUES('')", Poco::Data::now;
    ses << "SELECT data FROM Dummy", Poco::Data::now;

Assertion violation: pChar in file ".../poco-1.4.6-all/Data/include/Poco/Data/BLOB.h", line 180

DNS::hostByAddress can be slow

I've found that for some domains, resolving takes on the order of 5 seconds in my environment. This is evident using HTTPSClientSession and I've put together a minimal test case here:

https://gist.github.com/4566844

From my testing it looks like the issue is IPv6 related and is down to the AI_ADDRCONFIG flag passed to the getaddrinfo system call by DNS::hostByAddress. If I remove that flag and recompile the library(I'm using 1.4.6 downloaded from the main site) and then try my test case, resolution takes the normal(<1 sec) amount of time. I have also replicated the problem and made a small test case using just C and directly calling getaddrinfo. : https://gist.github.com/4566462

My setup is:
Ubuntu 12.10 64-bit
Configured Poco(1.4.6) with --no-tests --no-samples --omit=Data/OBDC,Data/MySQL
My ifconfig is : https://gist.github.com/4566285 and the interface connected to the outside world is eth1.

I think the issue is down to the fact the domain in question has no AAAA records but my local machine has an assigned IPv6 address. So getaddrinfo, following the AI_ADDRCONFIG flag, makes a request an AAAA record, which timesout, and then makes a request for an A record, thus causing the delay. Or there is some other peculiarity with the DNS records for this site and others I've tried(myjoyonline.com, for example), I'm not sure.

So maybe this isn't necessarily a bug on your side, but I thought I would bring it to your attention anyway- this issue doesn't seem to affect any other application I use in this environment. I have patched Net::DNS::hostByAddress locally for now to remove the AI_ADDRCONFIG flag and my application(a proxy server making lots of DNS requests) is a lot faster now.

Error compiling FPEnvironment_DUMMY.h for ARM

Hi,

I compiled POCO for the Beaglebone using "arm-linux-gnueabihf" cross compiling tool.

There was a tiny error in the compilation process for FPEnvironment_DUMMY.h

In file included from src/FPEnvironment_DUMMY.cpp:37:0,
from src/FPEnvironment.cpp:42:
include/Poco/FPEnvironment_DUMMY.h: In static member function ‘static float Poco::FPEnvironmentImpl::copySignImpl(float, float)’:
include/Poco/FPEnvironment_DUMMY.h:138:9: error: ‘copysignf’ is not a member of ‘std’
include/Poco/FPEnvironment_DUMMY.h:138:9: note: suggested alternative:
/usr/arm-linux-gnueabihf/include/bits/mathcalls.h:219:1: note: ‘copysignf’
include/Poco/FPEnvironment_DUMMY.h: In static member function ‘static double Poco::FPEnvironmentImpl::copySignImpl(double, double)’:
include/Poco/FPEnvironment_DUMMY.h:148:9: error: ‘copysign’ is not a member of ‘std’
include/Poco/FPEnvironment_DUMMY.h:148:9: note: suggested alternative:
/usr/arm-linux-gnueabihf/include/bits/mathcalls.h:219:1: note: ‘copysign’
make[1]: *** [/home/davide/Software/poco-1.4.6/Foundation/obj/Linux/ARM/debug_shared/FPEnvironment.o] Error 1
make: *** [Foundation-libexec] Error 2

NumberFormatter::append broken

I'm expecting the following to output "1.00", but it gives "10". Happens only with natural numbers. Looking at the code I think this is due to the conversion not outputting a separator but the padding code expecting one.

#include <iostream>
#include <Poco/NumberFormatter.h>

int main(int argc, const char * argv[]) {
  Poco::NumberFormatter f;
  string s;
  f.append(s, static_cast<double>(1), 2);
  std::cout << s << std::endl; // => 10
  return 0;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.