-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathinttypes-non-modular-header-workaround.diff
277 lines (246 loc) · 9.09 KB
/
inttypes-non-modular-header-workaround.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
diff --git a/Sources/CLibMongoC/bson/bson-iso8601.c b/Sources/CLibMongoC/bson/bson-iso8601.c
index 2b2cdfc..b0fda88 100644
--- a/Sources/CLibMongoC/bson/bson-iso8601.c
+++ b/Sources/CLibMongoC/bson/bson-iso8601.c
@@ -22,6 +22,9 @@
#include "CLibMongoC_bson-json.h"
#include "bson-timegm-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
static bool
get_tok (const char *terminals,
diff --git a/Sources/CLibMongoC/bson/bson-json.c b/Sources/CLibMongoC/bson/bson-json.c
index 9ab1bb9..e58547e 100644
--- a/Sources/CLibMongoC/bson/bson-json.c
+++ b/Sources/CLibMongoC/bson/bson-json.c
@@ -28,6 +28,10 @@
#include "CLibMongoC_common-b64-private.h"
#include "jsonsl.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
#ifdef _WIN32
#include <io.h>
#include <share.h>
diff --git a/Sources/CLibMongoC/bson/bson.c b/Sources/CLibMongoC/bson/bson.c
index 183244c..83b4d9f 100644
--- a/Sources/CLibMongoC/bson/bson.c
+++ b/Sources/CLibMongoC/bson/bson.c
@@ -31,6 +31,9 @@
#define BSON_MAX_RECURSION 200
#endif
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
typedef enum {
BSON_VALIDATE_PHASE_START,
diff --git a/Sources/CLibMongoC/include/CLibMongoC_bson-compat.h b/Sources/CLibMongoC/include/CLibMongoC_bson-compat.h
index b77b2c4..3d112ba 100644
--- a/Sources/CLibMongoC/include/CLibMongoC_bson-compat.h
+++ b/Sources/CLibMongoC/include/CLibMongoC_bson-compat.h
@@ -82,9 +82,6 @@
BSON_BEGIN_DECLS
-#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
-#include <inttypes.h>
-#endif
#ifdef _MSC_VER
#ifndef __cplusplus
/* benign redefinition of type */
diff --git a/Sources/CLibMongoC/mongoc/mongoc-buffer.c b/Sources/CLibMongoC/mongoc/mongoc-buffer.c
index b420fe5..fd6cb35 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-buffer.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-buffer.c
@@ -22,6 +22,9 @@
#include "mongoc-buffer-private.h"
#include "mongoc-trace-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
#undef MONGOC_LOG_DOMAIN
#define MONGOC_LOG_DOMAIN "buffer"
diff --git a/Sources/CLibMongoC/mongoc/mongoc-bulk-operation.c b/Sources/CLibMongoC/mongoc/mongoc-bulk-operation.c
index 489256a..ed5d943 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-bulk-operation.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-bulk-operation.c
@@ -24,6 +24,9 @@
#include "mongoc-opts-private.h"
#include "mongoc-write-command-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
/*
* This is the implementation of both write commands and bulk write commands.
diff --git a/Sources/CLibMongoC/mongoc/mongoc-change-stream.c b/Sources/CLibMongoC/mongoc/mongoc-change-stream.c
index 985b4a8..e2ec7a8 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-change-stream.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-change-stream.c
@@ -24,6 +24,10 @@
#include "CLibMongoC_mongoc-error.h"
#include "mongoc-error-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
#define CHANGE_STREAM_ERR(_str) \
bson_set_error (&stream->err, \
MONGOC_ERROR_CURSOR, \
diff --git a/Sources/CLibMongoC/mongoc/mongoc-client-pool.c b/Sources/CLibMongoC/mongoc/mongoc-client-pool.c
index 726be29..4d430fa 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-client-pool.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-client-pool.c
@@ -28,6 +28,10 @@
#include "mongoc-topology-background-monitoring-private.h"
#include "mongoc-trace-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
#ifdef MONGOC_ENABLE_SSL
#include "mongoc-ssl-private.h"
#endif
diff --git a/Sources/CLibMongoC/mongoc/mongoc-client.c b/Sources/CLibMongoC/mongoc/mongoc-client.c
index 92a10b2..35159b1 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-client.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-client.c
@@ -69,6 +69,9 @@
#include "mongoc-opts-private.h"
#endif
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
#undef MONGOC_LOG_DOMAIN
#define MONGOC_LOG_DOMAIN "client"
diff --git a/Sources/CLibMongoC/mongoc/mongoc-collection.c b/Sources/CLibMongoC/mongoc/mongoc-collection.c
index a0833856..32ddcfbb 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-collection.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-collection.c
@@ -41,6 +41,10 @@
#include "mongoc-error-private.h"
#include "mongoc-database-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
#undef MONGOC_LOG_DOMAIN
#define MONGOC_LOG_DOMAIN "collection"
diff --git a/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket-file.c b/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket-file.c
index ab7bc798..205d2be5 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket-file.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket-file.c
@@ -23,6 +23,10 @@
#include "mongoc-collection-private.h"
#include "mongoc-util-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
/* Returns the minimum of two numbers */
static size_t
_mongoc_min (const size_t a, const size_t b)
diff --git a/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket.c b/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket.c
index ecc7d8a..6ecdc40 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-gridfs-bucket.c
@@ -27,6 +27,10 @@
#include "mongoc-stream-private.h"
#include "mongoc-write-concern-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
/*--------------------------------------------------------------------------
*
* _mongoc_gridfs_find_file_with_id --
diff --git a/Sources/CLibMongoC/mongoc/mongoc-gridfs-file.c b/Sources/CLibMongoC/mongoc/mongoc-gridfs-file.c
index 5dbc7609..85b9c325 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-gridfs-file.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-gridfs-file.c
@@ -36,6 +36,10 @@
#include "mongoc-util-private.h"
#include "CLibMongoC_mongoc-error.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
static bool
_mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file);
diff --git a/Sources/CLibMongoC/mongoc/mongoc-opts-helpers.c b/Sources/CLibMongoC/mongoc/mongoc-opts-helpers.c
index 0fe26f3..be2cb8d 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-opts-helpers.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-opts-helpers.c
@@ -20,6 +20,10 @@
#include "mongoc-util-private.h"
#include "mongoc-read-concern-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
#define BSON_ERR(...) \
do { \
bson_set_error ( \
diff --git a/Sources/CLibMongoC/mongoc/mongoc-rpc.c b/Sources/CLibMongoC/mongoc/mongoc-rpc.c
index 50325f5..537a9a1 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-rpc.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-rpc.c
@@ -25,6 +25,9 @@
#include "mongoc-compression-private.h"
#include "mongoc-cluster-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
#define RPC(_name, _code) \
static void _mongoc_rpc_gather_##_name (mongoc_rpc_##_name##_t *rpc, \
diff --git a/Sources/CLibMongoC/mongoc/mongoc-stream.c b/Sources/CLibMongoC/mongoc/mongoc-stream.c
index a7c8206..55aa1d0 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-stream.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-stream.c
@@ -30,6 +30,9 @@
#include "mongoc-trace-private.h"
#include "mongoc-util-private.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
#undef MONGOC_LOG_DOMAIN
#define MONGOC_LOG_DOMAIN "stream"
diff --git a/Sources/CLibMongoC/mongoc/mongoc-topology-description.c b/Sources/CLibMongoC/mongoc/mongoc-topology-description.c
index d913992c..1c8f3557 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-topology-description.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-topology-description.c
@@ -27,6 +27,9 @@
#include "mongoc-host-list-private.h"
#include "utlist.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
static bool
_is_data_node (const mongoc_server_description_t *sd)
diff --git a/Sources/CLibMongoC/mongoc/mongoc-server-monitor.c b/Sources/CLibMongoC/mongoc/mongoc-server-monitor.c
index 8824d47a..431434b6 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-server-monitor.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-server-monitor.c
@@ -29,6 +29,10 @@
#undef MONGOC_LOG_DOMAIN
#define MONGOC_LOG_DOMAIN "monitor"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
typedef enum {
MONGOC_THREAD_OFF = 0,
MONGOC_THREAD_RUNNING,
diff --git a/Sources/CLibMongoC/mongoc/mongoc-uri.c b/Sources/CLibMongoC/mongoc/mongoc-uri.c
index 8ddc31e2..d50982d1 100644
--- a/Sources/CLibMongoC/mongoc/mongoc-uri.c
+++ b/Sources/CLibMongoC/mongoc/mongoc-uri.c
@@ -37,6 +37,10 @@
#include "mongoc-compression-private.h"
#include "utlist.h"
+#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+#include <inttypes.h>
+#endif
+
struct _mongoc_uri_t {
char *str;
bool is_srv;