summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-06-30 02:21:44 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-06-30 02:21:44 +0000
commitab3b2ded41425f3588741db207891897ba0816e3 (patch)
treeb894e1e5d49b6ce8a23392cb950d8d75611ad3ad /vms
parent90e08c66fa60e0134a2fa0faa1d1b97485338d2d (diff)
parent0cacb523b3d9abfe9ac5761f31a2c11458e98c49 (diff)
downloadperl-ab3b2ded41425f3588741db207891897ba0816e3.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@6290
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c22
-rw-r--r--vms/vmsish.h12
2 files changed, 34 insertions, 0 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 42c6e144bf..40348e0056 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -946,6 +946,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)
{
diff --git a/vms/vmsish.h b/vms/vmsish.h
index 48eda0aa25..104eabce1e 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -145,6 +145,7 @@
#define kill_file Perl_kill_file
#define my_mkdir Perl_my_mkdir
#define my_chdir Perl_my_chdir
+#define my_tmpfile Perl_my_tmpfile
#define my_utime Perl_my_utime
#define vms_image_init Perl_vms_image_init
#define readdir Perl_readdir
@@ -193,6 +194,16 @@
# define vfork my_vfork
#endif
+/*
+ * Toss in a shim to tmpfile which creates a plain temp file if the
+ * RMS tmp mechanism won't work (e.g. if someone is relying on ACLs
+ * from a specific directory to permit creation of files).
+ */
+#ifndef DONT_MASK_RTL_CALLS
+# define tmpfile my_tmpfile
+#endif
+
+
/* BIG_TIME:
* This symbol is defined if Time_t is an unsigned type on this system.
*/
@@ -698,6 +709,7 @@ char * my_gconvert (double, int, int, char *);
int kill_file (char *);
int my_mkdir (char *, Mode_t);
int my_chdir (char *);
+FILE * my_tmpfile (void);
int my_utime (char *, struct utimbuf *);
void vms_image_init (int *, char ***);
struct dirent * readdir (DIR *);