tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: printf and -m



On Fri, 21 Aug 2015 12:43:10 -0400
christos%zoulas.com@localhost (Christos Zoulas) wrote:

> We should decide what we want to do:
> 
> - Make %m work in printf() like linux does.
> - [treat %m as an error]

Christos has posed a philosophical policy question in the guise of a
technical one.  Writ large: should NetBSD generally follow Linux or
Posix?  Or neither?  

I suppose the majority opinion here is to implement Posix unless there's
a good reason not to.  By those lights the answer has to be: cede no
ground to GNU's choice, and treat their unsanctioned extension as
error.  

Unfortunately, those lights no longer mark the high road.  Posix is
increasingly moribund. Linux and GNU dominate the landscape and
increasingly disregard Posix.  In short, there is no cross-OS standards
process anymore.  Whatever Linux and GNU do is the de facto standard.
For practical purposes, whatever NetBSD does differently is
nonstandard.  

That's not to say NetBSD should do whatever GNU decides.  After all,
the world already has many implementations that conform the GNU+Linux
standard.  It is to say that the argument, "not posix ergo not standard"
no longer holds water.  Whatever basis there is for turning down a
suggestion, Posix can't be it.  Posix is just a hair shirt.  

In the instant case, by ignoring Posix we can consider the thing
itself. Does the patch represent an improvement?  ISTM the answer is
Yes, because it makes other software easier to port to NetBSD.  As a
greenfield suggestion I would reject it because in the presence
of strerror it's overspecialized.  As an accomodation to glibc I would
accept it for reasons of convenience.  

To me, the best reason for NetBSD to exist is as an exemplar of good
choices, regardless of what Linux does and regardless of what Ye Olde
Unix did.  For that to happen, we need to cultivate an environment that
encourages well considered innovation, even if radically different.
We're not there, and getting there won't be easy even if there were
agreement that that's a desirable goal.  But one thing's for sure: it
will never happen while we're trying to hold the ground under the Posix
standard.  

--jkl


Home | Main Index | Thread Index | Old Index