tech-userlevel archive

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

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



Iain Hibbert wrote:

> Module Name:  src
> Committed By: plunky
> Date:         Wed Apr 23 07:53:26 UTC 2008
> 
> Modified Files:
> 
>       src/include: libgen.h
>       src/lib/libc/gen: basename.3 basename.c dirname.3 dirname.c
> 
> Log Message:
> 
> constify dirname(3) and basename(3)

Does this change have an SUSv3/Posix issues?  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?

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index