summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-07 09:46:11 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-07 09:46:11 +0000
commit8353b874e0f557f50e91f1a509c06c2aadde1f0c (patch)
tree2afcd0e016640834905c905faeaff3268d96095c
parent29d82f8db02520fbd9de7355b9f87859201d969b (diff)
downloadperl-8353b874e0f557f50e91f1a509c06c2aadde1f0c.tar.gz
NULL-terminate PERL_INC_VERSION_LIST
p4raw-id: //depot/perl@5019
-rwxr-xr-xConfigure4
-rw-r--r--perl.c7
-rw-r--r--win32/config.bc1
-rw-r--r--win32/config.gc1
-rw-r--r--win32/config.vc1
-rw-r--r--win32/config_H.bc2
-rw-r--r--win32/config_H.gc2
-rw-r--r--win32/config_H.vc2
8 files changed, 11 insertions, 9 deletions
diff --git a/Configure b/Configure
index 1b5d167bc8..d98e7d9f3d 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 ebb76a6f2d..931e592c76 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 137347e349..fd70a3f560 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 abfc288cc2..10a1c778f9 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 729beb8cd4..5514827e86 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 399111f2b1..271c36efd0 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 9575e4325e..7683d857f0 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 dc019993ae..963630f3cb 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.