CDRIVER-5813 remove misplaced define BSON_IF_MSVC
#1790
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1096 added a conditional
#define BSON_IF_MSVC(...)
tobson-atomic.h
without later undefining.This PR assumes the
#define BSON_IF_MSVC(...)
was motivated byBSON_IF_MSVC
not being defined on xlC.BSON_IF_MSVC
is conditionally defined in in bson-compat.h. xlC (not xlclang) appears not to define__clang__
,__GNUC__
, or_MSC_VER
. I expect this causedBSON_IF_MSVC
to not be defined.This PR changes bson-compat.h to define
BSON_IF_MSVC
(andBSON_IF_GNU_LIKE
) to be empty on unsupported compilers. Though xLC is not tested or officially supported, this PR makes a best effort to preserve building.