diff --git a/Foundation/src/Thread_POSIX.cpp b/Foundation/src/Thread_POSIX.cpp index c52fe2ce1..78459dabb 100644 --- a/Foundation/src/Thread_POSIX.cpp +++ b/Foundation/src/Thread_POSIX.cpp @@ -39,8 +39,10 @@ #include "Poco/ErrorHandler.h" #include #if defined(__sun) && defined(__SVR4) -#define __EXTENSIONS__ -#include +# if !defined(__EXTENSIONS__) +# define __EXTENSIONS__ +# endif +# include #endif @@ -151,14 +153,14 @@ int ThreadImpl::getMaxOSPriorityImpl() void ThreadImpl::setStackSizeImpl(int size) { -#ifdef POCO_OS_CYGWIN +#if (POCO_OS == POCO_OS_CYGWIN) _pData->stackSize = 0; #else if (size !=0 && size < PTHREAD_STACK_MIN) size = PTHREAD_STACK_MIN; _pData->stackSize = size; -#endif +#endif // (POCO_OS == POCO_OS_CYGWIN) } diff --git a/Foundation/testsuite/src/ThreadTest.cpp b/Foundation/testsuite/src/ThreadTest.cpp index d0bdf6432..6b76b530e 100644 --- a/Foundation/testsuite/src/ThreadTest.cpp +++ b/Foundation/testsuite/src/ThreadTest.cpp @@ -37,9 +37,10 @@ #include "Poco/Runnable.h" #include "Poco/ThreadTarget.h" #include "Poco/Event.h" -#include #if defined(__sun) && defined(__SVR4) -#define __EXTENSIONS__ +# if !defined(__EXTENSIONS__) +# define __EXTENSIONS__ +# endif #include #endif @@ -281,7 +282,7 @@ void ThreadTest::testThreadStackSize() stackSize = 1; thread.setStackSize(stackSize); -#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_OS_CYGWIN) +#if defined(POCO_OS_FAMILY_UNIX) && !(POCO_OS == POCO_OS_CYGWIN) assert (PTHREAD_STACK_MIN == thread.getStackSize()); #else assert (stackSize == thread.getStackSize());