public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] libio: Use __libc_getdelim instead of __getdelim Date: Mon, 4 Apr 2022 12:54:18 +0000 (GMT) [thread overview] Message-ID: <20220404125418.4A0123857C71@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=49dacd8a961a010b6dc80117a1b90f92cd3630da commit 49dacd8a961a010b6dc80117a1b90f92cd3630da Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Mon Mar 14 14:28:57 2022 -0300 libio: Use __libc_getdelim instead of __getdelim Diff: --- iconv/gconv_parseconfdir.h | 2 +- include/stdio.h | 3 ++- libio/iogetdelim.c | 5 +++-- stdio-common/getline.c | 2 +- sysdeps/unix/sysv/linux/readonly-area.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h index c0de548833..b8e174ed6f 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) __getdelim (line, len, c, fp) +# define __getdelim(line, len, c, fp) __libc_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 a645a1bf99..9c7d83b733 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -211,7 +211,8 @@ stdio_hidden_ldbl_proto (fprintf); stdio_hidden_ldbl_proto (vfprintf); stdio_hidden_ldbl_proto (sprintf); libc_hidden_proto (ungetc) -libc_hidden_proto (__getdelim) +__typeof (getdelim) __libc_getdelim; +hidden_proto2 (getdelim, __libc_getdelim); libc_hidden_proto (fwrite) libc_hidden_proto (perror) libc_hidden_proto (remove) diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c index b6c4c07b45..d24cb07e50 100644 --- a/libio/iogetdelim.c +++ b/libio/iogetdelim.c @@ -37,7 +37,7 @@ null terminator), or -1 on error or EOF. */ ssize_t -__getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) +__libc_getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) { ssize_t result; ssize_t cur_len = 0; @@ -122,5 +122,6 @@ unlock_return: _IO_release_lock (fp); return result; } -libc_hidden_def (__getdelim) +libc_hidden_def (__libc_getdelim) +strong_alias (__libc_getdelim, __getdelim) weak_alias (__getdelim, getdelim) diff --git a/stdio-common/getline.c b/stdio-common/getline.c index 18a489ca0b..329b1c7d4b 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 __getdelim (lineptr, n, '\n', stream); + return __libc_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 3a94d7c52f..b3f7a2fe75 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 (__getdelim (&line, &linelen, '\n', fp) <= 0) + if (__libc_getdelim (&line, &linelen, '\n', fp) <= 0) break; char *p;
next reply other threads:[~2022-04-04 12:54 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-04 12:54 Adhemerval Zanella [this message] -- strict thread matches above, loose matches on Subject: below -- 2022-06-09 21:20 Adhemerval Zanella 2022-06-09 13:16 Adhemerval Zanella 2022-06-03 14:06 Adhemerval Zanella 2022-05-13 14:19 Adhemerval Zanella 2022-05-12 19:33 Adhemerval Zanella 2022-05-10 18:24 Adhemerval Zanella 2022-04-29 14:04 Adhemerval Zanella 2022-03-31 19:06 Adhemerval Zanella 2022-03-29 20:29 Adhemerval Zanella 2022-03-16 18:03 Adhemerval Zanella 2022-03-15 18:41 Adhemerval Zanella
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=20220404125418.4A0123857C71@sourceware.org \ --to=azanella@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: linkBe 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).