Author: poeml Date: Sun Jan 12 22:57:43 2014 New Revision: 8329 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8329&view=rev Log: geoiplookup_city, geoiplookup_continent tools: - make the path to the GeoIP database files configurable at compile time, so distribution builders could use preprocessor definitions to define them instead of patching the code. Patch by Dagobert Michelsen. Thanks! (issue #130) Modified: trunk/tools/geoiplookup_city.c trunk/tools/geoiplookup_continent.c Modified: trunk/tools/geoiplookup_city.c URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/tools/geoiplookup_city.c?rev=8329&r1=8328&r2=8329&view=diff ============================================================================== --- trunk/tools/geoiplookup_city.c (original) +++ trunk/tools/geoiplookup_city.c Sun Jan 12 22:57:43 2014 _at_@ -27,10 +27,12 @@ #include <GeoIP.h> #include <GeoIPCity.h> -#define DEFAULT_GEOIPFILE "/var/lib/GeoIP/GeoLiteCity.dat" +#ifndef DEFAULT_GEOIPCITYFILE +#define DEFAULT_GEOIPCITYFILE "/var/lib/GeoIP/GeoLiteCity.dat" +#endif int main(int argc, char **argv) { - const char *geoipfilename = DEFAULT_GEOIPFILE; + const char *geoipfilename = DEFAULT_GEOIPCITYFILE; GeoIP *gip = NULL; GeoIPRecord *gir = NULL; char *name; Modified: trunk/tools/geoiplookup_continent.c URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/tools/geoiplookup_continent.c?rev=8329&r1=8328&r2=8329&view=diff ============================================================================== --- trunk/tools/geoiplookup_continent.c (original) +++ trunk/tools/geoiplookup_continent.c Sun Jan 12 22:57:43 2014 _at_@ -25,7 +25,9 @@ #include <GeoIP.h> #include <GeoIPCity.h> +#ifndef DEFAULT_GEOIPFILE #define DEFAULT_GEOIPFILE "/var/lib/GeoIP/GeoIP.dat" +#endif int main(int argc, char **argv) { const char *geoipfilename = DEFAULT_GEOIPFILE; _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Sun Jan 12 2014 - 21:57:45 GMT
This archive was generated by hypermail 2.3.0 : Sun Jan 12 2014 - 22:17:04 GMT