Craig A. Berry [Sun, 18 Jan 2004 12:51:23 +0000 (06:51 -0600)]
From: "Craig A. Berry" <craigberry@mac.com>
Message-ID: <
400AD5AB.3080708@mac.com>
p4raw-id: //depot/perl@22174
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