diff --git a/Foundation/include/Poco/FIFOStrategy.h b/Foundation/include/Poco/FIFOStrategy.h index 0600ffaef..7e479ebbd 100644 --- a/Foundation/include/Poco/FIFOStrategy.h +++ b/Foundation/include/Poco/FIFOStrategy.h @@ -42,6 +42,7 @@ #include "Poco/NotificationStrategy.h" #include #include +#include namespace Poco { diff --git a/Foundation/src/Thread_POSIX.cpp b/Foundation/src/Thread_POSIX.cpp index 78459dabb..5f8ee9547 100644 --- a/Foundation/src/Thread_POSIX.cpp +++ b/Foundation/src/Thread_POSIX.cpp @@ -153,14 +153,14 @@ int ThreadImpl::getMaxOSPriorityImpl() void ThreadImpl::setStackSizeImpl(int size) { -#if (POCO_OS == POCO_OS_CYGWIN) +#ifndef PTHREAD_STACK_MIN _pData->stackSize = 0; #else if (size !=0 && size < PTHREAD_STACK_MIN) size = PTHREAD_STACK_MIN; _pData->stackSize = size; -#endif // (POCO_OS == POCO_OS_CYGWIN) +#endif // PTHREAD_STACK_MIN } diff --git a/Foundation/testsuite/src/CoreTest.cpp b/Foundation/testsuite/src/CoreTest.cpp index 590e92712..4ed015024 100644 --- a/Foundation/testsuite/src/CoreTest.cpp +++ b/Foundation/testsuite/src/CoreTest.cpp @@ -40,7 +40,7 @@ #include "Poco/Buffer.h" #include #include -#include +#include using Poco::Bugcheck; diff --git a/Foundation/testsuite/src/ThreadTest.cpp b/Foundation/testsuite/src/ThreadTest.cpp index 6b76b530e..0e5220988 100644 --- a/Foundation/testsuite/src/ThreadTest.cpp +++ b/Foundation/testsuite/src/ThreadTest.cpp @@ -269,9 +269,12 @@ void ThreadTest::testThreadFunction() void ThreadTest::testThreadStackSize() { - int stackSize = 50000000; + // some platforms (e.g. Fedora Core9/g++ 4.3.0) ignore set stack size value + // so some asserts will fail here + int stackSize = 50000000; Thread thread; + assert (0 == thread.getStackSize()); thread.setStackSize(stackSize); assert (stackSize == thread.getStackSize()); @@ -282,11 +285,11 @@ void ThreadTest::testThreadStackSize() stackSize = 1; thread.setStackSize(stackSize); -#if defined(POCO_OS_FAMILY_UNIX) && !(POCO_OS == POCO_OS_CYGWIN) +#ifdef PTHREAD_STACK_MIN assert (PTHREAD_STACK_MIN == thread.getStackSize()); #else assert (stackSize == thread.getStackSize()); -#endif +#endif // PTHREAD_STACK_MIN tmp = MyRunnable::_staticVar; thread.start(freeFunc, &tmp); thread.join();