From: Paul Marquess Date: Mon, 10 Oct 2005 12:24:29 +0000 (+0100) Subject: RE: [PATCH] Compress::Zlib X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d13b0db44cac76f0adf0e6c3d90ab2721e4b6521;p=p5sagit%2Fp5-mst-13.2.git RE: [PATCH] Compress::Zlib From: "Paul Marquess" Message-ID: <013501c5cd8d$2f5d3e90$291c140a@myopwv.com> p4raw-id: //depot/perl@25729 --- diff --git a/ext/Compress/Zlib/Makefile.PL b/ext/Compress/Zlib/Makefile.PL index aeb58e8..3c45fb0 100755 --- a/ext/Compress/Zlib/Makefile.PL +++ b/ext/Compress/Zlib/Makefile.PL @@ -28,8 +28,9 @@ my $GZIP_OS_CODE = -1 ; #$WALL = ' -pedantic ' if $Config{'cc'} =~ /gcc/ ; $WALL = ' -Wall ' if $Config{'cc'} =~ /gcc/ ; +my $PERL_CORE = grep { $_ eq 'PERL_CORE=1' } @ARGV; # don't ask if MM_USE_DEFAULT is set -- enables perl core building on cygwin -if ($^O =~ /cygwin/i and not $ENV{PERL_MM_USE_DEFAULT}) +if ($^O =~ /cygwin/i and not ($ENV{PERL_MM_USE_DEFAULT} || $PERL_CORE)) { print <stream.next_in = (Bytef*)SvPVbyte(buf, *(STRLEN*)&s->stream.avail_in) ; - /* s->stream.avail_in = SvCUR(buf) ; */ + s->stream.next_in = (Bytef*)SvPVbyte_nolen(buf) ; + s->stream.avail_in = SvCUR(buf) ; if (s->flags & FLAG_CRC32) s->crc32 = crc32(s->crc32, s->stream.next_in, s->stream.avail_in) ; @@ -1346,6 +1346,7 @@ inflate (s, buf, output) uInt cur_length = NO_INIT uInt prefix_length = NO_INIT uInt increment = NO_INIT + STRLEN stmp = NO_INIT PREINIT: #ifdef UTF8_AVAILABLE bool out_utf8 = FALSE; @@ -1362,7 +1363,8 @@ inflate (s, buf, output) #endif /* initialise the input buffer */ - s->stream.next_in = (Bytef*)SvPVbyte_force(buf, *(STRLEN*)&s->stream.avail_in) ; + s->stream.next_in = (Bytef*)SvPVbyte_force(buf, stmp) ; + s->stream.avail_in = SvCUR(buf) ; /* and retrieve the output buffer */ output = deRef_l(output, "inflate") ; @@ -1626,6 +1628,7 @@ scan(s, buf, out=NULL) SV * buf SV * out int start_len = NO_INIT + STRLEN stmp = NO_INIT ALIAS: inflate = 1 CODE: @@ -1642,7 +1645,8 @@ scan(s, buf, out=NULL) #endif /* initialise the input buffer */ - s->stream.next_in = (Bytef*)SvPVbyte_force(buf, *(STRLEN*)&s->stream.avail_in) ; + s->stream.next_in = (Bytef*)SvPVbyte_force(buf, stmp) ; + s->stream.avail_in = SvCUR(buf) ; start_len = s->stream.avail_in ; s->bytesInflated = 0 ; do