This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: for Re: New GCC 3.0 build failure on FreeBSD 4.3
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: for Re: New GCC 3.0 build failure on FreeBSD 4.3
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Mon, 11 Jun 2001 17:59:21 -0500 (CDT)
- CC: geoffk at geoffk dot org, mark at codesourcery dot com, pfeifer at dbai dot tuwien dot ac dot at
- References: <200106112232.f5BMWUg41879@latour.rsch.comm.mot.com>
- Reply-to: rittle at labs dot mot dot com
Using the same technique already present to hide declarations normally
obtained from OS header files (i.e. low-risk), this patch hides
additional declarations.
These files now build with -Werror (they reported CV qualification
mismatches before). Full 3.0 bootstrap commencing.
2001-06-11 Loren J. Rittle <ljrittle@acm.org>
* strerror.c (sys_nerr): Hide the OS header version.
* strsignal.c (sys_nsig): Likewise.
Index: strerror.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/strerror.c,v
retrieving revision 1.4
diff -c -r1.4 strerror.c
*** strerror.c 2000/05/29 19:33:52 1.4
--- strerror.c 2001/06/11 22:48:23
***************
*** 13,18 ****
--- 13,19 ----
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
***************
*** 20,25 ****
--- 21,27 ----
#include <errno.h>
#ifdef HAVE_SYS_ERRLIST
+ #undef sys_nerr
#undef sys_errlist
#endif
Index: strsignal.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/strsignal.c,v
retrieving revision 1.6
diff -c -r1.6 strsignal.c
*** strsignal.c 2000/05/29 19:33:52 1.6
--- strsignal.c 2001/06/11 22:48:23
***************
*** 17,22 ****
--- 17,23 ----
ignore any declaration in the system header files, and always
declare it ourselves. With luck, this will always work. */
#define sys_siglist no_such_symbol
+ #define sys_nsig sys_nsig__no_such_symbol
#include <stdio.h>
#include <signal.h>
***************
*** 38,43 ****
--- 39,45 ----
/* Undefine the macro we used to hide the definition of sys_siglist
found in the system header files. */
#undef sys_siglist
+ #undef sys_nsig
#ifndef NULL
# ifdef __STDC__