]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix 2008-08-03 commit.
authorBruno Haible <bruno@clisp.org>
Mon, 18 Aug 2008 10:43:05 +0000 (10:43 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:48 +0000 (12:15 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/lock.c
gettext-runtime/intl/lock.h

index 0395842ef16db95fb78edf2fd8aa4a935eafe48d..d7dc75b341246fda9695104eebfd6ddb30d09597 100644 (file)
@@ -1,3 +1,9 @@
+2008-08-18  Bruno Haible  <bruno@clisp.org>
+
+       * lock.h [USE_SOLARIS_THREADS]: Fix glthread_recursive_lock_* macros.
+       * lock.c (glthread_recursive_lock_destroy_multithreaded): Fix syntax
+       error.
+
 2008-08-17  Bruno Haible  <bruno@clisp.org>
 
        * lock.h: Include <stdlib.h> always.
index 31c05bc05c8230333ecc5ea119f1414459840de1..5a6212514140db934484b974d6ee9e4a64a3422e 100644 (file)
@@ -446,7 +446,7 @@ glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
 {
   if (lock->owner != (pthread_t) 0)
     return EBUSY;
-  return (pthread_mutex_destroy (&lock->mutex);
+  return pthread_mutex_destroy (&lock->mutex);
 }
 
 # endif
index 7b0d26dc393811125e0bf27699a0ebfd2266881b..c7afa66b1fd108d9011850f23dd6d016a9f0159a 100644 (file)
@@ -578,33 +578,13 @@ typedef struct
 # define gl_recursive_lock_initializer \
     { DEFAULTMUTEX, (thread_t) 0, 0 }
 # define glthread_recursive_lock_init(LOCK) \
-    do                                          \
-      {                                         \
-        if (thread_in_use ())                   \
-          glthread_recursive_lock_init_multithreaded (LOCK); \
-      }                                         \
-    while (0)
+    (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
 # define glthread_recursive_lock_lock(LOCK) \
-    do                                          \
-      {                                         \
-        if (thread_in_use ())                   \
-          glthread_recursive_lock_lock_multithreaded (LOCK); \
-      }                                         \
-    while (0)
+    (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
 # define glthread_recursive_lock_unlock(LOCK) \
-    do                                            \
-      {                                           \
-        if (thread_in_use ())                     \
-          glthread_recursive_lock_unlock_multithreaded (LOCK); \
-      }                                           \
-    while (0)
+    (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
 # define glthread_recursive_lock_destroy(LOCK) \
-    do                                             \
-      {                                            \
-        if (thread_in_use ())                      \
-          glthread_recursive_lock_destroy_multithreaded (LOCK); \
-      }                                            \
-    while (0)
+    (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
 extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
 extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
 extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);