Skip to content

Commit 882d33b

Browse files
committed
Bundle windows configs
1 parent 4a274d3 commit 882d33b

File tree

4 files changed

+332
-0
lines changed

4 files changed

+332
-0
lines changed

win32/bson-config.h

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#ifndef BSON_CONFIG_H
2+
#define BSON_CONFIG_H
3+
4+
/*
5+
* Define to 1234 for Little Endian, 4321 for Big Endian.
6+
*/
7+
#define BSON_BYTE_ORDER 1234
8+
9+
10+
/*
11+
* Define to 1 if you have stdbool.h
12+
*/
13+
#define BSON_HAVE_STDBOOL_H 1
14+
#if BSON_HAVE_STDBOOL_H != 1
15+
# undef BSON_HAVE_STDBOOL_H
16+
#endif
17+
18+
19+
/*
20+
* Define to 1 for POSIX-like systems, 2 for Windows.
21+
*/
22+
#define BSON_OS 1
23+
24+
25+
/*
26+
* Define to 1 if we have access to GCC 64-bit atomic builtins.
27+
* While this requires GCC 4.1+ in most cases, it is also architecture
28+
* dependent. For example, some PPC or ARM systems may not have it even
29+
* if it is a recent GCC version.
30+
*/
31+
#define BSON_HAVE_ATOMIC_64_ADD_AND_FETCH 0
32+
#if BSON_HAVE_ATOMIC_64_ADD_AND_FETCH != 1
33+
# undef BSON_HAVE_ATOMIC_64_ADD_AND_FETCH
34+
#endif
35+
36+
37+
/*
38+
* Define to 1 if your system requires {} around PTHREAD_ONCE_INIT.
39+
* This is typically just Solaris 8-10.
40+
*/
41+
#define BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES 0
42+
#if BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES != 1
43+
# undef BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES
44+
#endif
45+
46+
47+
/*
48+
* Define to 1 if you have clock_gettime() available.
49+
*/
50+
#define BSON_HAVE_CLOCK_GETTIME 0
51+
#if BSON_HAVE_CLOCK_GETTIME != 1
52+
# undef BSON_HAVE_CLOCK_GETTIME
53+
#endif
54+
55+
56+
/*
57+
* Define to 1 if you have strnlen available on your platform.
58+
*/
59+
#define BSON_HAVE_STRNLEN 0
60+
#if BSON_HAVE_STRNLEN != 1
61+
# undef BSON_HAVE_STRNLEN
62+
#endif
63+
64+
65+
/*
66+
* Define to 1 if you have snprintf available on your platform.
67+
*/
68+
#define BSON_HAVE_SNPRINTF 0
69+
#if BSON_HAVE_SNPRINTF != 1
70+
# undef BSON_HAVE_SNPRINTF
71+
#endif
72+
73+
74+
#endif /* BSON_CONFIG_H */

win32/bson-version.h

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* Copyright 2013 MongoDB, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
18+
#if !defined (BSON_INSIDE) && !defined (BSON_COMPILATION)
19+
#error "Only <bson.h> can be included directly."
20+
#endif
21+
22+
23+
#ifndef BSON_VERSION_H
24+
#define BSON_VERSION_H
25+
26+
27+
/**
28+
* BSON_MAJOR_VERSION:
29+
*
30+
* BSON major version component (e.g. 1 if %BSON_VERSION is 1.2.3)
31+
*/
32+
#define BSON_MAJOR_VERSION (1)
33+
34+
35+
/**
36+
* BSON_MINOR_VERSION:
37+
*
38+
* BSON minor version component (e.g. 2 if %BSON_VERSION is 1.2.3)
39+
*/
40+
#define BSON_MINOR_VERSION (1)
41+
42+
43+
/**
44+
* BSON_MICRO_VERSION:
45+
*
46+
* BSON micro version component (e.g. 3 if %BSON_VERSION is 1.2.3)
47+
*/
48+
#define BSON_MICRO_VERSION (3)
49+
50+
51+
/**
52+
* BSON_VERSION:
53+
*
54+
* BSON version.
55+
*/
56+
#define BSON_VERSION (1.1.3)
57+
58+
59+
/**
60+
* BSON_VERSION_S:
61+
*
62+
* BSON version, encoded as a string, useful for printing and
63+
* concatenation.
64+
*/
65+
#define BSON_VERSION_S "1.1.3"
66+
67+
68+
/**
69+
* BSON_VERSION_HEX:
70+
*
71+
* BSON version, encoded as an hexadecimal number, useful for
72+
* integer comparisons.
73+
*/
74+
#define BSON_VERSION_HEX (BSON_MAJOR_VERSION << 24 | \
75+
BSON_MINOR_VERSION << 16 | \
76+
BSON_MICRO_VERSION << 8)
77+
78+
79+
/**
80+
* BSON_CHECK_VERSION:
81+
* @major: required major version
82+
* @minor: required minor version
83+
* @micro: required micro version
84+
*
85+
* Compile-time version checking. Evaluates to %TRUE if the version
86+
* of BSON is greater than the required one.
87+
*/
88+
#define BSON_CHECK_VERSION(major,minor,micro) \
89+
(BSON_MAJOR_VERSION > (major) || \
90+
(BSON_MAJOR_VERSION == (major) && BSON_MINOR_VERSION > (minor)) || \
91+
(BSON_MAJOR_VERSION == (major) && BSON_MINOR_VERSION == (minor) && \
92+
BSON_MICRO_VERSION >= (micro)))
93+
94+
95+
/**
96+
* bson_get_major_version:
97+
*
98+
* Helper function to return the runtime major version of the library.
99+
*/
100+
int bson_get_major_version (void);
101+
102+
103+
/**
104+
* bson_get_minor_version:
105+
*
106+
* Helper function to return the runtime minor version of the library.
107+
*/
108+
int bson_get_minor_version (void);
109+
110+
111+
/**
112+
* bson_get_micro_version:
113+
*
114+
* Helper function to return the runtime micro version of the library.
115+
*/
116+
int bson_get_micro_version (void);
117+
118+
119+
#endif /* BSON_VERSION_H */

win32/mongoc-config.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2013 MongoDB Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
18+
#ifndef MONGOC_CONFIG_H
19+
#define MONGOC_CONFIG_H
20+
21+
22+
/*
23+
* MONGOC_ENABLE_SSL is set from configure to determine if we are
24+
* compiled with SSL support.
25+
*/
26+
#define MONGOC_ENABLE_SSL 1
27+
28+
#if MONGOC_ENABLE_SSL != 1
29+
# undef MONGOC_ENABLE_SSL
30+
#endif
31+
32+
33+
/*
34+
* MONGOC_ENABLE_SASL is set from configure to determine if we are
35+
* compiled with SASL support.
36+
*/
37+
#define MONGOC_ENABLE_SASL 1
38+
39+
#if MONGOC_ENABLE_SASL != 1
40+
# undef MONGOC_ENABLE_SASL
41+
#endif
42+
43+
44+
#endif /* MONGOC_CONFIG_H */

win32/mongoc-version.h

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/*
2+
* Copyright 2013 MongoDB, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
18+
#if !defined (MONGOC_INSIDE) && !defined (MONGOC_COMPILATION)
19+
#error "Only <mongoc.h> can be included directly."
20+
#endif
21+
22+
23+
#ifndef MONGOC_VERSION_H
24+
#define MONGOC_VERSION_H
25+
26+
27+
/**
28+
* MONGOC_MAJOR_VERSION:
29+
*
30+
* MONGOC major version component (e.g. 1 if %MONGOC_VERSION is 1.2.3)
31+
*/
32+
#define MONGOC_MAJOR_VERSION (1)
33+
34+
35+
/**
36+
* MONGOC_MINOR_VERSION:
37+
*
38+
* MONGOC minor version component (e.g. 2 if %MONGOC_VERSION is 1.2.3)
39+
*/
40+
#define MONGOC_MINOR_VERSION (1)
41+
42+
43+
/**
44+
* MONGOC_MICRO_VERSION:
45+
*
46+
* MONGOC micro version component (e.g. 3 if %MONGOC_VERSION is 1.2.3)
47+
*/
48+
#define MONGOC_MICRO_VERSION (2)
49+
50+
51+
/**
52+
* MONGOC_VERSION:
53+
*
54+
* MONGOC version.
55+
*/
56+
#define MONGOC_VERSION (1.1.2)
57+
58+
59+
/**
60+
* MONGOC_VERSION_S:
61+
*
62+
* MONGOC version, encoded as a string, useful for printing and
63+
* concatenation.
64+
*/
65+
#define MONGOC_VERSION_S "1.1.2"
66+
67+
68+
/**
69+
* MONGOC_VERSION_HEX:
70+
*
71+
* MONGOC version, encoded as an hexadecimal number, useful for
72+
* integer comparisons.
73+
*/
74+
#define MONGOC_VERSION_HEX (MONGOC_MAJOR_VERSION << 24 | \
75+
MONGOC_MINOR_VERSION << 16 | \
76+
MONGOC_MICRO_VERSION << 8)
77+
78+
79+
/**
80+
* MONGOC_CHECK_VERSION:
81+
* @major: required major version
82+
* @minor: required minor version
83+
* @micro: required micro version
84+
*
85+
* Compile-time version checking. Evaluates to %TRUE if the version
86+
* of MONGOC is greater than the required one.
87+
*/
88+
#define MONGOC_CHECK_VERSION(major,minor,micro) \
89+
(MONGOC_MAJOR_VERSION > (major) || \
90+
(MONGOC_MAJOR_VERSION == (major) && MONGOC_MINOR_VERSION > (minor)) || \
91+
(MONGOC_MAJOR_VERSION == (major) && MONGOC_MINOR_VERSION == (minor) && \
92+
MONGOC_MICRO_VERSION >= (micro)))
93+
94+
95+
#endif /* MONGOC_VERSION_H */

0 commit comments

Comments
 (0)