Fix "error: duplicate ‘volatile’" on systems without HAVE_GCC_ATOMIC in 1.12 (#1012)

* fix error: duplicate volatile

* fix volatile ATOMIC_INT in constructor
This commit is contained in:
Oleg Antonyan
2021-05-13 16:41:35 +02:00
committed by GitHub
parent 4971f8fb03
commit 1d24bd3399

View File

@ -52,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 volatile int
# define ATOMIC_INT int
# define ATOMIC_INC(x) (++x)
# define ATOMIC_DEC(x) (--x)
#endif