mirror of git://sourceware.org/git/glibc.git
(open_archive): Replace using label 'again' with a loop to work around gcc 3.2 bug.
This commit is contained in:
parent
9cce206e72
commit
1099624912
|
|
@ -1 +1 @@
|
||||||
linuxthreads-0.9 by Xavier Leroy
|
linuxthreads-0.10 by Xavier Leroy
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,8 @@ open_archive (struct locarhandle *ah, bool readonly)
|
||||||
memcpy (archivefname, output_prefix, prefix_len);
|
memcpy (archivefname, output_prefix, prefix_len);
|
||||||
strcpy (archivefname + prefix_len, ARCHIVE_NAME);
|
strcpy (archivefname + prefix_len, ARCHIVE_NAME);
|
||||||
|
|
||||||
again:
|
while (1)
|
||||||
|
{
|
||||||
/* Open the archive. We must have exclusive write access. */
|
/* Open the archive. We must have exclusive write access. */
|
||||||
fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR);
|
fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
|
|
@ -464,7 +465,7 @@ open_archive (struct locarhandle *ah, bool readonly)
|
||||||
req.tv_nsec = 1000000 * (random () % 500 + 1);
|
req.tv_nsec = 1000000 * (random () % 500 + 1);
|
||||||
(void) nanosleep (&req, NULL);
|
(void) nanosleep (&req, NULL);
|
||||||
|
|
||||||
goto again;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
error (EXIT_FAILURE, errno, _("cannot lock locale archive \"%s\""),
|
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));
|
(void) lockf64 (fd, F_ULOCK, sizeof (struct locarhead));
|
||||||
close (fd);
|
close (fd);
|
||||||
goto again;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Leave the loop. */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the header. */
|
/* Read the header. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue