This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Build fails
- From: DJ Delorie <dj at delorie dot com>
- To: macklobell at hotmail dot com
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 20 Feb 2002 18:15:48 -0500
- Subject: Re: Build fails
- References: <F259fQSgeR4UIS42NXH0000278f@hotmail.com>
2.11.2's libiberty/strerror.c looks like this:
#ifdef HAVE_SYS_ERRLIST
/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
might declare sys_errlist in a way that the compiler might consider
incompatible with our later declaration, perhaps by using const
attributes. So we hide the declaration in errno.h (if any) using a
macro. */
#define sys_errlist sys_errlist__
#endif
#include <stdio.h>
#include <errno.h>
#ifdef HAVE_SYS_ERRLIST
#undef sys_errlist
#endif
The current development version looks like this:
#ifdef HAVE_SYS_ERRLIST
/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
might declare sys_errlist in a way that the compiler might consider
incompatible with our later declaration, perhaps by using const
attributes. So we hide the declaration in errno.h (if any) using a
macro. */
#define sys_nerr sys_nerr__
#define sys_errlist sys_errlist__
#endif
#include <stdio.h>
#include <errno.h>
#ifdef HAVE_SYS_ERRLIST
#undef sys_nerr
#undef sys_errlist
#endif
See if that fixes it (it should).