OSDN Git Service

* ira-color.c (ira_reassign_pseudos): Collect and sort all the pseudos
[pf3gnuchains/gcc-fork.git] / libiberty / mkstemps.c
index 6c2e472..a0e68a7 100644 (file)
@@ -127,6 +127,13 @@ mkstemps (char *pattern, int suffix_len)
       if (fd >= 0)
        /* The file does not exist.  */
        return fd;
+      if (errno != EEXIST
+#ifdef EISDIR
+         && errno != EISDIR
+#endif
+        )
+       /* Fatal error (EPERM, ENOSPC etc).  Doesn't make sense to loop.  */
+       break;
 
       /* This is a random value.  It is only necessary that the next
         TMP_MAX values generated by adding 7777 to VALUE are different