[Libreoffice-commits] .: sal/osl

Caolán McNamara caolan at kemper.freedesktop.org
Sat Jan 29 05:36:30 PST 2011


 sal/osl/unx/interlck.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8c679d518edf2762d93842d2143bbd2c2daeb3e5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 29 13:36:24 2011 +0000

    that decrement doesn't look right

diff --git a/sal/osl/unx/interlck.c b/sal/osl/unx/interlck.c
index 3ab6e96..6345279 100644
--- a/sal/osl/unx/interlck.c
+++ b/sal/osl/unx/interlck.c
@@ -86,6 +86,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
         :   "+r" (nCount), "+m" (*pCount)
         :   /* nothing */
         :   "memory");
+        return --nCount;
     }
 #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4)  && ( __GNUC_MINOR__ >= 4 ))
     else
@@ -103,7 +104,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
 #endif
 }
 
-#elif defined ( GCC )
+#elif ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
 oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
 {
     return __sync_add_and_fetch(pCount, 1);


More information about the Libreoffice-commits mailing list