From: Jerry D. Hedden Date: Tue, 20 Mar 2007 14:05:46 +0000 (-0700) Subject: Compress::Raw::Zlib doesn't need ppport.h in core [REVISED] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f44f717b5c2e526c60d74be999e0ad9ef069b1a;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/ext/Compress/Raw/Zlib/Makefile.PL b/ext/Compress/Raw/Zlib/Makefile.PL index 7629725..e151ac9 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 08ffc56..31b7efd 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 3b81b6c..02ff3d1 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; diff --git a/mkppport.lst b/mkppport.lst index 3558cc3..58ce54e 100644 --- a/mkppport.lst +++ b/mkppport.lst @@ -5,7 +5,6 @@ # This file is read by mkppport at build time. # -ext/Compress/Raw/Zlib ext/Cwd ext/Data/Dumper ext/Sys/Syslog