Source-Changes-D archive

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

Re: CVS commit: src/lib/libc/string



On Wed, Mar 25, 2020 at 06:50:47PM +0000, Robert Elz wrote:
 > Modified Files:
 > 	src/lib/libc/string: strerror.3
 > 
 > Log Message:
 > Delete the BUGS paragraph about the "missing" const qualifier for the
 > result type of strerror() (and strerror_l()).   While that once should
 > really have been present, when strerror() was invented, there was no
 > "const" qualifier in C to apply, and now the way the code is writtem
 > (really needs to be because of NLS support) the const is no longer
 > really appropriate.
 > 
 > Applications still shouldn't attempt to modify the result however.

I don't agree -- because applications shouldn't attempt to modify the
result, it should be const.

What it points to internally doesn't matter...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index