From dc296cc63a0d6fdb03764b41d0d611fa04d03628 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Tue, 3 Jun 2008 02:19:28 +0000 Subject: [PATCH] backport from trunk: [1981865] Cygwin Makefile lacks ThreadTarget.cpp [1954327] CYGWIN's pthread does not define PTHREAD_STACK_MIN --- Foundation/Makefile | 2 +- Foundation/src/Thread_POSIX.cpp | 4 ++-- Foundation/testsuite/src/ThreadTest.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Foundation/Makefile b/Foundation/Makefile index 14bf1a24d..0d50d7542 100644 --- a/Foundation/Makefile +++ b/Foundation/Makefile @@ -26,7 +26,7 @@ objects = ArchiveStrategy ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder StreamTokenizer String StringTokenizer SynchronizedObject \ Task TaskManager TaskNotification TeeStream Hash HashStatistic \ TemporaryFile TextConverter TextEncoding TextIterator Thread ThreadLocal \ - ThreadPool ActiveDispatcher Timer Timespan Timestamp Timezone Token URI \ + ThreadPool ThreadTarget ActiveDispatcher Timer Timespan Timestamp Timezone Token URI \ FileStreamFactory URIStreamFactory URIStreamOpener UTF16Encoding Windows1252Encoding \ UTF8Encoding UnicodeConverter UUID UUIDGenerator Void Format \ Pipe PipeImpl PipeStream DynamicAny DynamicAnyHolder SharedMemory \ diff --git a/Foundation/src/Thread_POSIX.cpp b/Foundation/src/Thread_POSIX.cpp index a71610364..3c85c004d 100644 --- a/Foundation/src/Thread_POSIX.cpp +++ b/Foundation/src/Thread_POSIX.cpp @@ -151,10 +151,10 @@ 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) + if (size != 0 && size < PTHREAD_STACK_MIN) size = PTHREAD_STACK_MIN; _pData->stackSize = size; diff --git a/Foundation/testsuite/src/ThreadTest.cpp b/Foundation/testsuite/src/ThreadTest.cpp index aecc3f20f..3fb7a102a 100644 --- a/Foundation/testsuite/src/ThreadTest.cpp +++ b/Foundation/testsuite/src/ThreadTest.cpp @@ -281,7 +281,7 @@ void ThreadTest::testThreadStackSize() stackSize = 1; thread.setStackSize(stackSize); -#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_OS_CYGWIN) +#if !(POCO_OS == POCO_OS_CYGWIN) assert (PTHREAD_STACK_MIN == thread.getStackSize()); #else assert (stackSize == thread.getStackSize());