aboutsummaryrefslogtreecommitdiffstats
path: root/taglib/toolkit
diff options
context:
space:
mode:
authorScott Wheeler <scott@directededge.com>2020-12-20 18:38:05 +0100
committerScott Wheeler <scott@directededge.com>2020-12-20 18:38:05 +0100
commit8f6b6ac055a94ab7a274bae63cb3ffbf8a3939c0 (patch)
treee483a03b7bcbbb712dd7ded237aa80eadba73767 /taglib/toolkit
parenta5f11697f704a2eddb8ba211b516ce27a8fb8099 (diff)
Don't pull in C++11+ for one class
Diffstat (limited to 'taglib/toolkit')
-rw-r--r--taglib/toolkit/trefcounter.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/taglib/toolkit/trefcounter.cpp b/taglib/toolkit/trefcounter.cpp
index 6638fcaa..18cb596c 100644
--- a/taglib/toolkit/trefcounter.cpp
+++ b/taglib/toolkit/trefcounter.cpp
@@ -29,12 +29,7 @@
#include "trefcounter.h"
-#if defined(HAVE_STD_ATOMIC)
-# include <atomic>
-# define ATOMIC_INT std::atomic_int
-# define ATOMIC_INC(x) (++x)
-# define ATOMIC_DEC(x) (--x)
-#elif defined(HAVE_GCC_ATOMIC)
+#if defined(HAVE_GCC_ATOMIC)
# define ATOMIC_INT int
# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)
# define ATOMIC_DEC(x) __sync_sub_and_fetch(&x, 1)
@@ -57,7 +52,7 @@
# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)
# define ATOMIC_DEC(x) __sync_sub_and_fetch(&x, 1)
#else
-# define ATOMIC_INT int
+# define ATOMIC_INT volatile int
# define ATOMIC_INC(x) (++x)
# define ATOMIC_DEC(x) (--x)
#endif