Skip to content

Commit 02b91f4

Browse files
committed
use legacy atomics on gcc < 5
1 parent cdfb5e0 commit 02b91f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libbson/src/bson/bson-atomic.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ enum bson_memory_order {
4747
#define MSVC_MEMORDER_SUFFIX(X)
4848
#endif
4949

50-
#if defined(USE_LEGACY_GCC_ATOMICS) || (!defined(__clang__) && \
51-
__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 9)
50+
#if defined(USE_LEGACY_GCC_ATOMICS) || \
51+
(!defined(__clang__) && __GNUC__ == 4)
5252
#define BSON_USE_LEGACY_GCC_ATOMICS
5353
#else
5454
#undef BSON_USE_LEGACY_GCC_ATOMICS
5555
#endif
5656

5757
/* Not all GCC-like compilers support the current __atomic built-ins. Older
58-
* GCC (pre-4.9) used different built-ins named with the __sync prefix. When
58+
* GCC (pre-5) used different built-ins named with the __sync prefix. When
5959
* compiling with such older GCC versions, it is necessary to use the applicable
6060
* functions, which requires redefining BSON_IF_GNU_LIKE and defining the
6161
* additional BSON_IF_GNU_LEGACY_ATOMICS macro here. */

0 commit comments

Comments
 (0)