Patch to enable -Werror [take 2]

Andreas Schwab schwab@suse.de
Mon Jan 20 10:22:00 GMT 2003


David Edelsohn <dje@watson.ibm.com> writes:

|> *** system.h	18 Jan 2003 22:32:06 -0000	1.136
|> --- system.h	20 Jan 2003 02:41:23 -0000
|> *************** extern PTR realloc PARAMS ((PTR, size_t)
|> *** 321,327 ****
|>   
|>   /* If the system doesn't provide strsignal, we get it defined in
|>      libiberty but no declaration is supplied.  */
|> ! #ifndef HAVE_STRSIGNAL
|>   # ifndef strsignal
|>   extern const char *strsignal PARAMS ((int));
|>   # endif
|> --- 321,327 ----
|>   
|>   /* If the system doesn't provide strsignal, we get it defined in
|>      libiberty but no declaration is supplied.  */
|> ! #if !defined (HAVE_STRSIGNAL) || !HAVE_DECL_STRSIGNAL
|>   # ifndef strsignal
|>   extern const char *strsignal PARAMS ((int));
|>   # endif
|> 

This is breaking configure on GNU/Linux.  Checking this in as obvious:

2003-01-20  Andreas Schwab  <schwab@suse.de>

	* system.h: Don't declare strsignal if the decl test hasn't been
	run yet.

--- gcc/system.h.~1.137.~	2003-01-20 10:21:57.000000000 +0100
+++ gcc/system.h	2003-01-20 11:18:11.000000000 +0100
@@ -1,6 +1,6 @@
 /* Get common system includes and various definitions and declarations based
    on autoconf macros.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -321,7 +321,8 @@ extern PTR realloc PARAMS ((PTR, size_t)
 
 /* If the system doesn't provide strsignal, we get it defined in
    libiberty but no declaration is supplied.  */
-#if !defined (HAVE_STRSIGNAL) || !HAVE_DECL_STRSIGNAL
+#if !defined (HAVE_STRSIGNAL) \
+    || (defined (HAVE_DECL_STRSIGNAL) && !HAVE_DECL_STRSIGNAL)
 # ifndef strsignal
 extern const char *strsignal PARAMS ((int));
 # endif

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Gcc-patches mailing list