This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch] Fix build warnings for GAS on mips-linux-gnu
- From: Alan Modra <amodra at gmail dot com>
- To: Iain Sandoe <iain at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 18 Jun 2012 13:52:19 +0930
- Subject: Re: [Patch] Fix build warnings for GAS on mips-linux-gnu
- References: <6C17D860-E7DE-4E59-A4A9-E0F84CE39D0E@codesourcery.com>
On Tue, Jun 12, 2012 at 07:39:58PM +0100, Iain Sandoe wrote:
> P.S. As an aside, is it intentional that the fall-back specifications are not proper prototypes?
Yes. It saves trouble with "const char *" vs. "char *", "unsigned
long" vs. "unsigned int" and the like differences when we provide a
declaration that doesn't match some system header declaration.
> * configure.in: Check DECLS for free, getenv, malloc, realloc,
> stpcpy and strstr.
> * configure: Regenerate.
> * config.in: Likewise.
I'm applying this one instead as it saves a few lines in the generated
configure.
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.230
diff -u -p -r1.230 configure.in
--- gas/configure.in 17 May 2012 15:13:16 -0000 1.230
+++ gas/configure.in 18 Jun 2012 03:27:08 -0000
@@ -663,11 +663,8 @@ AC_C_INLINE
# VMS doesn't have unlink.
AC_CHECK_FUNCS(unlink remove, break)
+AC_CHECK_FUNCS(free getenv malloc realloc sbrk setlocale stpcpy strstr)
-# Some systems don't have sbrk().
-AC_CHECK_FUNCS(sbrk)
-
-AC_CHECK_FUNCS(setlocale)
AM_LC_MESSAGES
# do we need the math library?
--
Alan Modra
Australia Development Lab, IBM