mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Build the Compress::Raw::Zlib perl module with /usr/lib/libz
Two actively used copies of zlib in base are enough. This simplifies handling security fixes. Now that zlib.h r1.7 is reverted, zlib ffi works fine on 32-bit architectures. Compared with an earlier attempt in March, this disables the Z_SOLO build option (problem found by gkoehler) and fixes two regress tests to work with zlib 1.2.12. Corresponding upstream commits: https://github.com/pmqs/Compress-Raw-Zlib/commit/c44e0b732e214b7f77d42a3af6ae64e https://github.com/pmqs/Compress-Raw-Zlib/commit/f47ea5f36c40fe19efe404dd75fd790 ok bluhm
This commit is contained in:
parent
4b593a930a
commit
8bad623e4b
@ -75,7 +75,7 @@ WriteMakefile(
|
||||
NAME => 'Compress::Raw::Zlib',
|
||||
VERSION_FROM => 'lib/Compress/Raw/Zlib.pm',
|
||||
INC => "-I$ZLIB_INCLUDE" ,
|
||||
DEFINE => "-DNO_VIZ -DZ_SOLO $OLD_ZLIB $WALL -DGZIP_OS_CODE=$GZIP_OS_CODE $USE_PPPORT_H" ,
|
||||
DEFINE => "-DNO_VIZ $OLD_ZLIB $WALL -DGZIP_OS_CODE=$GZIP_OS_CODE $USE_PPPORT_H" ,
|
||||
XS => { 'Zlib.xs' => 'Zlib.c'},
|
||||
'depend' => { 'Makefile' => 'config.in' },
|
||||
'clean' => { FILES => '*.c constants.h constants.xs' },
|
||||
|
@ -16,9 +16,9 @@
|
||||
# Setting the Gzip OS Code
|
||||
#
|
||||
|
||||
BUILD_ZLIB = True
|
||||
INCLUDE = ./zlib-src
|
||||
LIB = ./zlib-src
|
||||
BUILD_ZLIB = False
|
||||
INCLUDE = /usr/include
|
||||
LIB = /usr/lib
|
||||
OLD_ZLIB = False
|
||||
GZIP_OS_CODE = AUTO_DETECT
|
||||
|
||||
|
@ -13,6 +13,7 @@ use bytes;
|
||||
use Test::More ;
|
||||
use CompTestUtils;
|
||||
|
||||
use constant ZLIB_1_2_12_0 => 0x12C0;
|
||||
|
||||
BEGIN
|
||||
{
|
||||
@ -489,10 +490,18 @@ SKIP:
|
||||
# print "x $status\n";
|
||||
last if $status == Z_STREAM_END or $status != Z_OK ;
|
||||
}
|
||||
|
||||
cmp_ok $status, '==', Z_DATA_ERROR ;
|
||||
is $GOT, $goodbye ;
|
||||
|
||||
# Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
|
||||
if (ZLIB_VERNUM >= ZLIB_1_2_12_0)
|
||||
{
|
||||
cmp_ok $status, '==', Z_STREAM_END ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmp_ok $status, '==', Z_DATA_ERROR ;
|
||||
}
|
||||
|
||||
is $GOT, $goodbye ;
|
||||
|
||||
# Check inflateSync leaves good data in buffer
|
||||
my $rest = $Answer ;
|
||||
@ -514,7 +523,17 @@ SKIP:
|
||||
is length($rest), $len2, "expected compressed output";
|
||||
|
||||
$GOT = '';
|
||||
cmp_ok $k->inflate($rest, $GOT), '==', Z_DATA_ERROR, "inflate returns Z_DATA_ERROR";
|
||||
$status = $k->inflate($rest, $GOT);
|
||||
# Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
|
||||
if (ZLIB_VERNUM >= ZLIB_1_2_12_0)
|
||||
{
|
||||
cmp_ok $status, '==', Z_STREAM_END ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmp_ok $status, '==', Z_DATA_ERROR ;
|
||||
}
|
||||
|
||||
is $GOT, $goodbye ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user