Subject: sys_errlist in
To: None <current-users@NetBSD.ORG>
From: None <email@example.com>
Date: 09/25/1997 03:43:20
This may be an issue that people have talked about a lot before,
but I don't recall exactly what was said; I know something about it
has been mentioned before. I am not exactly current (1.1B), but from
a quick inspection it doesn't look much different in -current..?
This is what I have in <errno.h>/<sys/errno.h>:
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
extern int sys_nerr;
extern const char *const sys_errlist;
The most -current I have available adds a check for XPG3, but is
otherwise the same. My problem is that I am compiling some rather
crufty K&R code---thus am using cc -traditional. "const" is not
legal K&R C, so the compilation aborts on this declaration. This
has been solved in FreeBSD by replacing the const's with __const's
where __const is #defined as const if __STDC__ or cplusplus.
Is there something simple I can do to fix this? Is it a bug?
Is it silly for me to expect that K&R code will compile even if
it #includes <errno.h>?
P.S. Please cc: me since I don't subscribe to current-users.