diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-31 21:22:09 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-31 21:22:09 +0000 |
commit | 96b7926f953b981298f88989b1b86f27dbd9875b (patch) | |
tree | c8ab50e9765fb122be9c8ee0d932f860b356e1ef /libiberty | |
parent | 5a733ca6d132d1604b0228c1789e4389090619e0 (diff) | |
download | gcc-96b7926f953b981298f88989b1b86f27dbd9875b.tar.gz |
* mkstemps.c (mkstemps): Keep looping even for EISDIR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138436 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 4 | ||||
-rw-r--r-- | libiberty/mkstemps.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index da52583c8f2..fa8abf51415 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -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 diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c index 093b67af868..a0e68a73b49 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; |