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.
>
> User code that redeclares the function will get an even more mysterious
> error if it happens to be `defined' as a macro instead (well, for most
> macros). Isn't the implementation permitted to define most functions
> as macros instead (with real functions available, of course)?
Presumably such user-space code would do it properly with parentheses.
Neil.
Home |
Main Index |
Thread Index |
Old Index