From: DJ Delorie Date: Thu, 31 Jul 2008 22:01:30 +0000 (+0000) Subject: merge from gcc X-Git-Tag: sid-snapshot-20080801~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8975bb307270b579dfaeadc21389792021d7304c;p=platform%2Fupstream%2Fbinutils.git merge from gcc --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index da52583..fa8abf5 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2008-07-31 Jakub Jelinek + + * mkstemps.c (mkstemps): Keep looping even for EISDIR. + 2008-07-31 Denys Vlasenko * mkstemps.c (mkstemps): If open failed with errno other than diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c index 093b67a..a0e68a7 100644 --- a/libiberty/mkstemps.c +++ b/libiberty/mkstemps.c @@ -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;