]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
assert: work around libatomic_ops vs assert in a less lame way
authorSage Weil <sage@newdream.net>
Wed, 31 Aug 2011 17:05:09 +0000 (10:05 -0700)
committerSage Weil <sage@newdream.net>
Wed, 31 Aug 2011 17:05:09 +0000 (10:05 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/include/assert.h
src/include/atomic.h

index f3f60f57bab0227d94feee5798f82413bae0b8e9..88bdc41cc6891f1afb8e0c3a4b0aa368eaea3298 100644 (file)
@@ -7,16 +7,6 @@
 # include "acconfig.h"
 #endif
 
-/*
- * atomic_ops.h includes the system assert.h, which will redefine
- * 'assert' even if it's already been included.  so, make sure we
- * include atomic_ops.h first so that we don't get an #include
- * <assert.h> again later.
- */
-#ifndef NO_ATOMIC_OPS
-# include "atomic_ops.h"
-#endif
-
 struct CephContext;
 
 #ifdef __cplusplus
index 5d4a9a31277167a8d9e7eafca374ac00a73491e9..f2e56f9134bb43f4be47be6741a0f7345056bffb 100644 (file)
 #endif
 
 #ifndef NO_ATOMIC_OPS
-//libatomic_ops implementation
+
+// libatomic_ops implementation
 #include <atomic_ops.h>
 
+// reinclude our assert to clobber the system one
+#include "include/assert.h"
+
 namespace ceph {
   class atomic_t {
     AO_t val;