about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-05-15 21:08:55 -0700
committerUlrich Drepper <drepper@redhat.com>2009-05-15 21:08:55 -0700
commit3b1b533bc3239ef6df1e40e0088e7270ac060be6 (patch)
tree7361f6941ebb4e4eab5ebb1774bca859ea7b6b0b
parent6dd78596d56c61e952acf1ab75fe17ab62f768c1 (diff)
downloadglibc-3b1b533bc3239ef6df1e40e0088e7270ac060be6.tar.gz
glibc-3b1b533bc3239ef6df1e40e0088e7270ac060be6.tar.xz
glibc-3b1b533bc3239ef6df1e40e0088e7270ac060be6.zip
Avoid double definition of catomic_compare_and_exchange_val_acq.
-rw-r--r--ChangeLog6
-rw-r--r--include/atomic.h19
2 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index aa121bae3f..26ebd219a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-12  Jakub Jelinek  <jakub@redhat.com>
+
+	* include/atomic.h: Formatting.
+	(catomic_compare_and_exchange_val_acq): Don't define if already
+	defined by bits/atomic.h.
+
 2009-05-14  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/i386/fallocate64.c (__fallocate64_l64):
diff --git a/include/atomic.h b/include/atomic.h
index 7c0548b004..9366f78734 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -95,14 +95,15 @@
 #endif
 
 
-#if !defined catomic_compare_and_exchange_val_acq \
-    && defined __arch_c_compare_and_exchange_val_32_acq
-# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
+#ifndef catomic_compare_and_exchange_val_acq
+# ifdef __arch_c_compare_and_exchange_val_32_acq
+#  define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
   __atomic_val_bysize (__arch_c_compare_and_exchange_val,acq,		      \
 		       mem, newval, oldval)
-#else
-# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
+# else
+#  define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
   atomic_compare_and_exchange_val_acq (mem, newval, oldval)
+# endif
 #endif
 
 
@@ -125,8 +126,8 @@
 #  define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
   __atomic_bool_bysize (__arch_compare_and_exchange_bool,acq,		      \
 		        mem, newval, oldval)
-#  else
-#   define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
+# else
+#  define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
   ({ /* Cannot use __oldval here, because macros later in this file might     \
 	call this macro with __oldval argument.	 */			      \
      __typeof (oldval) __atg3_old = (oldval);				      \
@@ -142,8 +143,8 @@
 #  define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
   __atomic_bool_bysize (__arch_c_compare_and_exchange_bool,acq,		      \
 		        mem, newval, oldval)
-#  else
-#   define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
+# else
+#  define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
   ({ /* Cannot use __oldval here, because macros later in this file might     \
 	call this macro with __oldval argument.	 */			      \
      __typeof (oldval) __atg4_old = (oldval);				      \