From: Gurusamy Sarathy Date: Fri, 10 Sep 1999 11:05:13 +0000 (+0000) Subject: avoid leaking static local_patches unless patchlevel.h is X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3321bb0a51658948df39ab78e5b59a5eb3da71c;p=p5sagit%2Fp5-mst-13.2.git avoid leaking static local_patches unless patchlevel.h is explicitly included p4raw-id: //depot/perl@4119 --- diff --git a/patchlevel.h b/patchlevel.h index 5b07ae6..02a9689 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -7,6 +7,9 @@ #define PERL_VERSION 5 /* epoch */ #define PERL_SUBVERSION 61 /* generation */ +#define __PATCHLEVEL_H_INCLUDED__ +#endif + /* local_patches -- list of locally applied less-than-subversion patches. If you're distributing such a patch, please give it a name and a @@ -42,6 +45,7 @@ This will prevent patch from choking if someone has previously applied different patches than you. */ +#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT) static char *local_patches[] = { NULL ,NULL @@ -51,13 +55,8 @@ static char *local_patches[] = { # define LOCAL_PATCH_COUNT \ (sizeof(local_patches)/sizeof(local_patches[0])-2) -# define __PATCHLEVEL_H_INCLUDED__ -#endif - /* the old terms of reference, add them only when explicitly included */ -#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(PATCHLEVEL) #define PATCHLEVEL PERL_VERSION #undef SUBVERSION /* OS/390 has a SUBVERSION in a system header */ #define SUBVERSION PERL_SUBVERSION #endif - diff --git a/perl.c b/perl.c index 3c3a629..ed88bc3 100644 --- a/perl.c +++ b/perl.c @@ -14,6 +14,7 @@ #include "EXTERN.h" #define PERL_IN_PERL_C #include "perl.h" +#include "patchlevel.h" /* for local_patches */ /* XXX If this causes problems, set i_unistd=undef in the hint file. */ #ifdef I_UNISTD