From patchwork Mon May 23 14:07:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 54288 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 6929D386EC04 for ; Mon, 23 May 2022 14:08:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6929D386EC04 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653314915; bh=q6rsbfb2sSHpjihk8p6f6AiHYDtU8WN7Oi1xsT+tvXw=; 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=WIH/G5W/dAXyPhSdhhDowho5FqbVOy/hbgIUiGM+pBaUmOjnxUtnSvKPZfhcwa2P6 VEkESPwzcfwYFKmIUNTv1VVdWDejIBZoBP6zAcVYwQbSLbkcvXUL2rLyQYH+JL41kV Dr2HjR79e67zXdA2CqrMDbtuH/iXnzsJuCyt7ZT0= 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 [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id B0112385380D for ; Mon, 23 May 2022 14:07:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0112385380D Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-63-3hF2jm_mPb-PeRY_XJ7htA-1; Mon, 23 May 2022 10:07:13 -0400 X-MC-Unique: 3hF2jm_mPb-PeRY_XJ7htA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F1E81C08966 for ; Mon, 23 May 2022 14:07:13 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 68B791410DD5 for ; Mon, 23 May 2022 14:07:12 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v2 02/14] stdio-common: Move union printf_arg int In-Reply-To: References: X-From-Line: bbc5adea1ce9b99f656cf3c210bc6beadfda08cb Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 23 May 2022 16:07:10 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.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, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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" The type does not depend on wide vs narrow preprocessor macros, so it does not need to be customized in stdio-common/printf-parse.h. Reviewed-by: Adhemerval Zanella --- include/printf.h | 21 +++++++++++++++++++++ stdio-common/printf-parse.h | 23 ----------------------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/include/printf.h b/include/printf.h index fb0b71fa4c..78accaab6d 100644 --- a/include/printf.h +++ b/include/printf.h @@ -20,6 +20,27 @@ int __register_printf_specifier (int, printf_function, printf_arginfo_size_function); libc_hidden_proto (__register_printf_specifier) +/* The various kinds of arguments that can be passed to printf. */ +union printf_arg + { + wchar_t pa_wchar; + int pa_int; + long int pa_long_int; + long long int pa_long_long_int; + unsigned int pa_u_int; + unsigned long int pa_u_long_int; + unsigned long long int pa_u_long_long_int; + double pa_double; + long double pa_long_double; +#if __HAVE_FLOAT128_UNLIKE_LDBL + _Float128 pa_float128; +#endif + const char *pa_string; + const wchar_t *pa_wstring; + void *pa_pointer; + void *pa_user; +}; + #include /* Now define the internal interfaces. */ diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h index 362cce1ead..249f789526 100644 --- a/stdio-common/printf-parse.h +++ b/stdio-common/printf-parse.h @@ -44,29 +44,6 @@ struct printf_spec int size; }; - -/* The various kinds off arguments that can be passed to printf. */ -union printf_arg - { - wchar_t pa_wchar; - int pa_int; - long int pa_long_int; - long long int pa_long_long_int; - unsigned int pa_u_int; - unsigned long int pa_u_long_int; - unsigned long long int pa_u_long_long_int; - double pa_double; - long double pa_long_double; -#if __HAVE_FLOAT128_UNLIKE_LDBL - _Float128 pa_float128; -#endif - const char *pa_string; - const wchar_t *pa_wstring; - void *pa_pointer; - void *pa_user; - }; - - #ifndef DONT_NEED_READ_INT /* Read a simple integer from a string and update the string pointer. It is assumed that the first character is a digit. */