OSDN Git Service

merge from gcc
authordj <dj>
Thu, 31 Jul 2008 22:01:30 +0000 (22:01 +0000)
committerdj <dj>
Thu, 31 Jul 2008 22:01:30 +0000 (22:01 +0000)
libiberty/ChangeLog
libiberty/mkstemps.c

index da52583..fa8abf5 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * mkstemps.c (mkstemps): Keep looping even for EISDIR.
+
 2008-07-31  Denys Vlasenko  <dvlasenk@redhat.com>
 
        * mkstemps.c (mkstemps): If open failed with errno other than
index 093b67a..a0e68a7 100644 (file)
@@ -127,7 +127,11 @@ mkstemps (char *pattern, int suffix_len)
       if (fd >= 0)
        /* The file does not exist.  */
        return fd;
-      if (errno != EEXIST)
+      if (errno != EEXIST
+#ifdef EISDIR
+         && errno != EISDIR
+#endif
+        )
        /* Fatal error (EPERM, ENOSPC etc).  Doesn't make sense to loop.  */
        break;