mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
Solaris and non-Cygwin pthreads fixes (Serge: backport to 1.3.3)
This commit is contained in:
parent
f5c0603771
commit
81fcb5cbf5
@ -39,8 +39,10 @@
|
||||
#include "Poco/ErrorHandler.h"
|
||||
#include <signal.h>
|
||||
#if defined(__sun) && defined(__SVR4)
|
||||
#define __EXTENSIONS__
|
||||
#include <limits.h>
|
||||
# if !defined(__EXTENSIONS__)
|
||||
# define __EXTENSIONS__
|
||||
# endif
|
||||
# include <limits.h>
|
||||
#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)
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,9 +37,10 @@
|
||||
#include "Poco/Runnable.h"
|
||||
#include "Poco/ThreadTarget.h"
|
||||
#include "Poco/Event.h"
|
||||
#include <iostream>
|
||||
#if defined(__sun) && defined(__SVR4)
|
||||
#define __EXTENSIONS__
|
||||
# if !defined(__EXTENSIONS__)
|
||||
# define __EXTENSIONS__
|
||||
# endif
|
||||
#include <limits.h>
|
||||
#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());
|
||||
|
Loading…
Reference in New Issue
Block a user