From: Gurusamy Sarathy Date: Mon, 7 Feb 2000 09:46:11 +0000 (+0000) Subject: NULL-terminate PERL_INC_VERSION_LIST X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8353b874e0f557f50e91f1a509c06c2aadde1f0c;p=p5sagit%2Fp5-mst-13.2.git NULL-terminate PERL_INC_VERSION_LIST p4raw-id: //depot/perl@5019 --- diff --git a/Configure b/Configure index 1b5d167..d98e7d9 100755 --- a/Configure +++ b/Configure @@ -5381,9 +5381,9 @@ case "$ans" in esac case "$inc_version_list" in ''|' ') - inc_version_list_init='""';; + inc_version_list_init='0';; *) inc_version_list_init=`echo $inc_version_list | - $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/"/'` + $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'` ;; esac $rm -f getverlist diff --git a/perl.c b/perl.c index ebb76a6..931e592 100644 --- a/perl.c +++ b/perl.c @@ -3187,7 +3187,8 @@ S_incpush(pTHX_ char *p, int addsubdirs) */ if (addsubdirs) { #ifdef PERL_INC_VERSION_LIST - const char *incverlist[] = { PERL_INC_VERSION_LIST, NULL }; + /* Configure terminates PERL_INC_VERSION_LIST with a NULL */ + const char *incverlist[] = { PERL_INC_VERSION_LIST }; const char **incver; #endif struct stat tmpstatbuf; @@ -3222,14 +3223,12 @@ S_incpush(pTHX_ char *p, int addsubdirs) av_push(GvAVn(PL_incgv), newSVsv(subdir)); #ifdef PERL_INC_VERSION_LIST - for (incver = incverlist; *incver; incver++) - { + for (incver = incverlist; *incver; incver++) { /* .../xxx if -d .../xxx */ Perl_sv_setpvf(aTHX_ subdir, "%"SVf"/%s", libdir, *incver); if (PerlLIO_stat(SvPVX(subdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) av_push(GvAVn(PL_incgv), newSVsv(subdir)); - } #endif } diff --git a/win32/config.bc b/win32/config.bc index 137347e..fd70a3f 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -472,6 +472,7 @@ i_varhdr='varargs.h' i_vfork='undef' ignore_versioned_solibs='' inc_version_list='' +inc_version_list_init='0' incpath='' inews='' installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' diff --git a/win32/config.gc b/win32/config.gc index abfc288..10a1c77 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -472,6 +472,7 @@ i_varhdr='varargs.h' i_vfork='undef' ignore_versioned_solibs='' inc_version_list='' +inc_version_list_init='0' incpath='' inews='' installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' diff --git a/win32/config.vc b/win32/config.vc index 729beb8..5514827 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -472,6 +472,7 @@ i_varhdr='varargs.h' i_vfork='undef' ignore_versioned_solibs='' inc_version_list='' +inc_version_list_init='0' incpath='' inews='' installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' diff --git a/win32/config_H.bc b/win32/config_H.bc index 399111f..271c36e 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -2305,7 +2305,7 @@ * for a C initialization string. See the inc_version_list entry * in Porting/Glossary for more details. */ -#define PERL_INC_VERSION_LIST /**/ +#define PERL_INC_VERSION_LIST 0 /**/ /* HAS_OFF64_T: * This symbol will be defined if the C compiler supports off64_t. diff --git a/win32/config_H.gc b/win32/config_H.gc index 9575e43..7683d85 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -2305,7 +2305,7 @@ * for a C initialization string. See the inc_version_list entry * in Porting/Glossary for more details. */ -#define PERL_INC_VERSION_LIST /**/ +#define PERL_INC_VERSION_LIST 0 /**/ /* HAS_OFF64_T: * This symbol will be defined if the C compiler supports off64_t. diff --git a/win32/config_H.vc b/win32/config_H.vc index dc01999..963630f 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -2305,7 +2305,7 @@ * for a C initialization string. See the inc_version_list entry * in Porting/Glossary for more details. */ -#define PERL_INC_VERSION_LIST /**/ +#define PERL_INC_VERSION_LIST 0 /**/ /* HAS_OFF64_T: * This symbol will be defined if the C compiler supports off64_t.