pvpgn (1.8.1-2.1) 03_zlib.diff

Summary

 src/Makefile.in            |   16 ++++++++--------
 src/bnetd/anongame_infos.c |    8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)

    
download this patch

Patch contents

diff -Naur old/src/Makefile.in pvpgn-1.8.1/src/Makefile.in
--- old/src/Makefile.in	2007-09-30 14:52:23.926825167 +0300
+++ pvpgn-1.8.1/src/Makefile.in	2007-09-30 14:53:49.431697962 +0300
@@ -60,7 +60,7 @@
 SRC_COMPATDIR	= ${SRC_SRCDIR}/compat
 SRC_DEBUGDIR	= ${SRC_SRCDIR}/debug
 SRC_CDBDIR	= ${SRC_SRCDIR}/tinycdb
-SRC_ZLIBDIR     = ${SRC_SRCDIR}/zlib
+#SRC_ZLIBDIR     = ${SRC_SRCDIR}/zlib
 SRC_WIN32DIR    = ${SRC_SRCDIR}/win32
 
 RMF		= rm -f
@@ -85,7 +85,7 @@
 LINK		= @CC@ @CFLAGS@ @LDFLAGS@
 LINK_LIBS	= @LIBS@
 
-PARTS            = bnetd bniutils bnpass bnpcap bnproxy bntrackd client common compat d2cs d2dbs tinycdb zlib win32
+PARTS            = bnetd bniutils bnpass bnpcap bnproxy bntrackd client common compat d2cs d2dbs tinycdb
 
 ifeq (@enable_bnetd@,no)
 bnetd_SBIN	=
@@ -225,12 +225,12 @@
 ${SRC_CDBDIR}/cdb_make_put.o \
 ${SRC_CDBDIR}/cdb_make_find.o \
 ${SRC_CDBDIR}/cdb_make.o \
-${SRC_CDBDIR}/cdb_hash.o \
-${SRC_ZLIBDIR}/pvpgn_adler32.o \
-${SRC_ZLIBDIR}/pvpgn_deflate.o \
-${SRC_ZLIBDIR}/pvpgn_trees.o \
-${SRC_ZLIBDIR}/pvpgn_zutil.o \
-${SRC_WIN32DIR}/service.o
+${SRC_CDBDIR}/cdb_hash.o
+#${SRC_ZLIBDIR}/pvpgn_adler32.o \
+#${SRC_ZLIBDIR}/pvpgn_deflate.o \
+#${SRC_ZLIBDIR}/pvpgn_trees.o \
+#${SRC_ZLIBDIR}/pvpgn_zutil.o \
+#${SRC_WIN32DIR}/service.o
 endif
 
 ifeq (@enable_d2cs@,no)
diff -Naur old/src/bnetd/anongame_infos.c pvpgn-1.8.1/src/bnetd/anongame_infos.c
--- old/src/bnetd/anongame_infos.c	2007-09-30 14:52:25.926939214 +0300
+++ pvpgn-1.8.1/src/bnetd/anongame_infos.c	2007-09-30 14:54:56.435516265 +0300
@@ -39,7 +39,7 @@
 #include "common/tag.h"
 #include "common/bn_type.h"
 #include "common/xalloc.h"
-#include "zlib/pvpgn_zlib.h"
+#include <zlib.h>
 #include "tournament.h"
 #include "anongame_maplists.h"
 #include "anongame_infos.h"
@@ -1972,7 +1972,7 @@
     tmpdata = (unsigned char *) xmalloc(srclen + (srclen / 0x10) + 0x200 + 0x8000);
 
     memset(&zcpr, 0, sizeof(z_stream));
-    pvpgn_deflateInit(&zcpr, 9);
+    deflateInit(&zcpr, 9);
     zcpr.next_in = (void *) src;
     zcpr.next_out = tmpdata;
     do
@@ -1980,7 +1980,7 @@
 	all_read_before = zcpr.total_in;
 	zcpr.avail_in = (lorigtodo < 0x8000) ? lorigtodo : 0x8000;
 	zcpr.avail_out = 0x8000;
-	ret = pvpgn_deflate(&zcpr, (zcpr.avail_in == lorigtodo) ? Z_FINISH : Z_SYNC_FLUSH);
+	ret = deflate(&zcpr, (zcpr.avail_in == lorigtodo) ? Z_FINISH : Z_SYNC_FLUSH);
 	lorigdone += (zcpr.total_in - all_read_before);
 	lorigtodo -= (zcpr.total_in - all_read_before);
     }
@@ -1995,7 +1995,7 @@
 	memcpy((*dest) + 4, tmpdata, (*destlen));
 	(*destlen) += 4;
     }
-    pvpgn_deflateEnd(&zcpr);
+    deflateEnd(&zcpr);
 
     xfree((void *) tmpdata);