Skip to content

Commit 820106a

Browse files
committed
PHPC-1037: Define new constants in config.w32
1 parent 24fd762 commit 820106a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

config.w32

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ if (PHP_MONGODB != "no") {
108108
BSON_EXTRA_ALIGN: 0,
109109
BSON_HAVE_SYSCALL_TID: 0,
110110
BSON_HAVE_DECIMAL128: 0,
111-
BSON_HAVE_GMTIME_R: 0
111+
BSON_HAVE_GMTIME_R: 0,
112+
BSON_HAVE_RAND_R: 0
112113
};
113114

114115
if (CHECK_FUNC_IN_HEADER("stdio.h", "_set_output_format")) {
@@ -154,6 +155,11 @@ if (PHP_MONGODB != "no") {
154155
MONGOC_NO_AUTOMATIC_GLOBALS: 1,
155156
MONGOC_SOCKET_ARG2: "struct sockaddr",
156157
MONGOC_SOCKET_ARG3: "socklen_t",
158+
MONGOC_HAVE_DNSAPI: 0,
159+
MONGOC_HAVE_RES_NSEARCH: 0,
160+
MONGOC_HAVE_RES_NDESTROY: 0,
161+
MONGOC_HAVE_RES_NCLOSE: 0,
162+
MONGOC_HAVE_RES_SEARCH: 0,
157163
MONGOC_CC: "",
158164
MONGOC_USER_SET_CFLAGS: "",
159165
MONGOC_USER_SET_LDFLAGS: ""
@@ -204,6 +210,11 @@ if (PHP_MONGODB != "no") {
204210
WARNING("mongodb libsasl support not enabled, libs not found");
205211
}
206212

213+
if (CHECK_LIB("dnsapi.lib", "mongodb", PHP_MONGODB) &&
214+
CHECK_HEADER_ADD_INCLUDE("windns.h", "CFLAGS_MONGODB")) {
215+
mongoc_opts.MONGOC_HAVE_DNSAPI = 1;
216+
}
217+
207218
if (typeof COMPILER_NAME === 'string') {
208219
mongoc_opts.MONGOC_CC = COMPILER_NAME;
209220
} else if (typeof VC_VERSIONS[VCVERS] === 'string') {

0 commit comments

Comments
 (0)