Skip to content

Commit bf20ebb

Browse files
authored
Fix inttype non-modular header issue when building from an .xcodeproj (#530)
Adds back a patch removed from the vendoring script in #526 to work around an issue building the driver from a command-line generated .xcodeproj.
1 parent c3125ff commit bf20ebb

19 files changed

+303
-3
lines changed

Sources/CLibMongoC/bson/bson-iso8601.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
#include "CLibMongoC_bson-json.h"
2323
#include "bson-timegm-private.h"
2424

25+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
26+
#include <inttypes.h>
27+
#endif
2528

2629
static bool
2730
get_tok (const char *terminals,

Sources/CLibMongoC/bson/bson-json.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#include "CLibMongoC_common-b64-private.h"
2929
#include "jsonsl.h"
3030

31+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
32+
#include <inttypes.h>
33+
#endif
34+
3135
#ifdef _WIN32
3236
#include <io.h>
3337
#include <share.h>

Sources/CLibMongoC/bson/bson.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
#define BSON_MAX_RECURSION 200
3232
#endif
3333

34+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
35+
#include <inttypes.h>
36+
#endif
3437

3538
typedef enum {
3639
BSON_VALIDATE_PHASE_START,

Sources/CLibMongoC/include/CLibMongoC_bson-compat.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@
8282

8383
BSON_BEGIN_DECLS
8484

85-
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
86-
#include <inttypes.h>
87-
#endif
8885
#ifdef _MSC_VER
8986
#ifndef __cplusplus
9087
/* benign redefinition of type */

Sources/CLibMongoC/mongoc/mongoc-buffer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
#include "mongoc-buffer-private.h"
2323
#include "mongoc-trace-private.h"
2424

25+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
26+
#include <inttypes.h>
27+
#endif
2528

2629
#undef MONGOC_LOG_DOMAIN
2730
#define MONGOC_LOG_DOMAIN "buffer"

Sources/CLibMongoC/mongoc/mongoc-bulk-operation.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#include "mongoc-opts-private.h"
2525
#include "mongoc-write-command-private.h"
2626

27+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
28+
#include <inttypes.h>
29+
#endif
2730

2831
/*
2932
* This is the implementation of both write commands and bulk write commands.

Sources/CLibMongoC/mongoc/mongoc-change-stream.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
#include "CLibMongoC_mongoc-error.h"
2525
#include "mongoc-error-private.h"
2626

27+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
28+
#include <inttypes.h>
29+
#endif
30+
2731
#define CHANGE_STREAM_ERR(_str) \
2832
bson_set_error (&stream->err, \
2933
MONGOC_ERROR_CURSOR, \

Sources/CLibMongoC/mongoc/mongoc-client-pool.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#include "mongoc-topology-background-monitoring-private.h"
2929
#include "mongoc-trace-private.h"
3030

31+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
32+
#include <inttypes.h>
33+
#endif
34+
3135
#ifdef MONGOC_ENABLE_SSL
3236
#include "mongoc-ssl-private.h"
3337
#endif

Sources/CLibMongoC/mongoc/mongoc-client.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
#include "mongoc-opts-private.h"
7070
#endif
7171

72+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
73+
#include <inttypes.h>
74+
#endif
7275

7376
#undef MONGOC_LOG_DOMAIN
7477
#define MONGOC_LOG_DOMAIN "client"

Sources/CLibMongoC/mongoc/mongoc-collection.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include "mongoc-write-command-private.h"
4141
#include "mongoc-error-private.h"
4242

43+
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
44+
#include <inttypes.h>
45+
#endif
46+
4347
#undef MONGOC_LOG_DOMAIN
4448
#define MONGOC_LOG_DOMAIN "collection"
4549

0 commit comments

Comments
 (0)