+2018-02-15 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #15105]
+ [BZ #19463]
+ * libio/feof_u.c (feof_unlocked): Rename to __feof_unlocked and
+ define as weak alias of __feof_unlocked. Use libc_hidden_weak.
+ * include/stdio.h (feof_unlocked): Use libc_hidden_proto.
+ (__feof_unlocked): New declaration, and inline function if
+ [__USE_EXTERN_INLINES].
+ * iconv/gconv_conf.c (read_conf_file): Call __feof_unlocked
+ instead of feof_unlocked.
+ * intl/localealias.c [_LIBC] (FEOF): Likewise.
+ * nss/nsswitch.c (nss_parse_file): Likewise.
+ * sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area):
+ Likewise.
+ * time/getdate.c (__getdate_r): Likewise.
+ * sysdeps/posix/getaddrinfo.c [IS_IN (libc)] (feof_unlocked):
+ Define as macro to call __feof_unlocked.
+
2018-02-15 Wilco Dijkstra <wdijkstr@arm.com>
* sysdeps/aarch64/fpu/fpu_control.h: Use <> in include.
/* Process the known entries of the file. Comments start with `#' and
end with the end of the line. Empty lines are ignored. */
- while (!feof_unlocked (fp))
+ while (!__feof_unlocked (fp))
{
char *rp, *endp, *word;
ssize_t n = __getdelim (&line, &line_len, '\n', fp);
libc_hidden_proto (fputs_unlocked)
extern __typeof (fputs_unlocked) __fputs_unlocked;
libc_hidden_proto (__fputs_unlocked)
+libc_hidden_proto (feof_unlocked)
+extern __typeof (feof_unlocked) __feof_unlocked attribute_hidden;
libc_hidden_proto (fmemopen)
/* The prototype needs repeating instead of using __typeof to use
__THROW in C++ tests. */
extern int __gen_tempfd (int flags);
libc_hidden_proto (__gen_tempfd)
+# ifdef __USE_EXTERN_INLINES
+__extern_inline int
+__NTH (__feof_unlocked (FILE *__stream))
+{
+ return __feof_unlocked_body (__stream);
+}
+# endif
+
# endif /* not _ISOMAC */
#endif /* stdio.h */
/* Some optimizations for glibc. */
#ifdef _LIBC
-# define FEOF(fp) feof_unlocked (fp)
+# define FEOF(fp) __feof_unlocked (fp)
# define FGETS(buf, n, fp) __fgets_unlocked (buf, n, fp)
#else
# define FEOF(fp) feof (fp)
#undef feof_unlocked
int
-feof_unlocked (_IO_FILE *fp)
+__feof_unlocked (_IO_FILE *fp)
{
CHECK_FILE (fp, EOF);
return _IO_feof_unlocked (fp);
}
+weak_alias (__feof_unlocked, feof_unlocked)
+libc_hidden_weak (feof_unlocked)
last = this;
}
}
- while (!feof_unlocked (fp));
+ while (!__feof_unlocked (fp));
/* Free the buffer. */
free (line);
# include <idna.h>
#endif
+#if IS_IN (libc)
+# define feof_unlocked(fp) __feof_unlocked (fp)
+#endif
+
struct gaih_service
{
const char *name;
char *line = NULL;
size_t linelen = 0;
- while (! feof_unlocked (fp))
+ while (! __feof_unlocked (fp))
{
if (_IO_getdelim (&line, &linelen, '\n', fp) <= 0)
break;
if (result && *result == '\0')
break;
}
- while (!feof_unlocked (fp));
+ while (!__feof_unlocked (fp));
free (instr);