This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: for Re: New GCC 3.0 build failure on FreeBSD 4.3


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__


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]