maxmind / geoipupdate-legacy

GeoIP update client code
GNU General Public License v2.0
258 stars 63 forks source link

Windows patches (MSVC and MinGW) #105

Closed gvanem closed 6 years ago

gvanem commented 6 years ago

My local patches and Makefile to get a working geoipupdate.exe for Windows. (they have been sitting here for 5 years).

But as I'm not a customer of the MaxMind's data-download (?) program, I'm not confident everything works smoothly. This is what a c:\> geoipupdate -v says so far (with a joke %GEOIP_ROOT%/GeoIP.conf):

geoip-update
Opened License file f:/MingW32/src/inet/IP-Geo/GeoIP-API-C/GeoIP.conf
UserId 666
LicenseKey abcdef
Insert edition_id GeoIP2-City
Read in license key f:/MingW32/src/inet/IP-Geo/GeoIP-API-C/GeoIP.conf
Number of edition IDs 1
url: https://updates.maxmind.com/app/update_getfilename?product_id=GeoIP2-City
md5hex_digest: 00000000000000000000000000000000
url: https://updates.maxmind.com/app/update_getipaddr
Client IP address: 109.189.32.120
md5hex_digest2 (challenge): 37f6cf46e0449d0d7cbc0c15121a72f1
url: https://updates.maxmind.com/app/update_secure?db_md5=00000000000000000000000000000000&challenge_md5=37f6cf46e0449d0d7cbc0c15121a72f1&user
_id=666&edition_id=GeoIP2-City
Received an unexpected HTTP status code of 401 from https://updates.maxmind.com/app/update_secure?db_md5=00000000000000000000000000000000&chal
lenge_md5=37f6cf46e0449d0d7cbc0c15121a72f1&user_id=666&edition_id=GeoIP2-City:
Invalid user ID

No surprise really.

gvanem commented 6 years ago

I noted that Travis used -Werror which caused my read() patch to fail. Fixed now (Travis is happy).

horgh commented 6 years ago

Thank you for this!

Unfortunately there's a conflict now. Sorry about that!

I've not looked at the changes in detail yet. However I noticed in win32.c there is code from a third party (the comment on line 64). Do you know how that code is licensed?

Also, as my colleague mentioned in #104, we'll be supporting Windows with the new version of geoipupdate, so it might make these updates less pressing.

gvanem commented 6 years ago

Do you know how that code is licensed?

Some getopt() code from 1993! It can easily be replaced with GNU's getopt() or whatever.

gvanem commented 6 years ago

Closing due to lack of interest...