mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
systemclock: fix usage of __STDC_NO_ATOMICS__
__STDC_NO_ATOMICS doesn't seem to exist. In fact the only compiler I've found that sets any of those is msvc, but it sets __STDC_NO_ATOMICS__, not __STDC_NO_ATOMICS. __STDC_NO_ATOMICS__ is the one documented by C11 standard. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6848>
This commit is contained in:
parent
64cac1ed99
commit
0e3e688bed
1 changed files with 3 additions and 3 deletions
|
@ -75,7 +75,7 @@ static LARGE_INTEGER performance_counter_frequency;
|
|||
* to a simple memory read.
|
||||
*/
|
||||
#if defined __APPLE__ || defined G_OS_WIN32
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS)
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)
|
||||
#include <stdatomic.h>
|
||||
|
||||
typedef atomic_int gst_atomic_int;
|
||||
|
@ -112,11 +112,11 @@ gst_atomic_int_set_release (gst_atomic_int * x, gint val)
|
|||
{
|
||||
InterlockedOrRelease (x, 1);
|
||||
}
|
||||
#else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS) */
|
||||
#else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__) */
|
||||
typedef int gst_atomic_int;
|
||||
#define gst_atomic_int_get_acquire(x) g_atomic_int_get(x)
|
||||
#define gst_atomic_int_set_release(x, val) g_atomic_int_set(x, val)
|
||||
#endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS) */
|
||||
#endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__) */
|
||||
#endif /* defined __APPLE__ || defined G_OS_WIN32 */
|
||||
|
||||
/* priv_gst_clock_init:
|
||||
|
|
Loading…
Reference in a new issue