Skip Menu |

This queue is for tickets about the Compress-Raw-Zlib CPAN distribution.

Report information
The Basics
Id: 120272
Status: resolved
Priority: 0/
Queue: Compress-Raw-Zlib

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.073



Subject: [PATCH] Unbreak compilation
See patch -- Reini Urban
Subject: 072-c90.patch
--- Zlib.xs 2017-02-16 14:32:42.000000000 +0100 +++ /usr/src/perl/blead/cperl/cpan/Compress-Raw-Zlib/Zlib.xs 2017-02-16 12:28:33.000000000 +0100 @@ -696,14 +696,14 @@ int ret ; z_stream * strm = &s->stream; - strm->next_in = NULL; - strm->avail_in = 0; - Bytef* output = s->deflateParams_out_buffer ; uLong total_output = s->deflateParams_out_length; uLong have = 0; + strm->next_in = NULL; + strm->avail_in = 0; + do { if (output) @@ -1133,12 +1133,12 @@ } RETVAL = deflate(&(s->stream), Z_NO_FLUSH); - if (RETVAL != Z_STREAM_ERROR) { + /* if (RETVAL != Z_STREAM_ERROR) { int done = increment - s->stream.avail_out ; - /* printf("std DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, + printf("std DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, GetErrorString(RETVAL), s->stream.avail_in, -s->stream.avail_out, done); */ - } +s->stream.avail_out, done); + } */ if (trace) { printf("DEFLATE returned %d %s, avail in %d, out %d\n", RETVAL, @@ -1260,12 +1260,12 @@ } RETVAL = deflate(&(s->stream), f); - if (RETVAL != Z_STREAM_ERROR) { + /* if (RETVAL != Z_STREAM_ERROR) { int done = availableout - s->stream.avail_out ; - /* printf("flush DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, + printf("flush DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, GetErrorString(RETVAL), s->stream.avail_in, -s->stream.avail_out, done); */ - } +s->stream.avail_out, done); + } */ if (trace) { printf("flush DEFLATE returned %d '%s', avail in %d, out %d\n", RETVAL,
On Thu Feb 16 08:34:29 2017, RURBAN wrote: Show quoted text
> See patch
Can you share the compilation error you are getting please? I'm guessing the bottom half is something warning about unused variables, but not sure what the top half is doing. Paul
Subject: Re: [rt.cpan.org #120272] [PATCH] Unbreak compilation
Date: Thu, 16 Feb 2017 14:53:34 +0100
To: bug-Compress-Raw-Zlib [...] rt.cpan.org
From: Reini Urban <reini.urban [...] gmail.com>
It’s for strict compiler settings, such as in core or windows msvc. "../../miniperl" "-I../../lib" "-I../../lib" "../../lib/ExtUtils/xsubpp" -typemap "../../lib/ExtUti ls/typemap" -typemap "typemap" Zlib.xs > Zlib.xsc && mv Zlib.xsc Zlib.c ccache gcc-mp-6 -flto=4 -c -I./zlib-src -fno-common -DPERL_DARWIN -mmacosx-version-min=10.11 -DNO_M ATHOMS -march=corei7 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/op t/local/include -DPERL_USE_SAFE_PUTENV -Wall -Werror=declaration-after-statement -Wextra -Wc++-compa t -Wwrite-strings -Wno-discarded-qualifiers -Wlogical-op -Wpacked -Wdisabled-optimization -O3 -g - DVERSION=\"2.072\" -DXS_VERSION=\"2.072\" "-I../.." -DNO_VIZ -DZ_SOLO -DGZIP_OS_CODE=3 Zlib.c Zlib.xs: In function 'flushParams': Zlib.xs:702:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-stateme nt] Bytef* output = s->deflateParams_out_buffer ; ^~~~~ Zlib.xs: In function 'XS_Compress__Raw__Zlib__deflateStream_deflate': Zlib.xs:1137:17: warning: unused variable 'done' [-Wunused-variable] int done = increment - s->stream.avail_out ; Reini Urban rurban@cpan.org Show quoted text
> > Can you share the compilation error you are getting please? > > I'm guessing the bottom half is something warning about unused variables, but not sure what the top half is doing.
yes, that’s mostly optical. Show quoted text
> > Paul
Download signature.asc
application/pgp-signature 163b

Message body not shown because it is not plain text.