From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id 7BFB13830081 for ; Fri, 20 May 2022 17:49:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7BFB13830081 Received: by mail-oi1-x234.google.com with SMTP id e189so10769983oia.8 for ; Fri, 20 May 2022 10:49:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=ksRMkgRekPiLFkLIkquWr1w4ikR8t75Np0YbPL/PFpw=; b=4+AZmTWr/k/PNGwOtvevrNTjfeQ2u6ixaOtUBLTk4V/CkS/Q2QzJVI9guTvOIHKKBi 68MgUlDXFJvvftUh/3KfD2LKT9e12NXxjfzgBCZDGv20EdRPGe5tyzh/gg562GKvPcjR BOiUrstGwub9nLgg3k1Lpaxad2KRD2fdre2Yo7HWYH0JxhsXfzZgdvYMAdi7O08HSlIn g3n0zsZXvuMvOlUMxPwW22PJhGOhzzWHTBVmWIPayhEbLoQpCpjxo0SKPCrZdTgN72Kt HW8aRHn3uVbvbeBZyk8W3Br0wzzIoKSjbkz5whGvb2OUj3e+PQHChUb/9yTjcBLif7pK Ltuw== X-Gm-Message-State: AOAM53146BYZE/ejSjmyXa0S6zZNC6oFmbBfpB955ZIpWtKkvORgKs7S 5qomfM/at/doJ+QFyCLbgK6zW7cWlZSruQ== X-Google-Smtp-Source: ABdhPJxMkGCsFwt1SXzAel8dplHwdhnYxgkJS2kU4UcDj61AviZ2q6FoVnMnxCfUxPXtmgeTXzljLw== X-Received: by 2002:a05:6808:2395:b0:326:a02e:2c3a with SMTP id bp21-20020a056808239500b00326a02e2c3amr5942456oib.169.1653068979803; Fri, 20 May 2022 10:49:39 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:cdd6:2f68:19ef:b907:1f26? ([2804:431:c7cb:cdd6:2f68:19ef:b907:1f26]) by smtp.gmail.com with ESMTPSA id k23-20020a544717000000b00325cda1ff87sm1302304oik.6.2022.05.20.10.49.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 10:49:39 -0700 (PDT) Message-ID: <77532ed8-0149-f751-1acb-67f2482d6b59@linaro.org> Date: Fri, 20 May 2022 14:49:37 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 09/26] stdio-common: Add printf specifier registry to Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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-List-Received-Date: Fri, 20 May 2022 17:49:42 -0000 On 17/03/2022 16:29, Florian Weimer via Libc-alpha wrote: > Add __printf_function_table, __register_printf_specifier to > include/printf.h, where they belong. > --- > include/printf.h | 6 ++++++ > stdio-common/reg-printf.c | 7 ------- > stdio-common/vfprintf-internal.c | 1 - > 3 files changed, 6 insertions(+), 8 deletions(-) > > diff --git a/include/printf.h b/include/printf.h > index 0ed6e87387..e1ac20807b 100644 > --- a/include/printf.h > +++ b/include/printf.h > @@ -12,6 +12,12 @@ > > # ifndef _ISOMAC > > +/* Internal interfaces for registered specifiers. */ > +extern printf_function **__printf_function_table attribute_hidden; > +int __register_printf_specifier (int, printf_function, > + printf_arginfo_size_function); > +libc_hidden_proto (__register_printf_specifier) > + > #include > > /* Now define the internal interfaces. */ The __printf_function_table prototype is still present at stdio-common/printf-parse.h. Maybe either move __printf_arginfo_table and __printf_va_arg_table, or remove __printf_function_table from printf.h. > diff --git a/stdio-common/reg-printf.c b/stdio-common/reg-printf.c > index 400b99d2f6..5f4c6a24c2 100644 > --- a/stdio-common/reg-printf.c > +++ b/stdio-common/reg-printf.c > @@ -30,13 +30,6 @@ printf_function **__printf_function_table attribute_hidden; > > __libc_lock_define_initialized (static, lock) > > -int __register_printf_specifier (int, printf_function, > - printf_arginfo_size_function); > -libc_hidden_proto (__register_printf_specifier) > -int __register_printf_function (int, printf_function, > - printf_arginfo_function); > - > - > /* Register FUNC to be called to format SPEC specifiers. */ > int > __register_printf_specifier (int spec, printf_function converter, Ok. > diff --git a/stdio-common/vfprintf-internal.c b/stdio-common/vfprintf-internal.c > index 1986c4bdb5..f8aa2fdafb 100644 > --- a/stdio-common/vfprintf-internal.c > +++ b/stdio-common/vfprintf-internal.c > @@ -1379,7 +1379,6 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format, > /* Process format specifiers. */ > while (1) > { > - extern printf_function **__printf_function_table; > int function_done; > > if (spec <= UCHAR_MAX Ok.