OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../clucene/clucene-gcc-atomics.patch
  5. # Copyright (C) 2013 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- clucene-core-2.3.3.4/src/shared/CLucene/config/threads.cpp 2012-02-23 12:06:55.355506304 +0000
  17. +++ clucene-core-2.3.3.4/src/shared/CLucene/config/threads.cpp 2012-02-23 12:07:17.131766381 +0000
  18. @@ -185,7 +185,7 @@
  19. }
  20. int32_t atomic_threads::atomic_increment(_LUCENE_ATOMIC_INT *theInteger){
  21. - #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS
  22. + #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
  23. return __sync_add_and_fetch(theInteger, 1);
  24. #else
  25. SCOPED_LOCK_MUTEX(theInteger->THIS_LOCK)
  26. @@ -193,7 +193,7 @@
  27. #endif
  28. }
  29. int32_t atomic_threads::atomic_decrement(_LUCENE_ATOMIC_INT *theInteger){
  30. - #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS
  31. + #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
  32. return __sync_sub_and_fetch(theInteger, 1);
  33. #else
  34. SCOPED_LOCK_MUTEX(theInteger->THIS_LOCK)
  35. --- clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h 2012-02-23 12:36:28.388299322 +0000
  36. +++ clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h 2012-02-23 12:37:23.131885433 +0000
  37. @@ -70,7 +70,7 @@
  38. void NotifyAll();
  39. };
  40. - #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS
  41. + #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
  42. #define _LUCENE_ATOMIC_INT uint32_t
  43. #define _LUCENE_ATOMIC_INT_SET(x,v) x=v
  44. #define _LUCENE_ATOMIC_INT_GET(x) x