Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / clucene / patches / clucene-gcc-atomics.patch
blob819e9a7d7a3e79aa40e2776a930acae9c8db6347
1 --- src/shared/CLucene/config/threads.cpp 2012-02-23 12:06:55.355506304 +0000
2 +++ src/shared/CLucene/config/threads.cpp 2012-02-23 12:07:17.131766381 +0000
3 @@ -185,7 +185,7 @@
6 int32_t atomic_threads::atomic_increment(_LUCENE_ATOMIC_INT *theInteger){
7 - #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS
8 + #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
9 return __sync_add_and_fetch(theInteger, 1);
10 #else
11 SCOPED_LOCK_MUTEX(theInteger->THIS_LOCK)
12 @@ -193,7 +193,7 @@
13 #endif
15 int32_t atomic_threads::atomic_decrement(_LUCENE_ATOMIC_INT *theInteger){
16 - #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS
17 + #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
18 return __sync_sub_and_fetch(theInteger, 1);
19 #else
20 SCOPED_LOCK_MUTEX(theInteger->THIS_LOCK)
21 --- src/shared/CLucene/LuceneThreads.h 2012-02-23 12:36:28.388299322 +0000
22 +++ src/shared/CLucene/LuceneThreads.h 2012-02-23 12:37:23.131885433 +0000
23 @@ -70,7 +70,7 @@
24 void NotifyAll();
27 - #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS
28 + #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
29 #define _LUCENE_ATOMIC_INT uint32_t
30 #define _LUCENE_ATOMIC_INT_SET(x,v) x=v
31 #define _LUCENE_ATOMIC_INT_GET(x) x