#! /bin/sh /usr/share/dpatch/dpatch-run ## 005_fix-pthreads-detect.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix pthreads detection @DPATCH@ --- firebird-1.5.4.4910/src/common/classes/locks.h.orig 2007-01-22 13:27:50.000000000 +0100 +++ firebird-1.5.4.4910/src/common/classes/locks.h 2007-02-17 23:02:48.169652007 +0100 @@ -29,24 +29,22 @@ #include "firebird.h" #ifdef MULTI_THREAD -#ifdef WIN_NT +#if defined(WIN_NT) // It is relatively easy to avoid using this header. Maybe do the same stuff like // in thd.h ? This is Windows platform maintainers choice #include -#else -#ifndef SOLARIS -#include -#else +#elif defined(SOLARIS) #include #include -#endif +#else +#include #endif #endif /* MULTI_THREAD */ namespace Firebird { #ifdef MULTI_THREAD -#ifdef WIN_NT +#if defined(WIN_NT) /* Process-local spinlock. Used to manage memory heaps in threaded environment. */ // Windows version of the class @@ -77,7 +75,7 @@ /* Process-local spinlock. Used to manage memory heaps in threaded environment. */ // Pthreads version of the class -#if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && !defined(AIX) && !defined(HPUX) +#if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && !defined(AIX) && !defined(HPUX) && !defined(_POSIX_THREAD_IS_GNU_PTH) class Spinlock { private: pthread_spinlock_t spinlock; @@ -124,7 +122,7 @@ system_call_failed::raise(); } }; -#else // DARWIN, FREEBSD, AIX, HPUX +#else // DARWIN, FREEBSD, AIX, HPUX and gnu pth class Spinlock { private: pthread_mutex_t mlock;