This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]