(write_locales): Disable implicit locking for the stream.
authordrepper <drepper>
Tue, 24 Jul 2001 06:58:03 +0000 (06:58 +0000)
committerdrepper <drepper>
Tue, 24 Jul 2001 06:58:03 +0000 (06:58 +0000)
Use feof_unlocked instead of feof.

locale/programs/locale.c

index 9c689d2..da1c0ff 100644 (file)
@@ -34,6 +34,7 @@
 #include <locale.h>
 #include <search.h>
 #include <stdio.h>
+#include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -364,7 +365,10 @@ write_locales (void)
        /* Ignore non-existing files.  */
        continue;
 
-      while (! feof (fp))
+      /* No threads present.  */
+      __fsetlocking (fp, FSETLOCKING_BYCALLER);
+
+      while (! feof_unlocked (fp))
        {
          /* It is a reasonable approach to use a fix buffer here
             because