[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: constify dirname/basename [was: CVS commit: src]
On Thu, Apr 24, 2008 at 08:03:30AM +0900, Neil Booth wrote:
> > > SUSv3 says that both functions "may modify the string pointed to by
> > > path" (the argument to those functions). While our implementations
> > > don't do that, are we OK by the standards to now declare those
> > > functions as having a const argument?
> > I can't see why not.
> It means user-space code redeclaring the function will now get
> an incompatible redclaration error.
> From my understanding we cannot do this whilst retaining conformance
> to a spec; the prototype has to be compatible.
Whether or not standards technically allow it, user code should never
David A. Holland
Main Index |
Thread Index |