Module Name: src Committed By: kre Date: Wed Mar 25 18:50:47 UTC 2020
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. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libc/string/strerror.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/string/strerror.3 diff -u src/lib/libc/string/strerror.3:1.20 src/lib/libc/string/strerror.3:1.21 --- src/lib/libc/string/strerror.3:1.20 Wed Mar 25 18:45:42 2020 +++ src/lib/libc/string/strerror.3 Wed Mar 25 18:50:47 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: strerror.3,v 1.20 2020/03/25 18:45:42 kre Exp $ +.\" $NetBSD: strerror.3,v 1.21 2020/03/25 18:50:47 kre Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -271,22 +271,6 @@ and .Fn strerror_l use the same thread local storage, a call to either will destroy the result from an earlier call by the same thread of either of them. -.\" -.\" Is this following para really true any more? All the strerror() -.\" family of functions return the result in a malloc'd array (or if -.\" ! _REENTRANT a static buffer in the function) or in a buffer -.\" provided by the caller - nothing actually returns a pointer into -.\" sys_errlist[] any more (strerror_ss() excepted, but we ignore that). -.\" The POSIX (and historic) functions had no "const" qualifier. -.\" POSIX does say that callers must not (attempt to) modify the result, -.\" but for our implementation I see no defect that can cause. -.Pp -The return types for -.Fn strerror -and -.Fn strerror_l -are both missing a type-qualifier; it should actually be -.Vt const char * . .Pp Programs that use the deprecated .Va sys_errlist