[1954327] CYGWIN's pthread does not define PTHREAD_STACK_MIN (2nd time)

This commit is contained in:
Aleksandar Fabijanic
2008-05-02 22:45:54 +00:00
parent 4ec68cecaf
commit 6c014c25d3
2 changed files with 8 additions and 6 deletions

View File

@@ -151,12 +151,14 @@ int ThreadImpl::getMaxOSPriorityImpl()
void ThreadImpl::setStackSizeImpl(int size) void ThreadImpl::setStackSizeImpl(int size)
{ {
#ifndef POCO_OS_CYGWIN #ifdef POCO_OS_CYGWIN
_pData->stackSize = 0;
#else
if (size !=0 && size < PTHREAD_STACK_MIN) if (size !=0 && size < PTHREAD_STACK_MIN)
size = PTHREAD_STACK_MIN; size = PTHREAD_STACK_MIN;
#endif
_pData->stackSize = size; _pData->stackSize = size;
#endif
} }

View File

@@ -281,7 +281,7 @@ void ThreadTest::testThreadStackSize()
stackSize = 1; stackSize = 1;
thread.setStackSize(stackSize); thread.setStackSize(stackSize);
#ifdef POCO_OS_FAMILY_UNIX #if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_OS_CYGWIN)
assert (PTHREAD_STACK_MIN == thread.getStackSize()); assert (PTHREAD_STACK_MIN == thread.getStackSize());
#else #else
assert (stackSize == thread.getStackSize()); assert (stackSize == thread.getStackSize());