summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-07 09:57:46 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-07 09:57:46 +0000
commit189d1e8d580baf589b8a569f3f4af6e73eba632f (patch)
treeb8d7cbc23f0d52a82de19e81caa1790de7b52412 /perl.c
parent8353b874e0f557f50e91f1a509c06c2aadde1f0c (diff)
downloadperl-189d1e8d580baf589b8a569f3f4af6e73eba632f.tar.gz
tolerate NULL SITELIB_EXP
p4raw-id: //depot/perl@5020
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl.c b/perl.c
index 931e592c76..8c0a297b39 100644
--- a/perl.c
+++ b/perl.c
@@ -3115,12 +3115,15 @@ S_init_perllib(pTHX)
#ifdef SITELIB_EXP
{
- char buf[MAXPATHLEN];
-
- strcpy(buf,SITELIB_EXP);
- if (strrchr(buf,'/')) /* XXX Hack, Configure var needed */
- *strrchr(buf,'/') = '\0';
- incpush(buf, TRUE);
+ char *path = SITELIB_EXP;
+
+ if (path) {
+ char buf[1024];
+ strcpy(buf,path);
+ if (strrchr(buf,'/')) /* XXX Hack, Configure var needed */
+ *strrchr(buf,'/') = '\0';
+ incpush(buf, TRUE);
+ }
}
#endif
#if defined(PERL_VENDORLIB_EXP)