From patchwork Mon Jun 7 17:38:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 43745 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A23C03893677 for ; Mon, 7 Jun 2021 17:41:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A23C03893677 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623087672; bh=lqO1dfdgReY+8axtUF8GAlZ4Co6pAfjqSK74HX8XD8U=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vK0gHOLdc31RQ9RdtBMHaXEiAi6G+Qq1McSlLeYu5ri3edSDqCHQmYn8B1etE5bT/ SVOaFVuf0nLGfSpgw0tJjix/58F3lcRrXO4OQtqeYkdSxe19u7rNDqkD++lGhuwIzy Yp4BP0hkEXDlBt1nAeIQ0T+JwlCeXt00AueT3cic= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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 59373393C84C for ; Mon, 7 Jun 2021 17:38:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 59373393C84C 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-533-5Dgp6uWuPwOFPCtz2LUf_w-1; Mon, 07 Jun 2021 13:38:14 -0400 X-MC-Unique: 5Dgp6uWuPwOFPCtz2LUf_w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE29A501EE for ; Mon, 7 Jun 2021 17:38:13 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-60.ams2.redhat.com [10.36.115.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 111A819714 for ; Mon, 7 Jun 2021 17:38:12 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 3/8] libio: Add hidden prototype for ungetc In-Reply-To: References: X-From-Line: aa8b88a4167fe0685140a487b9723a875f4f0a9c Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 07 Jun 2021 19:38:10 +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.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.6 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-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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)