public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] libio: Replace internal _IO_getdelim symbol with __getdelim
Date: Wed,  7 Jul 2021 16:36:06 +0000 (GMT)	[thread overview]
Message-ID: <20210707163606.39D41396982C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7fcdb532534e46f70624fd7e3681eb6831a69303

commit 7fcdb532534e46f70624fd7e3681eb6831a69303
Author: Florian Weimer <fweimer@redhat.com>
Date:   Wed Jul 7 18:33:52 2021 +0200

    libio: Replace internal _IO_getdelim symbol with __getdelim
    
    __getdelim is exported, _IO_getdelim is not.  Add a hidden prototype
    for __getdelim.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Diff:
---
 iconv/gconv_parseconfdir.h              | 2 +-
 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, 7 insertions(+), 8 deletions(-)

diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h
index 915b60845c..a4153e54c6 100644
--- a/iconv/gconv_parseconfdir.h
+++ b/iconv/gconv_parseconfdir.h
@@ -23,7 +23,7 @@
 
 #if IS_IN (libc)
 # include <libio/libioP.h>
-# define __getdelim(line, len, c, fp) _IO_getdelim (line, len, c, fp)
+# define __getdelim(line, len, c, fp) __getdelim (line, len, c, fp)
 
 # undef isspace
 # define isspace(__c) __isspace_l ((__c), _nl_C_locobj_ptr)
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;


                 reply	other threads:[~2021-07-07 16:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210707163606.39D41396982C@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).