diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-07 09:57:46 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-07 09:57:46 +0000 |
commit | 189d1e8d580baf589b8a569f3f4af6e73eba632f (patch) | |
tree | b8d7cbc23f0d52a82de19e81caa1790de7b52412 /perl.c | |
parent | 8353b874e0f557f50e91f1a509c06c2aadde1f0c (diff) | |
download | perl-189d1e8d580baf589b8a569f3f4af6e73eba632f.tar.gz |
tolerate NULL SITELIB_EXP
p4raw-id: //depot/perl@5020
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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) |