diff options
author | Martin Storsjö <martin@martin.st> | 2013-03-08 11:16:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-08 20:54:40 +0100 |
commit | 309d6f5077e4b81cf519c004abace374f5d357b4 (patch) | |
tree | 36f1c2b1c0021be38b4eb1487a72bc833afa6040 /libavutil | |
parent | 160979f4b4cd06833a7a5c7fa8794e7a05095bce (diff) | |
download | ffmpeg-309d6f5077e4b81cf519c004abace374f5d357b4.tar.gz |
atomic: Add include guards to the implementation headers
This makes them pass standalone compilation tests. Previously,
they included atomic.h which included themselves again, leading to
double definitions.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/atomic_gcc.h | 5 | ||||
-rw-r--r-- | libavutil/atomic_suncc.h | 4 | ||||
-rw-r--r-- | libavutil/atomic_win32.h | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/libavutil/atomic_gcc.h b/libavutil/atomic_gcc.h index 57c20bbe40..84ebcab768 100644 --- a/libavutil/atomic_gcc.h +++ b/libavutil/atomic_gcc.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef AVUTIL_ATOMIC_GCC_H +#define AVUTIL_ATOMIC_GCC_H + #include "atomic.h" #define avpriv_atomic_int_get atomic_int_get_gcc @@ -46,3 +49,5 @@ static inline void *atomic_ptr_cas_gcc(void * volatile *ptr, { return __sync_val_compare_and_swap(ptr, oldval, newval); } + +#endif /* AVUTIL_ATOMIC_GCC_H */ diff --git a/libavutil/atomic_suncc.h b/libavutil/atomic_suncc.h index 69cce41354..3cad24a051 100644 --- a/libavutil/atomic_suncc.h +++ b/libavutil/atomic_suncc.h @@ -17,6 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef AVUTIL_ATOMIC_SUNCC_H +#define AVUTIL_ATOMIC_SUNCC_H + #include <atomic.h> #include <mbarrier.h> @@ -49,3 +52,4 @@ static inline void *atomic_ptr_cas_suncc(void * volatile *ptr, return atomic_cas_ptr(ptr, oldval, newval); } +#endif /* AVUTIL_ATOMIC_SUNCC_H */ diff --git a/libavutil/atomic_win32.h b/libavutil/atomic_win32.h index cf49c55549..f4ee07853f 100644 --- a/libavutil/atomic_win32.h +++ b/libavutil/atomic_win32.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef AVUTIL_ATOMIC_WIN32_H +#define AVUTIL_ATOMIC_WIN32_H + #include <windows.h> #include "atomic.h" @@ -48,3 +51,5 @@ static inline void *atomic_ptr_cas_win32(void * volatile *ptr, { return InterlockedCompareExchangePointer(ptr, newval, oldval); } + +#endif /* AVUTIL_ATOMIC_WIN32_H */ |