summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>2000-05-29 16:22:08 +0000
committerbailey <bailey@newman.upenn.edu>2000-05-29 16:22:08 +0000
commit674d6c381cbfa67bc93fd195278b889049c14bba (patch)
tree2efaa441c4d289143580b4dcb2d7a450d8e7be0a /vms/vms.c
parentbdb84599aeb6d8fcc1319c109c1240cbc6c835db (diff)
downloadperl-674d6c381cbfa67bc93fd195278b889049c14bba.tar.gz
Add fallback to tmpfile for use in cases where user's relying on
ACLs on SYS$SCRATCH to permit file creation. (based on Charles Lane's patch) p4raw-id: //depot/vmsperl@6158
Diffstat (limited to 'vms/vms.c')
-rw-r--r--vms/vms.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/vms/vms.c b/vms/vms.c
index cc1184b6cf..de4a374637 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -936,6 +936,28 @@ my_chdir(char *dir)
} /* end of my_chdir */
/*}}}*/
+
+/*{{{FILE *my_tmpfile()*/
+FILE *
+my_tmpfile(void)
+{
+ FILE *fp;
+ char *cp;
+ dTHX;
+
+ if ((fp = tmpfile())) return fp;
+
+ New(1323,cp,L_tmpnam+24,char);
+ strcpy(cp,"Sys$Scratch:");
+ tmpnam(cp+strlen(cp));
+ strcat(cp,".Perltmp");
+ fp = fopen(cp,"w+","fop=dlt");
+ Safefree(cp);
+ return fp;
+}
+/*}}}*/
+
+
static void
create_mbx(unsigned short int *chan, struct dsc$descriptor_s *namdsc)
{