stdio.h and sys_errlist on i386-gnu
Roland McGrath
roland@frob.com
Tue Apr 2 13:55:00 GMT 2002
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.
More information about the Libc-alpha
mailing list