Details
Description
The build system for libbson and libmongoc must keep straight the distinction between "compiling on Windows" and "compiling with Microsoft Visual C". There are many ifdefs that check for BSON_OS_WIN32 and then include MSVC-specific code. This breaks under MinGW since BSON_OS_WIN32 is true in MinGW but mostly, compiling with MinGW is the same as compiling on Unix.
Most ifdefs that currently check for BSON_OS_WIN32 should instead check for _MSC_VER to
------
Original report:
bson-stdint.h not found when using MinGW:
The bson.h requires including bson-stdint.h which is renamed to bson-stdint-win32.h on Windows.
This is because the _MSC_VER is not defined (and is only defined with MSVC).
I propose to change the following code :
#ifdef _MSC_VER
|
# include "bson-stdint-win32.h"
|
// ... as before |
to something like this :
#if defined(_WIN32)
|
# include "bson-stdint.h-win32.h"
|
#endif
|
|
|
#if defined(_MSC_VER)
|
// ... as before specific for MSVC
|
#endif |
Attachments
Issue Links
- is related to
-
CDRIVER-959 mingw build & test in Evergreen
-
- Closed
-