discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: discuss@mdocml.bsd.lv
Subject: Re: mdocml: Finally use __progname, err(3) and warn(3).
Date: Fri, 6 Nov 2015 13:28:57 +0100	[thread overview]
Message-ID: <20151106122857.GC27632@britannica.bec.de> (raw)
In-Reply-To: <8807850261702479663.enqueue@fantadrom.bsd.lv>

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

       reply	other threads:[~2015-11-06 14:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8807850261702479663.enqueue@fantadrom.bsd.lv>
2015-11-06 12:28 ` Joerg Sonnenberger [this message]
2015-11-06 16:43   ` Ingo Schwarze
2015-11-06 16:47     ` Joerg Sonnenberger
2015-11-06 17:52       ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151106122857.GC27632@britannica.bec.de \
    --to=joerg@britannica.bec.de \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).