Upgrade Compress-Raw-Zlib from version 2.075 to 2.076
authorSteve Hay <steve.m.hay@googlemail.com>
Thu, 23 Nov 2017 08:22:21 +0000 (08:22 +0000)
committerSteve Hay <steve.m.hay@googlemail.com>
Thu, 23 Nov 2017 08:22:21 +0000 (08:22 +0000)
Porting/Maintainers.pl
cpan/Compress-Raw-Zlib/Makefile.PL
cpan/Compress-Raw-Zlib/Zlib.xs
cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
cpan/Compress-Raw-Zlib/typemap
cpan/Compress-Raw-Zlib/zlib-src/infback.c
cpan/Compress-Raw-Zlib/zlib-src/inflate.c

index 18f1c6b..1586ea7 100755 (executable)
@@ -214,7 +214,7 @@ use File::Glob qw(:case);
     },
 
     'Compress::Raw::Zlib' => {
-        'DISTRIBUTION' => 'PMQS/Compress-Raw-Zlib-2.075.tar.gz',
+        'DISTRIBUTION' => 'PMQS/Compress-Raw-Zlib-2.076.tar.gz',
 
         'FILES'    => q[cpan/Compress-Raw-Zlib],
         'EXCLUDED' => [
index 028f550..31f3197 100644 (file)
@@ -21,6 +21,9 @@ if ($Config{'gccversion'} and $OPTIMIZE =~ /-g (gdb)? 3/x) {
   $OPTIMIZE =~ s/-g(gdb)?3/-g/g; # [88936] out of memory with -g3 since 2.062
 }
 
+# Windows uses a different name for the zlib library
+my $ZLIB_LIBRARY_NAME = $^O eq 'MSWin32' ? 'zlib' : 'z' ;
+
 #$WALL = ' -pedantic ' if $Config{'cc'} =~ /gcc/ ;
 #$WALL = ' -Wall -Wno-comment ' if $Config{'cc'} =~ /gcc/ ;
 
@@ -85,7 +88,7 @@ WriteMakefile(
     (
       $BUILD_ZLIB
         ? zlib_files($ZLIB_LIB)
-        : (LIBS => [ "-L$ZLIB_LIB -lz " ])
+        : (LIBS => [ "-L$ZLIB_LIB -l$ZLIB_LIBRARY_NAME " ])
     ),
     OPTIMIZE => $OPTIMIZE,
 
index 8362eb6..496b876 100644 (file)
@@ -505,8 +505,9 @@ DispStream(s, message)
 voidpf my_zcalloc (voidpf opaque, unsigned items, unsigned size)
 {
     PERL_UNUSED_VAR(opaque);
-    return safecalloc(items, size);
-    /* return safemalloc(items* size); */
+    /* TODO - put back to calloc */
+    /* return safecalloc(items, size); */
+    return safemalloc(items* size);
 }
 
 
@@ -822,7 +823,7 @@ Zip_crc32(buf, crc=crcInitial, offset=0)
         uLong    crc = NO_INIT
         STRLEN   len = NO_INIT
         Bytef *  buf = NO_INIT
-        int      offset       
+        STRLEN   offset       
        SV *     sv = ST(0) ;
        INIT:
        /* If the buffer is a reference, dereference it */
index c128565..2fc5b46 100644 (file)
@@ -10,7 +10,7 @@ use warnings ;
 use bytes ;
 our ($VERSION, $XS_VERSION, @ISA, @EXPORT, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD, %DEFLATE_CONSTANTS, @DEFLATE_CONSTANTS);
 
-$VERSION = '2.075';
+$VERSION = '2.076';
 $XS_VERSION = $VERSION; 
 $VERSION = eval $VERSION;
 
index 6d426e1..36fce4a 100644 (file)
@@ -15,7 +15,8 @@ const char *                  T_PV
 char *                         T_PV
 uLong                          T_UV
 z_off_t                                T_UV
-DualType                       T_DUAL
+STRLEN                         T_UV
+DualType            T_DUAL
 int_undef           T_IV_undef
 
 
index e3470aa..7f51a5e 100644 (file)
@@ -477,6 +477,7 @@ int ZEXPORT inflateBack(
             }
             Tracev((stderr, "inflate:       codes ok\n"));
             state->mode = LEN;
+            /* FALLTHROUGH */
 
         case LEN:
             /* use inflate_fast() if we have enough input and output */
index 5d22fc3..d5369c2 100644 (file)
@@ -740,6 +740,7 @@ int ZEXPORT inflate(
                 CRC2(state->check, hold);
             INITBITS();
             state->mode = EXLEN;
+            /* FALLTHROUGH */
         case EXLEN:
             if (state->flags & 0x0400) {
                 NEEDBITS(16);
@@ -753,6 +754,7 @@ int ZEXPORT inflate(
             else if (state->head != Z_NULL)
                 state->head->extra = Z_NULL;
             state->mode = EXTRA;
+            /* FALLTHROUGH */
         case EXTRA:
             if (state->flags & 0x0400) {
                 copy = state->length;
@@ -775,6 +777,7 @@ int ZEXPORT inflate(
             }
             state->length = 0;
             state->mode = NAME;
+            /* FALLTHROUGH */
         case NAME:
             if (state->flags & 0x0800) {
                 if (have == 0) goto inf_leave;
@@ -796,6 +799,7 @@ int ZEXPORT inflate(
                 state->head->name = Z_NULL;
             state->length = 0;
             state->mode = COMMENT;
+            /* FALLTHROUGH */
         case COMMENT:
             if (state->flags & 0x1000) {
                 if (have == 0) goto inf_leave;
@@ -816,6 +820,7 @@ int ZEXPORT inflate(
             else if (state->head != Z_NULL)
                 state->head->comment = Z_NULL;
             state->mode = HCRC;
+            /* FALLTHROUGH */
         case HCRC:
             if (state->flags & 0x0200) {
                 NEEDBITS(16);
@@ -839,6 +844,7 @@ int ZEXPORT inflate(
             strm->adler = state->check = ZSWAP32(hold);
             INITBITS();
             state->mode = DICT;
+            /* FALLTHROUGH */
         case DICT:
             if (state->havedict == 0) {
                 RESTORE();
@@ -846,8 +852,10 @@ int ZEXPORT inflate(
             }
             strm->adler = state->check = adler32(0L, Z_NULL, 0);
             state->mode = TYPE;
+            /* FALLTHROUGH */
         case TYPE:
             if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
+            /* FALLTHROUGH */
         case TYPEDO:
             if (state->last) {
                 BYTEBITS();
@@ -898,8 +906,10 @@ int ZEXPORT inflate(
             INITBITS();
             state->mode = COPY_;
             if (flush == Z_TREES) goto inf_leave;
+            /* FALLTHROUGH */
         case COPY_:
             state->mode = COPY;
+            /* FALLTHROUGH */
         case COPY:
             copy = state->length;
             if (copy) {
@@ -1039,8 +1049,10 @@ int ZEXPORT inflate(
             Tracev((stderr, "inflate:       codes ok\n"));
             state->mode = LEN_;
             if (flush == Z_TREES) goto inf_leave;
+            /* FALLTHROUGH */
         case LEN_:
             state->mode = LEN;
+            /* FALLTHROUGH */
         case LEN:
             if (have >= 6 && left >= 258) {
                 RESTORE();
@@ -1090,6 +1102,7 @@ int ZEXPORT inflate(
             }
             state->extra = (unsigned)(here.op) & 15;
             state->mode = LENEXT;
+            /* FALLTHROUGH */
         case LENEXT:
             if (state->extra) {
                 NEEDBITS(state->extra);
@@ -1100,6 +1113,7 @@ int ZEXPORT inflate(
             Tracevv((stderr, "inflate:         length %u\n", state->length));
             state->was = state->length;
             state->mode = DIST;
+            /* FALLTHROUGH */
         case DIST:
             for (;;) {
                 here = state->distcode[BITS(state->distbits)];
@@ -1127,6 +1141,7 @@ int ZEXPORT inflate(
             state->offset = (unsigned)here.val;
             state->extra = (unsigned)(here.op) & 15;
             state->mode = DISTEXT;
+            /* FALLTHROUGH */
         case DISTEXT:
             if (state->extra) {
                 NEEDBITS(state->extra);
@@ -1143,6 +1158,7 @@ int ZEXPORT inflate(
 #endif
             Tracevv((stderr, "inflate:         distance %u\n", state->offset));
             state->mode = MATCH;
+            /* FALLTHROUGH */
         case MATCH:
             if (left == 0) goto inf_leave;
             copy = out - left;
@@ -1218,6 +1234,7 @@ int ZEXPORT inflate(
             }
 #ifdef GUNZIP
             state->mode = LENGTH;
+            /* FALLTHROUGH */
         case LENGTH:
             if (state->wrap && state->flags) {
                 NEEDBITS(32);
@@ -1231,6 +1248,7 @@ int ZEXPORT inflate(
             }
 #endif
             state->mode = DONE;
+            /* FALLTHROUGH */
         case DONE:
             ret = Z_STREAM_END;
             goto inf_leave;