Giter Site home page Giter Site logo

pocoproject / poco Goto Github PK

View Code? Open in Web Editor NEW
7.8K 417.0 2.1K 157.59 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.46% Makefile 0.23% C++ 47.82% C 50.76% HTML 0.04% CSS 0.03% JavaScript 0.22% Shell 0.12% Perl 0.01% PowerShell 0.06% Batchfile 0.11% Rich Text Format 0.01% Yacc 0.12% Lex 0.02% Python 0.01%
c-plus-plus xml json networking logging http-client http-server configuration cross-platform sql

poco's People

Contributors

aleks-f avatar bachp avatar bakercp avatar bas524 avatar bjoe avatar bschramke avatar bufferoverflow avatar burgch avatar cristiantm avatar cryptoknight avatar cunj123 avatar devcjohnson avatar fandremxw avatar fat-crocodile avatar fbraem avatar frwilckens avatar guruofquality avatar hmartinez82 avatar jackywoo avatar karlr42 avatar kevdi avatar kontinuation avatar linquize avatar martin-osborne avatar matejk avatar micheleselea avatar obiltschnig avatar pasorobo avatar rangelreale avatar zosrothko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poco's Issues

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...

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

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.

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

'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.

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

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

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

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.

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;
}

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.

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

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);
}

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.

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

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.

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

bquenin@Bertrand-Quenins-MacBook-Pro:~/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.

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

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.

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.

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

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.

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.

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.

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!

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.

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);

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

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).

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

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.

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

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.

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.

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.

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.