diff options
author | Bruce Evans <bde@FreeBSD.org> | 1996-04-19 14:02:03 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1996-04-19 14:02:03 +0000 |
commit | 6a59f3db1a58ae83341d2fcb1d16dd216cf29f83 (patch) | |
tree | b92f29dc15f71cd76556b764db1f1babe507d479 /lib/libc/string/strerror.3 | |
parent | d83f3d7544319f3c44d6771fda0af8614be924ac (diff) |
Added `const' to types of sys_errlist and sys_nerr.
Use .Va instead of .Fa to describe these variables.
Say a little about inconsistent declarations of sys_errlist in the BUGS
section.
Notes
Notes:
svn path=/head/; revision=15307
Diffstat (limited to 'lib/libc/string/strerror.3')
-rw-r--r-- | lib/libc/string/strerror.3 | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3 index 784c06168ada..ebf18fda1792 100644 --- a/lib/libc/string/strerror.3 +++ b/lib/libc/string/strerror.3 @@ -48,8 +48,8 @@ .Fd #include <stdio.h> .Ft void .Fn perror "const char *string" -.Vt extern char *sys_errlist[]; -.Vt extern int sys_nerr; +.Vt extern const char * const sys_errlist[]; +.Vt extern const int sys_nerr; .Fd #include <string.h> .Ft char * .Fn strerror "int errnum" @@ -100,11 +100,11 @@ followed by the error number in decimal. .Pp The message strings can be accessed directly using the external array -.Fa sys_errlist . +.Va sys_errlist . The external value -.Fa sys_nerr +.Va sys_nerr contains a count of the messages in -.Fa sys_errlist . +.Va sys_errlist . The use of these variables is deprecated; .Fn strerror should be used instead. @@ -122,3 +122,8 @@ For unknown error numbers, the .Fn strerror function will return its result in a static buffer which may be overwritten by subsequent calls. +.Pp +Programs that use the deprecated +.Va sys_errlist +variable often fail to compile because they declare it +inconsistently. |