From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22065 invoked by alias); 26 Mar 2018 15:40:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 22055 invoked by uid 89); 26 Mar 2018 15:40:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=complications, Gabriel, gabriel, exclusively X-HELO: mailbackend.panix.com X-Gm-Message-State: AElRT7HsufX2s4eGuVBdgqgGIPB6Kj2UOy2jwdaAi7vIPswFCa4mRW+U 1mbm7OvQwzcV7yjHKRW4EsSA2hXxQ+i8+TZQYvU= X-Google-Smtp-Source: AG47ELsLWCuMoM51b1cdX3MKuXhDinFLsppnpwhtmb1YSBySPwiI+i3Odej/TemHDZUpG9+erf79qvLF1blGFfkNCqE= X-Received: by 10.202.191.87 with SMTP id p84mr14766297oif.64.1522078846936; Mon, 26 Mar 2018 08:40:46 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180326121719.7e786945@tereshkova> References: <20180307193205.4751-1-zackw@panix.com> <20180307193205.4751-2-zackw@panix.com> <20180326121719.7e786945@tereshkova> From: Zack Weinberg Date: Mon, 26 Mar 2018 15:40:00 -0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/9] Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl. To: "Gabriel F. T. Gomes" Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-03/txt/msg00552.txt.bz2 On Mon, Mar 26, 2018 at 11:17 AM, Gabriel F. T. Gomes wrote: > On Wed, 07 Mar 2018, Zack Weinberg wrote: > >> * include/monetary.h (STRFMON_LDBL_IS_DBL): New constant. >> (__vstrfmon_l): Rename to __vstrfmon_l_internal and add flags >> argument. > > Maybe mention that attribute_hidden was not required, thus removed? > > Is this another instance of the 'only needed when called both from inside > and outside of glibc' argument (as pointed out in a previous message [1])? > > [1] https://sourceware.org/ml/libc-alpha/2018-03/msg00311.html I was partially wrong about that, see the subsequent discussion between me and Florian. I'm in the process of revising this patchset to get the hidden annotations 100% correct, and that's sent me down two levels of rabbit hole... The rules as I currently understand them are: - A function that is _only_ called from inside the DSO that defines it should have its prototype declaration marked attribute_hidden; the *_hidden_def and *_hidden_proto macros should not be used. - A function that is called from both inside and outside the DSO that defines it needs two or possibly three names, depending on a bunch of additional factors; the *_hidden_def and *_hidden_proto macros are for this case. - A function that is _only_ called from _outside_ the DSO that defines it should not use either attribute_hidden or *_hidden_{def,proto}. There are additional complications having to do with static linkage, whether the function is part of the API exposed to applications, whether it was specified in C89, and whether we're trying to write internal code using this function to look like normal (application) code. It's a big mess, frankly. >>+extern ssize_t __vstrfmon_l_internal (char *s, size_t maxsize, locale_t loc, >>+ const char *format, va_list ap, >>+ unsigned int flags); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Spaces that could be converted to tabs. Ugh. I will have to go through the entire patchset and check for these. (My editor is set to indent exclusively with spaces, because several other projects I contribute or have contributed to require that; glibc is the exception.) zw