NULL-terminate PERL_INC_VERSION_LIST
Gurusamy Sarathy [Mon, 7 Feb 2000 09:46:11 +0000 (09:46 +0000)]
p4raw-id: //depot/perl@5019

Configure
perl.c
win32/config.bc
win32/config.gc
win32/config.vc
win32/config_H.bc
win32/config_H.gc
win32/config_H.vc

index 1b5d167..d98e7d9 100755 (executable)
--- 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 (file)
--- 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
        }
index 137347e..fd70a3f 100644 (file)
@@ -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~'
index abfc288..10a1c77 100644 (file)
@@ -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~'
index 729beb8..5514827 100644 (file)
@@ -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~'
index 399111f..271c36e 100644 (file)
  *     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.
index 9575e43..7683d85 100644 (file)
  *     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.
index dc01999..963630f 100644 (file)
  *     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.