Subject: Re: `sys_errlist' in `stdio.h'
To: None <current-users@NetBSD.ORG>
From: Brad Salai <bsalai@servtech.com>
List: current-users
Date: 01/11/1996 17:04:10
>> 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.
>
Actually, for me, the way it is, generates fatal errors that require
commenting out the offending declaration in the source, not just a warning.
I am among the great unwashed, at least as far as programming is concerned,
but would appreciate a solution that didn't require this kind of tinkering
to get things to build.

Brad

Stephen B. "Brad" Salai                       bsalai@cyber1.servtech.com
Cumpston & Shaw                               Office (716) 325-5553
Two State Street                              Fax    (716) 262-3906

Rochester, NY 14614                           Home   (716) 377-4624