tech-userlevel archive

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

Re: constify dirname/basename [was: CVS commit: src]



der Mouse 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 redclaring 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.

Neil.


Home | Main Index | Thread Index | Old Index