mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
160979f4b4
commit
309d6f5077
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user