- updated for 1.5.4.4910
[packages/Firebird.git] / Firebird-fix-pthreads-detect.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 005_fix-pthreads-detect.dpatch by  <divanov@creditreform.bg>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Fix pthreads detection
6
7 @DPATCH@
8
9 --- firebird-1.5.4.4910/src/common/classes/locks.h.orig 2007-01-22 13:27:50.000000000 +0100
10 +++ firebird-1.5.4.4910/src/common/classes/locks.h      2007-02-17 23:02:48.169652007 +0100
11 @@ -29,24 +29,22 @@
12  #include "firebird.h"
13  
14  #ifdef MULTI_THREAD
15 -#ifdef WIN_NT
16 +#if defined(WIN_NT)
17  // It is relatively easy to avoid using this header. Maybe do the same stuff like
18  // in thd.h ? This is Windows platform maintainers choice
19  #include <windows.h>
20 -#else
21 -#ifndef SOLARIS
22 -#include <pthread.h>
23 -#else
24 +#elif defined(SOLARIS)
25  #include <thread.h>
26  #include <synch.h>
27 -#endif
28 +#else
29 +#include <pthread.h>
30  #endif
31  #endif /* MULTI_THREAD */
32  
33  namespace Firebird {
34  
35  #ifdef MULTI_THREAD
36 -#ifdef WIN_NT
37 +#if defined(WIN_NT)
38  
39  /* Process-local spinlock. Used to manage memory heaps in threaded environment. */
40  // Windows version of the class
41 @@ -77,7 +75,7 @@
42  
43  /* Process-local spinlock. Used to manage memory heaps in threaded environment. */
44  // Pthreads version of the class
45 -#if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && !defined(AIX) && !defined(HPUX)
46 +#if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && !defined(AIX) && !defined(HPUX) && !defined(_POSIX_THREAD_IS_GNU_PTH)
47  class Spinlock {
48  private:
49         pthread_spinlock_t spinlock;
50 @@ -124,7 +122,7 @@
51                         system_call_failed::raise();
52         }
53  };
54 -#else  // DARWIN, FREEBSD, AIX, HPUX
55 +#else  // DARWIN, FREEBSD, AIX, HPUX and gnu pth
56  class Spinlock {
57  private:
58         pthread_mutex_t mlock;
This page took 0.029766 seconds and 3 git commands to generate.