diff mbox series

[4/8] libio: Replace internal _IO_getdelim symbol with __getdelim

Message ID ec83a56fc2507ce754cf7493134a839e703ddc80.1623085295.git.fweimer@redhat.com
State New
Headers show
Series Move nss_files into libc | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Florian Weimer June 7, 2021, 5:38 p.m. UTC
__getdelim is exported, _IO_getdelim is not.  Add a hidden prototype
for __getdelim.
---
 iconv/gconv_conf.c                      | 4 ----
 include/stdio.h                         | 1 +
 libio/iogetdelim.c                      | 7 +++----
 libio/libioP.h                          | 1 -
 stdio-common/getline.c                  | 2 +-
 sysdeps/unix/sysv/linux/readonly-area.c | 2 +-
 6 files changed, 6 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index 682f949834..bb2c1d04ea 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -96,10 +96,6 @@  static const char builtin_aliases[] =
 #undef BUILTIN_ALIAS
 };
 
-#include <libio/libioP.h>
-#define __getdelim(line, len, c, fp) _IO_getdelim (line, len, c, fp)
-
-
 /* Value of the GCONV_PATH environment variable.  */
 const char *__gconv_path_envvar;
 
diff --git a/include/stdio.h b/include/stdio.h
index 311adcf953..23b7fd288c 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -213,6 +213,7 @@  libc_hidden_ldbl_proto (fprintf)
 libc_hidden_ldbl_proto (vfprintf)
 libc_hidden_ldbl_proto (sprintf)
 libc_hidden_proto (ungetc)
+libc_hidden_proto (__getdelim)
 libc_hidden_proto (fwrite)
 libc_hidden_proto (perror)
 libc_hidden_proto (remove)
diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c
index 06450ca96c..3b1253bae8 100644
--- a/libio/iogetdelim.c
+++ b/libio/iogetdelim.c
@@ -37,7 +37,7 @@ 
    null terminator), or -1 on error or EOF.  */
 
 ssize_t
-_IO_getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
+__getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
 {
   ssize_t result;
   ssize_t cur_len = 0;
@@ -122,6 +122,5 @@  unlock_return:
   _IO_release_lock (fp);
   return result;
 }
-
-weak_alias (_IO_getdelim, __getdelim)
-weak_alias (_IO_getdelim, getdelim)
+libc_hidden_def (__getdelim)
+weak_alias (__getdelim, getdelim)
diff --git a/libio/libioP.h b/libio/libioP.h
index 4bad7f3c06..dc9a2ce9c8 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -734,7 +734,6 @@  libc_hidden_proto (_IO_getline)
 extern size_t _IO_getline_info (FILE *,char *, size_t,
 				    int, int, int *);
 libc_hidden_proto (_IO_getline_info)
-extern ssize_t _IO_getdelim (char **, size_t *, int, FILE *);
 extern size_t _IO_getwline (FILE *,wchar_t *, size_t, wint_t, int);
 extern size_t _IO_getwline_info (FILE *,wchar_t *, size_t,
 				     wint_t, int, wint_t *);
diff --git a/stdio-common/getline.c b/stdio-common/getline.c
index de212243bb..52dfc58f2b 100644
--- a/stdio-common/getline.c
+++ b/stdio-common/getline.c
@@ -25,7 +25,7 @@ 
 ssize_t
 __getline (char **lineptr, size_t *n, FILE *stream)
 {
-  return _IO_getdelim (lineptr, n, '\n', stream);
+  return __getdelim (lineptr, n, '\n', stream);
 }
 
 weak_alias (__getline, getline)
diff --git a/sysdeps/unix/sysv/linux/readonly-area.c b/sysdeps/unix/sysv/linux/readonly-area.c
index b42ec6ef3e..fa407d2f05 100644
--- a/sysdeps/unix/sysv/linux/readonly-area.c
+++ b/sysdeps/unix/sysv/linux/readonly-area.c
@@ -55,7 +55,7 @@  __readonly_area (const char *ptr, size_t size)
 
   while (! __feof_unlocked (fp))
     {
-      if (_IO_getdelim (&line, &linelen, '\n', fp) <= 0)
+      if (__getdelim (&line, &linelen, '\n', fp) <= 0)
 	break;
 
       char *p;