]> granicus.if.org Git - libatomic_ops/commitdiff
Turn off AO primitives inlining if AO_NO_INLINE defined.
authorIvan Maidanski <ivmai@mail.ru>
Thu, 18 Aug 2011 10:00:56 +0000 (14:00 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 18 Aug 2011 10:00:56 +0000 (14:00 +0400)
* src/atomic_ops.h (AO_INLINE): Define as 'static' if AO_NO_INLINE
(new macro).

src/atomic_ops.h

index 4b8067b762f91d014cc20be90b270e79513e4a37..c971f06a5abeb6da66bc1f3c507cfd34905ce6f0 100644 (file)
 #define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
 
 /* Platform-dependent stuff:                                    */
-#if defined(__GNUC__) || defined(_MSC_VER) || defined(__INTEL_COMPILER) \
-        || defined(__DMC__) || defined(__WATCOMC__)
+#if (defined(__GNUC__) || defined(_MSC_VER) || defined(__INTEL_COMPILER) \
+        || defined(__DMC__) || defined(__WATCOMC__)) && !defined(AO_NO_INLINE)
 # define AO_INLINE static __inline
-#elif defined(__sun)
+#elif defined(__sun) && !defined(AO_NO_INLINE)
 # define AO_INLINE static inline
 #else
 # define AO_INLINE static