]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix MinGW failing to find infcover.exe when stripping the executable. 29/head
authorMika Lindqvist <postmaster@raasu.org>
Wed, 13 May 2015 18:34:32 +0000 (21:34 +0300)
committerMika Lindqvist <postmaster@raasu.org>
Wed, 13 May 2015 19:27:17 +0000 (22:27 +0300)
Fix compiling infcover.c under MinGW

Makefile.in
test/infcover.c

index de2775466be5e8c8c82ee5f148303e3c1920314c..fadf353c0b02beb9a871c3f0da7ffcb43d8d25f6 100644 (file)
@@ -136,13 +136,13 @@ test64: all64
 infcover.o: $(SRCDIR)/test/infcover.c $(SRCDIR)/zlib.h zconf.h
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/test/infcover.c
 
-infcover: infcover.o $(STATICLIB)
+infcover$(EXE): infcover.o $(STATICLIB)
        $(CC) $(CFLAGS) -o $@ infcover.o $(STATICLIB) $(BSDLIBS)
 ifneq ($(STRIP),)
        $(STRIP) $@
 endif
 
-cover: infcover
+cover: infcover$(EXE)
        rm -f *.gcda
        ./infcover
        gcov inf*.c
index eca68677d0792fd3650b235c114e8587c1f844dd..c1a8d213a17ea6f6799088911d5966e80062fd39 100644 (file)
@@ -191,7 +191,7 @@ local void mem_used(z_stream *strm, char *prefix)
 {
     struct mem_zone *zone = strm->opaque;
 
-    fprintf(stderr, "%s: %lu allocated\n", prefix, zone->total);
+    fprintf(stderr, "%s: %zu allocated\n", prefix, zone->total);
 }
 
 /* show the high water allocation in bytes */
@@ -199,7 +199,7 @@ local void mem_high(z_stream *strm, char *prefix)
 {
     struct mem_zone *zone = strm->opaque;
 
-    fprintf(stderr, "%s: %lu high water mark\n", prefix, zone->highwater);
+    fprintf(stderr, "%s: %zu high water mark\n", prefix, zone->highwater);
 }
 
 /* release the memory allocation zone -- if there are any surprises, notify */
@@ -224,7 +224,7 @@ local void mem_done(z_stream *strm, char *prefix)
 
     /* issue alerts about anything unexpected */
     if (count || zone->total)
-        fprintf(stderr, "** %s: %lu bytes in %d blocks not freed\n",
+        fprintf(stderr, "** %s: %zu bytes in %d blocks not freed\n",
                 prefix, zone->total, count);
     if (zone->notlifo)
         fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo);
@@ -378,7 +378,7 @@ local void cover_support(void)
     mem_setup(&strm);
     strm.avail_in = 0;
     strm.next_in = Z_NULL;
-    ret = inflateInit_(&strm, ZLIB_VERSION - 1, (int)sizeof(z_stream));
+    ret = inflateInit_(&strm, ZLIB_VERSION + 1, (int)sizeof(z_stream));
                                                 assert(ret == Z_VERSION_ERROR);
     mem_done(&strm, "wrong version");
 
@@ -449,7 +449,7 @@ local void cover_wrap(void)
 }
 
 /* input and output functions for inflateBack() */
-local unsigned pull(void *desc, unsigned char **buf)
+local unsigned pull(void *desc, const unsigned char **buf)
 {
     static unsigned int next = 0;
     static unsigned char dat[] = {0x63, 0, 2, 0};