]> gcc.gnu.org Git - gcc.git/commitdiff
mkstemps.c (mkstemps): On VMS, open temp file with option that causes it to be delete...
authorDouglas B Rupp <rupp@gnat.com>
Tue, 15 Jan 2002 14:34:56 +0000 (09:34 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 15 Jan 2002 14:34:56 +0000 (09:34 -0500)
* libiberty/mkstemps.c (mkstemps): On VMS, open temp file with option
that causes it to be deleted when closed.
* gcc/gcc.c (delete_if_ordinary): Backout previous change.

From-SVN: r48872

gcc/ChangeLog
gcc/gcc.c
libiberty/ChangeLog
libiberty/mkstemps.c

index 70428b15078fde94d47836c97bc6700394586fc3..4161461308620492e0ee1d2901836b6aa669116d 100644 (file)
@@ -1,10 +1,12 @@
-2002-01-15  Kazu Hirata  <kazu@hxi.com>
+2002-01-15  Douglas B Rupp  <rupp@gnat.com>
 
-       * confiig/h8300/h8300.c (print_operand): Remove support for
-       unused operand characters.
+       * gcc.c (delete_if_ordinary): Backout previous change.
 
 2002-01-15  Kazu Hirata  <kazu@hxi.com>
 
+       * config/h8300/h8300.c (print_operand): Remove support for
+       unused operand characters.
+
        * read-rtl.c: Fix formatting.
        * real.c: Likewise.
        * recog.c: Likewise.
index d5472d33ddf307be2622560ad83fc121baa074a3..65ee5fab0eed6e494bda66f1c67c604fe35e42f6 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2110,9 +2110,7 @@ delete_if_ordinary (name)
 
   if (i == 'y' || i == 'Y')
 #endif /* DEBUG */
-    /* On VMS, more than one version of the temporary file may have been
-       created.  This ensures we delete all of them.  */
-    while (stat (name, &st) >= 0 && S_ISREG (st.st_mode))
+    if (stat (name, &st) >= 0 && S_ISREG (st.st_mode))
       if (unlink (name) < 0)
        if (verbose_flag)
          perror_with_name (name);
index fdccb59ab438391b6f4eb488d136e0ca389ea654..43a2951dae14474d5d1a9beb816039a5fad40271 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-15  Douglas B Rupp  <rupp@gnat.com>
+
+       * mkstemps.c (mkstemps): On VMS, open temp file with option
+       that causes it to be deleted when closed.
+
 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * cp-demangle.c (long_options): Const-ify.
index 8fe5784f1897791dfce6c682dc8edb170027b332..1f6600a15b91946d3de4b9995483863e70eb9bbf 100644 (file)
@@ -121,7 +121,11 @@ mkstemps (template, suffix_len)
       v /= 62;
       XXXXXX[5] = letters[v % 62];
 
+#ifdef VMS
+      fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd");
+#else
       fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
+#endif
       if (fd >= 0)
        /* The file does not exist.  */
        return fd;
This page took 0.086856 seconds and 5 git commands to generate.