Skip to content

Commit

Permalink
Merge pull request #115 from Jan-E/master
Browse files Browse the repository at this point in the history
Add config.w32 for building on Windows
  • Loading branch information
oschwald authored Jan 4, 2021
2 parents ea95574 + 4bffde0 commit fbc1257
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
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

0 comments on commit fbc1257

Please sign in to comment.