This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: stdio.h and sys_errlist on i386-gnu
- From: Roland McGrath <roland at frob dot com>
- To: Marcus Brinkmann <Marcus dot Brinkmann at ruhr-uni-bochum dot de>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 2 Apr 2002 16:55:36 -0500 (EST)
- Subject: Re: stdio.h and sys_errlist on i386-gnu
I agree that declaring sys_errlist when we're not defining it is not good.
Unfortunately, the only reasonable solution I can see off hand is making a
new sysdeps header file just for this declaration (or I suppose we could
add it to bits/stdio_lim.h). i.e., either move the declaration to the new
file (bits/errlist.h or something) or have the new file #define a macro
like _HAVE_SYS_ERRLIST that libio/stdio.h tests.
However, it also seems to me that libiberty is ill-advised to use the name
sys_errlist for its own static variable. It could do:
#undef sys_errlist
#under sys_nerr
#define sys_errlist our_errlist
#define sys_nerr our_nerr
before its definitions just to be safe. But with the compilation problem
fixed I think you will find other problems with libiberty/strerror.c,
because it tries to create a table indexed by errno value and as large as
the largest errno value, which is pretty large on the Hurd since it's a
sparse number space.