Skip to content

Commit 4507e32

Browse files
authored
CDRIVER-5813 remove misplaced define BSON_IF_MSVC (#1790)
* define `BSON_IF_MSVC` and `BSON_IF_GNU_LIKE` as empty for unsupported compilers
1 parent 6017794 commit 4507e32

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/common/src/common-atomic-private.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ enum mcommon_memory_order {
5757
#ifdef MCOMMON_USE_LEGACY_GCC_ATOMICS
5858
#undef BSON_IF_GNU_LIKE
5959
#define BSON_IF_GNU_LIKE(...)
60-
#define BSON_IF_MSVC(...)
6160
#define MCOMMON_IF_GNU_LEGACY_ATOMICS(...) __VA_ARGS__
6261
#else
6362
#define MCOMMON_IF_GNU_LEGACY_ATOMICS(...)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ enum BSON_GNUC_DEPRECATED bson_memory_order {
7878
#ifdef BSON_USE_LEGACY_GCC_ATOMICS
7979
#undef BSON_IF_GNU_LIKE
8080
#define BSON_IF_GNU_LIKE(...)
81-
#define BSON_IF_MSVC(...)
8281
#define BSON_IF_GNU_LEGACY_ATOMICS(...) __VA_ARGS__
8382
#else
8483
#define BSON_IF_GNU_LEGACY_ATOMICS(...)

src/libbson/src/bson/bson-compat.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ typedef signed char bool;
189189
#define BSON_IF_MSVC(...)
190190
/** Expands the arguments if compiling with GCC or Clang, otherwise empty */
191191
#define BSON_IF_GNU_LIKE(...) __VA_ARGS__
192+
#else
193+
/** Unsupported compiler. **/
194+
#define BSON_IF_MSVC(...)
195+
#define BSON_IF_GNU_LIKE(...)
192196
#endif
193197

194198
#ifdef BSON_OS_WIN32

0 commit comments

Comments
 (0)