Skip to content

CDRIVER-5813 remove misplaced define BSON_IF_MSVC #1790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

kevinAlbs
Copy link
Collaborator

#1096 added a conditional #define BSON_IF_MSVC(...) to bson-atomic.h without later undefining.

This PR assumes the #define BSON_IF_MSVC(...) was motivated by BSON_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 caused BSON_IF_MSVC to not be defined.

This PR changes bson-compat.h to define BSON_IF_MSVC (and BSON_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.

@kevinAlbs kevinAlbs marked this pull request as ready for review November 15, 2024 19:20
Copy link
Contributor

@vector-of-bool vector-of-bool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinAlbs kevinAlbs merged commit 4507e32 into mongodb:master Dec 4, 2024
22 of 45 checks passed
kevinAlbs added a commit that referenced this pull request Dec 4, 2024
* define `BSON_IF_MSVC` and `BSON_IF_GNU_LIKE` as empty for unsupported compilers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants