diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-01-21 22:08:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-01-21 22:08:51 +0000 |
commit | 069d7f7183fb67de35505013a65ce03b587225f0 (patch) | |
tree | 50cffe0126d46398b8d8fec09d1d62687342323a | |
parent | 01d07975f7ef0e7dd339708172dbf5a4de2f8c8c (diff) | |
download | perl-069d7f7183fb67de35505013a65ce03b587225f0.tar.gz |
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
-rw-r--r-- | ext/Data/Dumper/Dumper.xs | 7 | ||||
-rw-r--r-- | ext/Devel/PPPort/PPPort.pm | 5 | ||||
-rw-r--r-- | ext/Digest/MD5/MD5.xs | 5 | ||||
-rw-r--r-- | ext/List/Util/Util.xs | 5 | ||||
-rw-r--r-- | ext/Storable/Storable.xs | 3 |
5 files changed, 20 insertions, 5 deletions
diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index 6c9459e486..8bf9f75282 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 <patchlevel.h> +# ifndef PERL_VERSION +# include <could_not_find_Perl_patchlevel.h> +# 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 b426fd20ab..5f57ac6950 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 <patchlevel.h> +# endif +# ifndef PERL_VERSION +# include <could_not_find_Perl_patchlevel.h> # endif # ifndef PERL_REVISION # define PERL_REVISION (5) diff --git a/ext/Digest/MD5/MD5.xs b/ext/Digest/MD5/MD5.xs index abc1748044..b1f2a04cdf 100644 --- a/ext/Digest/MD5/MD5.xs +++ b/ext/Digest/MD5/MD5.xs @@ -44,7 +44,10 @@ extern "C" { } #endif -#include "patchlevel.h" +#include <patchlevel.h> +#ifndef PERL_VERSION +# include <could_not_find_Perl_patchlevel.h> +#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 f96b45162b..db9ce1571a 100644 --- a/ext/List/Util/Util.xs +++ b/ext/List/Util/Util.xs @@ -8,7 +8,10 @@ #include <XSUB.h> #ifndef PERL_VERSION -# include "patchlevel.h" +# include <patchlevel.h> +# ifndef PERL_VERSION +# include <could_not_find_Perl_patchlevel.h> +# 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 9c307a7fad..e59914acb3 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -11,6 +11,9 @@ #include <EXTERN.h> #include <perl.h> #include <patchlevel.h> /* Perl's one, needed since 5.6 */ +#ifndef PERL_VERSION +# include <could_not_find_Perl_patchlevel.h> +#endif #include <XSUB.h> #ifndef NETWARE |