summaryrefslogtreecommitdiff
path: root/ext/File/Glob/bsd_glob.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-01 06:44:42 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-01 06:44:42 +0000
commitf0963acb6df75767aaf57c94e1e7509003ff1543 (patch)
treecaab5a83cad07f6fe3efa85385f4bc996ab12923 /ext/File/Glob/bsd_glob.c
parentc15a5d5de69fd60182fabfe5d4c4aba46fd1ca8a (diff)
downloadperl-f0963acb6df75767aaf57c94e1e7509003ff1543.tar.gz
consolidated VMS patches (from Craig A. Berry
<craig.berry@metamorgs.com>); Glob.pm patch modified to use $DEFAULT_FLAGS, and iff no flags were supplied p4raw-id: //depot/perl@5397
Diffstat (limited to 'ext/File/Glob/bsd_glob.c')
-rw-r--r--ext/File/Glob/bsd_glob.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/File/Glob/bsd_glob.c b/ext/File/Glob/bsd_glob.c
index c422d608bd..62bfe4f80c 100644
--- a/ext/File/Glob/bsd_glob.c
+++ b/ext/File/Glob/bsd_glob.c
@@ -658,6 +658,21 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern,
*pathend = BG_EOS;
errno = 0;
+#ifdef VMS
+ {
+ Char *q = pathend;
+ if (q - pathbuf > 5) {
+ q -= 5;
+ if (q[0] == '.' && tolower(q[1]) == 'd' && tolower(q[2]) == 'i'
+ && tolower(q[3]) == 'r' && q[4] == '/')
+ {
+ q[0] = '/';
+ q[1] = BG_EOS;
+ pathend = q+1;
+ }
+ }
+ }
+#endif
if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
/* TODO: don't call for ENOENT or ENOTDIR? */
if (pglob->gl_errfunc) {