From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 296A63973075 for ; Tue, 29 Jun 2021 10:11:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 296A63973075 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-BST6g5ZRNcmFLtDvpLowqw-1; Tue, 29 Jun 2021 06:11:33 -0400 X-MC-Unique: BST6g5ZRNcmFLtDvpLowqw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B0B32A40C7 for ; Tue, 29 Jun 2021 10:11:32 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-228.ams2.redhat.com [10.36.112.228]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2D535D6AD for ; Tue, 29 Jun 2021 10:11:31 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH v2 3/7] libio: Replace internal _IO_getdelim symbol with __getdelim In-Reply-To: References: X-From-Line: ebeb72dff7abac6ff24a035b162665c6fb67f57b Mon Sep 17 00:00:00 2001 Message-Id: Date: Tue, 29 Jun 2021 12:11:29 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 10:11:36 -0000 __getdelim is exported, _IO_getdelim is not. Add a hidden prototype for __getdelim. --- 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 e73ea0ff5c..505e8b1458 100644 --- a/iconv/gconv_parseconfdir.h +++ b/iconv/gconv_parseconfdir.h @@ -23,7 +23,7 @@ #if IS_IN (libc) # include -# 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; -- 2.31.1