summaryrefslogtreecommitdiff
path: root/ext/File
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
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')
-rw-r--r--ext/File/Glob/Glob.pm4
-rw-r--r--ext/File/Glob/bsd_glob.c15
2 files changed, 18 insertions, 1 deletions
diff --git a/ext/File/Glob/Glob.pm b/ext/File/Glob/Glob.pm
index f703a0b183..3c3ea6c1f2 100644
--- a/ext/File/Glob/Glob.pm
+++ b/ext/File/Glob/Glob.pm
@@ -109,7 +109,9 @@ if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos|MacOS)$/) {
# Autoload methods go after =cut, and are processed by the autosplit program.
sub glob {
- return doglob(@_);
+ my ($pat,$flags) = @_;
+ $flags = $DEFAULT_FLAGS if @_ < 2;
+ return doglob($pat,$flags);
}
## borrowed heavily from gsar's File::DosGlob
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) {