This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Libiberty for VMS - Revised temp dir for make-temp-file.c
- From: Douglas B Rupp <rupp at gnat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, ian at airs dot com
- Date: Wed, 29 Jul 2009 11:00:06 -0700
- Subject: [PATCH] Libiberty for VMS - Revised temp dir for make-temp-file.c
This revised patch tries the standard VMS temp file logical, instead of
inventing new logical names specific to GCC on VMS. It should not be run
through getenv because that will return a VMS style directory spec. The
/<logical name> is the standard Unixy way of dealing with this. The
internals of the VMS CRTL deal automagically with the untranslated name
and do the right thing.
Tested on VMS
OK to commit?
--Douglas Rupp
AdaCore
2009-07-29 Douglas B Rupp <rupp@gnat.com>
* make-temp-file.c (choose_tmpdir): Try standard temp logical on VMS.
Index: make-temp-file.c
===================================================================
--- libiberty/make-temp-file.c (revision 150217)
+++ libiberty/make-temp-file.c (working copy)
@@ -111,9 +111,14 @@
char *tmpdir;
unsigned int len;
+#ifdef VMS
+ /* Try VMS standard temp logical. */
+ base = try_dir ("/sys$scratch", base);
+#else
base = try_dir (getenv ("TMPDIR"), base);
base = try_dir (getenv ("TMP"), base);
base = try_dir (getenv ("TEMP"), base);
+#endif
#ifdef P_tmpdir
base = try_dir (P_tmpdir, base);