aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--include/stdio.h8
-rw-r--r--libio/ferror_u.c4
-rw-r--r--time/getdate.c2
4 files changed, 26 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 35bf20a..de48635 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2018-02-19 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #15105]
+ [BZ #19463]
+ * libio/ferror_u.c (ferror_unlocked): Rename to __ferror_unlocked
+ and define as weak alias of __ferror_unlocked. Use
+ libc_hidden_weak.
+ * include/stdio.h [!_ISOMAC] (ferror_unlocked): Use
+ libc_hidden_proto.
+ [!_ISOMAC] (__ferror_unlocked) New declaration, and inline
+ function if [__USE_EXTERN_INLINES].
+ * time/getdate.c (__getdate_r): Call __ferror_unlocked instead of
+ ferror_unlocked.
+
2018-02-19 Rical Jasan <ricaljasan@pacific.net>
[BZ #6889]
diff --git a/include/stdio.h b/include/stdio.h
index 7871000..1bf49a9 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -185,6 +185,8 @@ 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 (ferror_unlocked)
+extern __typeof (ferror_unlocked) __ferror_unlocked attribute_hidden;
libc_hidden_proto (fmemopen)
/* The prototype needs repeating instead of using __typeof to use
__THROW in C++ tests. */
@@ -211,6 +213,12 @@ __NTH (__feof_unlocked (FILE *__stream))
{
return __feof_unlocked_body (__stream);
}
+
+__extern_inline int
+__NTH (__ferror_unlocked (FILE *__stream))
+{
+ return __ferror_unlocked_body (__stream);
+}
# endif
# endif /* not _ISOMAC */
diff --git a/libio/ferror_u.c b/libio/ferror_u.c
index afd0bef..3eaf84e 100644
--- a/libio/ferror_u.c
+++ b/libio/ferror_u.c
@@ -30,8 +30,10 @@
#undef ferror_unlocked
int
-ferror_unlocked (_IO_FILE *fp)
+__ferror_unlocked (_IO_FILE *fp)
{
CHECK_FILE (fp, EOF);
return _IO_ferror_unlocked (fp);
}
+weak_alias (__ferror_unlocked, ferror_unlocked)
+libc_hidden_weak (ferror_unlocked)
diff --git a/time/getdate.c b/time/getdate.c
index 29ad760..e568149 100644
--- a/time/getdate.c
+++ b/time/getdate.c
@@ -206,7 +206,7 @@ __getdate_r (const char *string, struct tm *tp)
free (line);
/* Check for errors. */
- if (ferror_unlocked (fp))
+ if (__ferror_unlocked (fp))
{
fclose (fp);
return 5;