Subject: Re: pkg/20978: mail/deliver is not compatible with recent NetBSD
To: Giles Lean <>
From: Ben Harris <>
List: current-users
Date: 04/08/2003 09:54:15
On Tue, 8 Apr 2003, Giles Lean wrote:

> Ben Harris wrote:
> > Has anyone come up with any rationale _for_ the change?  "It's permitted by
> > X/Open" is hardly much of a reason on its own.
> If basename() and dirname() stomp on their input then they can't be
> used to operate on constant strings.  The new implementation can.

It can, but no application should rely on this, in the same way that no
application should rely on their not returning pointers to static storage.

> You could argue that since basename() and dirname() both take 'char *'
> that passing them pointers to constant strings is an application bug
> ... borderline, IMHO.

Not even slightly borderline.  The specification says that they may modify
their input, so passing them a constant string is a bug.

Any new, portable application will have to work with both implementation,
so the important question is which one is better for old, broken

Ben Harris                                                   <>
Portmaster, NetBSD/acorn26           <URL:>