(open_archive): Replace using label 'again' with a loop to work around gcc 3.2 bug.

This commit is contained in:
Ulrich Drepper 2002-08-28 12:00:53 +00:00
parent 9cce206e72
commit 1099624912
2 changed files with 53 additions and 48 deletions

View File

@ -1 +1 @@
linuxthreads-0.9 by Xavier Leroy
linuxthreads-0.10 by Xavier Leroy

View File

@ -417,7 +417,8 @@ open_archive (struct locarhandle *ah, bool readonly)
memcpy (archivefname, output_prefix, prefix_len);
strcpy (archivefname + prefix_len, ARCHIVE_NAME);
again:
while (1)
{
/* Open the archive. We must have exclusive write access. */
fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR);
if (fd == -1)
@ -464,7 +465,7 @@ open_archive (struct locarhandle *ah, bool readonly)
req.tv_nsec = 1000000 * (random () % 500 + 1);
(void) nanosleep (&req, NULL);
goto again;
continue;
}
error (EXIT_FAILURE, errno, _("cannot lock locale archive \"%s\""),
@ -479,7 +480,11 @@ open_archive (struct locarhandle *ah, bool readonly)
{
(void) lockf64 (fd, F_ULOCK, sizeof (struct locarhead));
close (fd);
goto again;
continue;
}
/* Leave the loop. */
break;
}
/* Read the header. */