aboutsummaryrefslogtreecommitdiff
path: root/net/GeoIP
diff options
context:
space:
mode:
authorSean Chittenden <seanc@FreeBSD.org>2003-01-02 20:15:17 +0000
committerSean Chittenden <seanc@FreeBSD.org>2003-01-02 20:15:17 +0000
commite72d470fe24b160d07019ff53db489c619b4303b (patch)
treee90cad6d638e65e5472c69c82d58e9ed35dd289b /net/GeoIP
parentc7d9c5c3f687b56d781f3d3826912956d4926427 (diff)
downloadports-e72d470fe24b160d07019ff53db489c619b4303b.tar.gz
ports-e72d470fe24b160d07019ff53db489c619b4303b.zip
Notes
Diffstat (limited to 'net/GeoIP')
-rw-r--r--net/GeoIP/Makefile2
-rw-r--r--net/GeoIP/distinfo2
-rw-r--r--net/GeoIP/files/patch-apps::geoipexport.c33
-rw-r--r--net/GeoIP/files/patch-libGeoIP::GeoIPBitReader.c11
-rw-r--r--net/GeoIP/files/patch-libGeoIP::GeoIPUpdate.c42
5 files changed, 46 insertions, 44 deletions
diff --git a/net/GeoIP/Makefile b/net/GeoIP/Makefile
index fdedde1f4337..9e52f5f2499a 100644
--- a/net/GeoIP/Makefile
+++ b/net/GeoIP/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= GeoIP
-PORTVERSION= 1.1.1
+PORTVERSION= 1.1.3
CATEGORIES= net
MASTER_SITES= http://www.maxmind.com/download/geoip/api/c/
diff --git a/net/GeoIP/distinfo b/net/GeoIP/distinfo
index 7c7648c5259b..13ec800a9410 100644
--- a/net/GeoIP/distinfo
+++ b/net/GeoIP/distinfo
@@ -1 +1 @@
-MD5 (GeoIP-1.1.1.tar.gz) = c8200a224704f93186d8aa33111410dc
+MD5 (GeoIP-1.1.3.tar.gz) = 166249ca3c774222511a7d20e060ac81
diff --git a/net/GeoIP/files/patch-apps::geoipexport.c b/net/GeoIP/files/patch-apps::geoipexport.c
new file mode 100644
index 000000000000..3307f2e7b8ae
--- /dev/null
+++ b/net/GeoIP/files/patch-apps::geoipexport.c
@@ -0,0 +1,33 @@
+--- apps/geoipexport.c.orig Tue Dec 17 13:35:21 2002
++++ apps/geoipexport.c Thu Dec 26 20:41:20 2002
+@@ -37,7 +37,7 @@
+
+ char * _num_to_addr (unsigned long num) {
+ char * addr = malloc(15);
+- sprintf(addr, "%u.%u.%u.%u",
++ sprintf(addr, "%u.%u.%u.%lu",
+ (int)floor(num/16777216),
+ ((int)floor(num/65536)) % 256,
+ ((int)floor(num/256)) % 256,
+@@ -76,9 +76,9 @@
+ int main (int argc, char *argv[]) {
+ FILE *f;
+ GeoIPBitReader *gibr;
+- int databaseType, record, val;
+- int exportType;
+- ulong beginIp = 0, endIp = 0;
++ int databaseType, record, val = 0;
++ int exportType = 0;
++ unsigned long beginIp = 0, endIp = 0;
+
+ if (argc < 4) {
+ usage();
+@@ -127,7 +127,7 @@
+ full_csv_export(databaseType, beginIp, endIp - 1, val, f);
+ }
+ beginIp = endIp;
+- printf("setting beginIp to %d\n",beginIp);
++ printf("setting beginIp to %lu\n",beginIp);
+ } else {
+ /* record = netmask - 1 */
+ endIp += (1 << (31 - record));
diff --git a/net/GeoIP/files/patch-libGeoIP::GeoIPBitReader.c b/net/GeoIP/files/patch-libGeoIP::GeoIPBitReader.c
new file mode 100644
index 000000000000..edddb7984667
--- /dev/null
+++ b/net/GeoIP/files/patch-libGeoIP::GeoIPBitReader.c
@@ -0,0 +1,11 @@
+--- libGeoIP/GeoIPBitReader.c.orig Thu Dec 26 20:09:06 2002
++++ libGeoIP/GeoIPBitReader.c Thu Dec 26 20:08:44 2002
+@@ -32,7 +32,7 @@
+ }
+
+ unsigned long GeoIPBitReader_read(GeoIPBitReader * gibr, short int numBits) {
+- ulong num = 0;
++ unsigned long num = 0;
+ int i, bit;
+ int bytes_read;
+
diff --git a/net/GeoIP/files/patch-libGeoIP::GeoIPUpdate.c b/net/GeoIP/files/patch-libGeoIP::GeoIPUpdate.c
deleted file mode 100644
index 301e751ecd98..000000000000
--- a/net/GeoIP/files/patch-libGeoIP::GeoIPUpdate.c
+++ /dev/null
@@ -1,42 +0,0 @@
---- libGeoIP/GeoIPUpdate.c.orig Tue Nov 19 13:03:24 2002
-+++ libGeoIP/GeoIPUpdate.c Tue Nov 19 13:05:44 2002
-@@ -45,7 +45,8 @@
- char * f_str;
- f_str = malloc(strlen(str)+1);
- strcpy(f_str,str);
-- (*f)(f_str);
-+ if (f != NULL)
-+ (*f)(f_str);
- }
-
- short int GeoIP_update_database (char * license_key, int verbose, void (*f)( char *)) {
-@@ -73,7 +74,8 @@
- if ((cur_db_fh = fopen (GeoIPDBFileName, "rb")) == NULL) {
- f_str = malloc(strlen(NoCurrentDB) + strlen(GeoIPDBFileName) - 1);
- sprintf(f_str,NoCurrentDB, GeoIPDBFileName);
-- (*f)(f_str);
-+ if (f != NULL)
-+ (*f)(f_str);
- } else {
- MD5Init(&context);
- while ((len = fread (buffer, 1, 1024, cur_db_fh)) > 0)
-@@ -84,7 +86,8 @@
- sprintf (&hex_digest[2*i], "%02x", digest[i]);
- f_str = malloc(strlen(MD5Info) + strlen(hex_digest) - 1);
- sprintf(f_str, MD5Info, hex_digest);
-- (*f)(f_str);
-+ if (f != NULL)
-+ (*f)(f_str);
- }
-
- hostlist = gethostbyname(GeoIPUpdateHost);
-@@ -165,7 +168,8 @@
- if (verbose == 1) {
- f_str = malloc(strlen(SavingGzip) + strlen(file_path_gz) - 1);
- sprintf(f_str,SavingGzip,file_path_gz);
-- (*f)(f_str);
-+ if (f != NULL)
-+ (*f)(f_str);
- }
- comp_fh = fopen(file_path_gz, "wb");
-