From: Jarkko Hietaniemi Date: Tue, 21 Jan 2003 22:08:51 +0000 (+0000) Subject: Try to make including patchlevel.h a bit more X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=069d7f7183fb67de35505013a65ce03b587225f0;p=p5sagit%2Fp5-mst-13.2.git Try to make including patchlevel.h a bit more robust (use <> instead of "") and in case of failure (PERL_VERSION didn't get defined) try to fail (by trying to #include an "obviously" named file that should not exist) (didn't use #error since IIRC older cpps do not have it) (Tries to address [perl #20276].) p4raw-id: //depot/perl@18541 --- diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index 6c9459e..8bf9f75 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -4,8 +4,11 @@ #include "XSUB.h" #ifndef PERL_VERSION -#include "patchlevel.h" -#define PERL_VERSION PATCHLEVEL +# include +# ifndef PERL_VERSION +# include +# endif +# define PERL_VERSION PATCHLEVEL #endif #if PERL_VERSION < 5 diff --git a/ext/Devel/PPPort/PPPort.pm b/ext/Devel/PPPort/PPPort.pm index b426fd2..5f57ac6 100644 --- a/ext/Devel/PPPort/PPPort.pm +++ b/ext/Devel/PPPort/PPPort.pm @@ -355,7 +355,10 @@ __DATA__ #ifndef PERL_REVISION # ifndef __PATCHLEVEL_H_INCLUDED__ -# include "patchlevel.h" +# include +# endif +# ifndef PERL_VERSION +# include # endif # ifndef PERL_REVISION # define PERL_REVISION (5) diff --git a/ext/Digest/MD5/MD5.xs b/ext/Digest/MD5/MD5.xs index abc1748..b1f2a04 100644 --- a/ext/Digest/MD5/MD5.xs +++ b/ext/Digest/MD5/MD5.xs @@ -44,7 +44,10 @@ extern "C" { } #endif -#include "patchlevel.h" +#include +#ifndef PERL_VERSION +# include +#endif #if PATCHLEVEL <= 4 && !defined(PL_dowarn) #define PL_dowarn dowarn #endif diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs index f96b451..db9ce15 100644 --- a/ext/List/Util/Util.xs +++ b/ext/List/Util/Util.xs @@ -8,7 +8,10 @@ #include #ifndef PERL_VERSION -# include "patchlevel.h" +# include +# ifndef PERL_VERSION +# include +# endif # define PERL_REVISION 5 # define PERL_VERSION PATCHLEVEL # define PERL_SUBVERSION SUBVERSION diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 9c307a7..e59914a 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -11,6 +11,9 @@ #include #include #include /* Perl's one, needed since 5.6 */ +#ifndef PERL_VERSION +# include +#endif #include #ifndef NETWARE