From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id DB4082467A for ; Mon, 11 Mar 2024 00:44:05 +0100 (CET) Received: (qmail 20276 invoked by uid 550); 10 Mar 2024 23:39:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 20256 invoked from network); 10 Mar 2024 23:39:57 -0000 Date: Sun, 10 Mar 2024 19:44:10 -0400 From: Rich Felker To: Thorsten Glaser Cc: musl@lists.openwall.com, NRK , Alejandro Colomar , Guillem Jover , libc-alpha@sourceware.org, libbsd@lists.freedesktop.org, "Serge E. Hallyn" , "Skyler Ferrante (RIT Student)" , Iker Pedrosa , Christian Brauner Message-ID: <20240310234410.GW4163@brightrain.aerifal.cx> References: <20240309150258.GS4163@brightrain.aerifal.cx> <20240310193956.GU4163@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Re: Tweaking the program name for functions On Sun, Mar 10, 2024 at 11:22:51PM +0000, Thorsten Glaser wrote: > Rich Felker dixit: > > >possibly newline suffix, if you want that). They could have been > >designed to be one-line macros, ala... > > Nope. > > No __VA_ARGS__ and especially no ##__VA_ARGS__ in C89, back then. Well yeah, "could have been" was poor wording by me. At the time, the options didn't exist. But someone doing that kind of interface now can use these tools, or just design the interface differently. With that said, while I'll grant that there are exceptions, it's generally my impression that if you're pasting in the name of the program from argv[0] programmatically because it can't just be part of the string literal, because the string literal appears in modular library code that gets called from multiple utilities, then printing an error message (and even worse, exiting, if you do that too), rather than returning meaningful error information up to the caller for it to handle/display, is just really sloppy, low-quality programming. Rich