From 9f44f717b5c2e526c60d74be999e0ad9ef069b1a Mon Sep 17 00:00:00 2001 From: "Jerry D. Hedden" Date: Tue, 20 Mar 2007 07:05:46 -0700 Subject: Compress::Raw::Zlib doesn't need ppport.h in core [REVISED] From: "Jerry D. Hedden" Message-ID: <855257.38889.qm@web30205.mail.mud.yahoo.com> p4raw-id: //depot/perl@30655 --- ext/Compress/Raw/Zlib/Makefile.PL | 3 ++- ext/Compress/Raw/Zlib/Zlib.xs | 8 +++++--- ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'ext') diff --git a/ext/Compress/Raw/Zlib/Makefile.PL b/ext/Compress/Raw/Zlib/Makefile.PL index 7629725c1a..e151ac9afc 100644 --- a/ext/Compress/Raw/Zlib/Makefile.PL +++ b/ext/Compress/Raw/Zlib/Makefile.PL @@ -13,6 +13,7 @@ my $BUILD_ZLIB = 0 ; my $OLD_ZLIB = '' ; my $WALL = '' ; my $GZIP_OS_CODE = -1 ; +my $USE_PPPORT_H = ($ENV{PERL_CORE}) ? '' : '-DUSE_PPPORT_H'; #$WALL = ' -pedantic ' if $Config{'cc'} =~ /gcc/ ; #$WALL = ' -Wall -Wno-comment ' if $Config{'cc'} =~ /gcc/ ; @@ -65,7 +66,7 @@ WriteMakefile( NAME => 'Compress::Raw::Zlib', VERSION_FROM => 'lib/Compress/Raw/Zlib.pm', INC => "-I$ZLIB_INCLUDE" , - DEFINE => "$OLD_ZLIB $WALL -DGZIP_OS_CODE=$GZIP_OS_CODE" , + DEFINE => "$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' }, diff --git a/ext/Compress/Raw/Zlib/Zlib.xs b/ext/Compress/Raw/Zlib/Zlib.xs index 08ffc56752..31b7efd3aa 100644 --- a/ext/Compress/Raw/Zlib/Zlib.xs +++ b/ext/Compress/Raw/Zlib/Zlib.xs @@ -58,9 +58,11 @@ # define AT_LEAST_ZLIB_1_2_3 #endif -#define NEED_sv_2pvbyte -#define NEED_sv_2pv_nolen -#include "ppport.h" +#ifdef USE_PPPORT_H +# define NEED_sv_2pvbyte +# define NEED_sv_2pv_nolen +# include "ppport.h" +#endif #if PERL_REVISION == 5 && (PERL_VERSION < 8 || (PERL_VERSION == 8 && PERL_SUBVERSION < 4 )) diff --git a/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm b/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm index 3b81b6c9f4..02ff3d1668 100644 --- a/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm +++ b/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm @@ -13,7 +13,7 @@ use warnings ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD); -$VERSION = '2.004'; +$VERSION = '2.004_01'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; -- cgit v1.2.1