This is the mail archive of the
mailing list for the GDB project.
Re: MinGW compilation warnings in libiberty's xstrndup.c
- From: Pedro Alves <palves at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: eliz at gnu dot org, gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org
- Date: Fri, 19 May 2017 23:56:04 +0100
- Subject: Re: MinGW compilation warnings in libiberty's xstrndup.c
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
On 05/19/2017 11:31 PM, DJ Delorie wrote:
> Right, I meant, libiberty's configure, gcc's configure, binutils'
> configure, and gdb's configure, all need to agree on whether strnlen is
> a HAVE or a HAVE_DECL type symbol. If they don't, the header can't
> provide "one" working solution.
Ah, yeah. AFAICS, all the declaration checks in libiberty.h are
HAVE_DECL checks. This suggests to me that this declaration guard
should be HAVE_DECL too .
BTW, I once proposed a new libiberty.m4 file that all libiberty
clients would source so that these checks are all centralized.
And follow up here:
Leading to (as, gold, ld, gdb and libiberty/ itself converted):
I never tried adjusting gcc, but even if it wouldn't
work there, it'd still be a net win.
Wonder what others think of that approach.