Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config.w32 for building on Windows #115

Merged
merged 4 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ext/config.w32
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG_WITH("maxminddb", "Enable MaxMind DB Reader extension support", "no");

if (PHP_MAXMINDDB == "yes") {
if (CHECK_HEADER_ADD_INCLUDE("maxminddb.h", "CFLAGS_MAXMINDDB", PHP_MAXMINDDB + ";" + PHP_PHP_BUILD + "\\include\\maxminddb") &&
CHECK_LIB("libmaxminddb.lib", "maxminddb", PHP_MAXMINDDB)) {
EXTENSION("maxminddb", "maxminddb.c");
} else {
WARNING('Could not find maxminddb.h or libmaxminddb.lib; skipping');
}
}
4 changes: 2 additions & 2 deletions ext/maxminddb.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ handle_map(const MMDB_entry_data_list_s *entry_data_list,
array_init(z_value);
const uint32_t map_size = entry_data_list->entry_data.data_size;

uint i;
uint32_t i;
for (i = 0; i < map_size && entry_data_list; i++) {
entry_data_list = entry_data_list->next;

Expand Down Expand Up @@ -463,7 +463,7 @@ handle_array(const MMDB_entry_data_list_s *entry_data_list,

array_init(z_value);

uint i;
uint32_t i;
for (i = 0; i < size && entry_data_list; i++) {
entry_data_list = entry_data_list->next;
zval new_value;
Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<dir name="ext">
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>

<file role="src" name="maxminddb.c"/>
<file role="src" name="php_maxminddb.h"/>
Expand Down