From patchwork Thu Mar 17 19:30:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 52071 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 486B4384387A for ; Thu, 17 Mar 2022 19:37:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 486B4384387A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1647545834; bh=oxKr0pooHM6FFbw1kygoZJ3n/E4HRJrgU5kK8PYA6A4=; 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=haTnnSV/rvJu0CxWEXWhzg7liuIVv8UKWch8GESXfL71Oc3v+MI42pN85N7ZmCe0l OmBXv3zFeCI2yJ6L3Cdt+B0oqRTVDcmYzc8X0Q+ZXr++BWdyjYvhl7Bl14UI2ok4gS SruRWbdKTN/DoI2smXVjwn/fVeNlcYEKkSeHTyk8= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 71D763864C65 for ; Thu, 17 Mar 2022 19:30:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 71D763864C65 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-170-bo13tBW3OtmpFvem5eIDDw-1; Thu, 17 Mar 2022 15:30:04 -0400 X-MC-Unique: bo13tBW3OtmpFvem5eIDDw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B3722811E76 for ; Thu, 17 Mar 2022 19:30:03 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.88]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2577F2156A31 for ; Thu, 17 Mar 2022 19:30:02 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 10/26] stdio-common: Move union printf_arg int In-Reply-To: References: X-From-Line: 65221473c57c0d0def4d698b81e95f4492a832c1 Mon Sep 17 00:00:00 2001 Message-Id: <65221473c57c0d0def4d698b81e95f4492a832c1.1647544751.git.fweimer@redhat.com> Date: Thu, 17 Mar 2022 20:30:01 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.1 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_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 e1ac20807b..770c32d8f8 100644 --- a/include/printf.h +++ b/include/printf.h @@ -18,6 +18,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 de0f289c1f..d00c165131 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. */