Subject: Re: `sys_errlist' in `stdio.h'
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 01/11/1996 09:51:53
> I would like to query the wisdom of having the declaration
> #if !defined(_POSIX_SOURCE) && !defined(_ANSI_SOURCE)
> extern const char *const sys_errlist[];
> #endif
> in [stdio.h]. It seems to me that this [...poses] a gratuitous
> problem for ``old'' code which won't know about `const' and will thus
> get a compilation error when it declares `sys_errlist' for itself.
Yes.
> This argument suggests that the `const' keywords should be dropped
> from this declaration.
Personally, I like it the way it is. The compilation "error" is really
only a warning, and it is a good way to find old code that uses
sys_errlist[]. You can always ignore the warning if you don't want to
fix the code, after all.
der Mouse
mouse@collatz.mcrcim.mcgill.edu