From d4e59e6254ff1d23c1f1d03bd4c8447f98b277c9 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 10 Sep 2013 00:33:19 -0700 Subject: vutil.c: Add preproc code specific to CPAN The purpose is to bring the files into synch so that later version.pm upgrades involve dropping files into place. This requires changing vutil.h a bit to work in the core. --- vutil.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'vutil.h') diff --git a/vutil.h b/vutil.h index d307843a4d..f86631d654 100644 --- a/vutil.h +++ b/vutil.h @@ -1,4 +1,9 @@ -#include "ppport.h" +/* This file is part of the "version" CPAN distribution. Please avoid + editing it in the perl core. */ + +#ifndef PERL_CORE +# include "ppport.h" +#endif /* The MUTABLE_*() macros cast pointers to the types shown, in such a way * (compiler permitting) that casting away const-ness will give a warning; @@ -80,7 +85,7 @@ Perl_ck_warner(pTHX_ U32 err, const char* pat, ...) #define ISA_CLASS_OBJ(v,c) (sv_isobject(v) && sv_derived_from(v,c)) -#if PERL_VERSION_GE(5,9,0) +#if PERL_VERSION_GE(5,9,0) && !defined(PERL_CORE) # define VUTIL_REPLACE_CORE 1 @@ -131,10 +136,14 @@ const char * Perl_prescan_version(pTHX_ const char *s, bool strict, const char** # define VCMP(a,b) Perl_vcmp(aTHX_ a,b) # define PRESCAN_VERSION(a,b,c,d,e,f,g) Perl_prescan_version(aTHX_ a,b,c,d,e,f,g) -# define is_LAX_VERSION(a,b) \ +# ifndef is_LAX_VERSION +# define is_LAX_VERSION(a,b) \ (a != Perl_prescan_version(aTHX_ a, FALSE, b, NULL, NULL, NULL, NULL)) -# define is_STRICT_VERSION(a,b) \ +# endif +# ifndef is_STRICT_VERSION +# define is_STRICT_VERSION(a,b) \ (a != Perl_prescan_version(aTHX_ a, TRUE, b, NULL, NULL, NULL, NULL)) +# endif #endif -- cgit v1.2.1