From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.217]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id e554325a for ; Fri, 6 Nov 2015 09:27:41 -0500 (EST) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQuEfXeSt/nWoxdY2dvuAIbsw5PvjGQjhXhvCrDPiskzmRybhFRLteEyh9fdYHA== X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (p20030057E21B0F04CCF856606B61B81E.dip0.t-ipconnect.de [IPv6:2003:57:e21b:f04:ccf8:5660:6b61:b81e]) by smtp.strato.de (RZmta 37.14 AUTH) with ESMTPSA id j00e60rA6ERdFIK (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Fri, 6 Nov 2015 15:27:39 +0100 (CET) Resent-From: Joerg Sonnenberger Resent-Date: Fri, 6 Nov 2015 15:27:38 +0100 Resent-Message-ID: <20151106142738.GE31084@britannica.bec.de> Resent-To: discuss@mdocml.bsd.lv Date: Fri, 6 Nov 2015 13:28:57 +0100 From: Joerg Sonnenberger To: discuss@mdocml.bsd.lv Subject: Re: mdocml: Finally use __progname, err(3) and warn(3). Message-ID: <20151106122857.GC27632@britannica.bec.de> Mail-Followup-To: source@mdocml.bsd.lv References: <8807850261702479663.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8807850261702479663.enqueue@fantadrom.bsd.lv> User-Agent: Mutt/1.5.24 (2015-08-30) On Sun, Oct 11, 2015 at 04:13:25PM -0500, schwarze@mdocml.bsd.lv wrote: > Finally use __progname, err(3) and warn(3). > That's more readable and less error-prone than fumbling around > with argv[0], fprintf(3), strerror(3), perror(3), and exit(3). > > It's a bad idea to boycott good interfaces merely because standards > committees ignore them. Instead, let's provide compatibility modules > for archaic systems (like commercial Solaris) that still don't have > them. The compat module has an UCB Copyright (c) 1993... No, the reason to avoid it is because __progname is in the implementation namespace and should be avoided as such. That's why in NetBSD we introduced setprogname() and getprogname(). On systems without __progname, they provided a clean abstraction without messing with the implementation namespace. On platforms with __progname, but without getprogname, the latter is trivially implemented as returning __progname and setprogname is a nop. Joerg -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv