diff options
author | Craig A. Berry <craigberry@mac.com> | 2004-01-18 06:51:23 -0600 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2004-01-19 10:41:24 +0000 |
commit | 7659f3199f910ecba805d8e66673aebf3f976173 (patch) | |
tree | cddfc7f644dcf321e3bee5f3a6650dce68e71be5 /perlio.c | |
parent | 02e1c2f1c4f0858353f9cc49bc10789e69f32bb5 (diff) | |
download | perl-7659f3199f910ecba805d8e66673aebf3f976173.tar.gz |
rescue PerlIO_getname for VMS
From: "Craig A. Berry" <craigberry@mac.com>
Message-ID: <400AD5AB.3080708@mac.com>
p4raw-id: //depot/perl@22174
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4718,9 +4718,16 @@ PerlIO_getname(PerlIO *f, char *buf) dTHX; char *name = NULL; #ifdef VMS + bool exported = FALSE; FILE *stdio = PerlIOSelf(f, PerlIOStdio)->stdio; - if (stdio) + if (!stdio) { + stdio = PerlIO_exportFILE(f,0); + exported = TRUE; + } + if (stdio) { name = fgetname(stdio, buf); + if (exported) PerlIO_releaseFILE(f,stdio); + } #else Perl_croak(aTHX_ "Don't know how to get file name"); #endif |