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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id D897D3973008 for ; Tue, 29 Jun 2021 10:11:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D897D3973008 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-541-zH94bzo-NumFhXJeA_kZAw-1; Tue, 29 Jun 2021 06:11:23 -0400 X-MC-Unique: zH94bzo-NumFhXJeA_kZAw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5AEFB100C611 for ; Tue, 29 Jun 2021 10:11:22 +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 B32CC100164A for ; Tue, 29 Jun 2021 10:11:21 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 2/7] libio: Add hidden prototype for ungetc In-Reply-To: References: X-From-Line: 37770ae2fe48b56c9878e3dce96dd7a8d37b2360 Mon Sep 17 00:00:00 2001 Message-Id: <37770ae2fe48b56c9878e3dce96dd7a8d37b2360.1624961355.git.fweimer@redhat.com> Date: Tue, 29 Jun 2021 12:11:19 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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:26 -0000 And make ungetc the primary symbol, with _IO_ungetc as an alias. --- include/stdio.h | 1 + libio/ioungetc.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/stdio.h b/include/stdio.h index 2e0dc80c16..311adcf953 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -212,6 +212,7 @@ libc_hidden_ldbl_proto (dprintf) libc_hidden_ldbl_proto (fprintf) libc_hidden_ldbl_proto (vfprintf) libc_hidden_ldbl_proto (sprintf) +libc_hidden_proto (ungetc) libc_hidden_proto (fwrite) libc_hidden_proto (perror) libc_hidden_proto (remove) diff --git a/libio/ioungetc.c b/libio/ioungetc.c index dcf1c4ca9e..e68a4aaca8 100644 --- a/libio/ioungetc.c +++ b/libio/ioungetc.c @@ -27,7 +27,7 @@ #include "libioP.h" int -_IO_ungetc (int c, FILE *fp) +ungetc (int c, FILE *fp) { int result; CHECK_FILE (fp, EOF); @@ -40,5 +40,5 @@ _IO_ungetc (int c, FILE *fp) _IO_release_lock (fp); return result; } - -weak_alias (_IO_ungetc, ungetc) +libc_hidden_def (ungetc) +strong_alias (ungetc, _IO_ungetc) -- 2.31.1