From: Junio C Hamano Date: Fri, 07 Dec 2007 07:26:02 GMT Subject: Re: [PATCH/RFC (take 3)] autoconf: Add test for OLD_ICONV (squelching compiler warning) Message-ID: <7v7ijr7yph.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1196990840-1168-1-git-send-email-jnareb@gmail.com> Jakub Narebski writes: > On Fri, 7 Dec 2007, Blake Ramsdell wrote: >> On Dec 6, 2007 4:41 PM, Blake Ramsdell wrote: >>> On Dec 6, 2007 4:30 PM, Linus Torvalds wrote: >>>> Umm. Why not just make the test be whether the following compiles cleanly? >>>> >>>> #include >>>> >>>> extern size_t iconv(iconv_t cd, >>>> char **inbuf, size_t *inbytesleft, >>>> char **outbuf, size_t *outbytesleft); >>>> >>>> because if the compiler has seen a "const char **inbuf", then it should >>>> error out with a "conflicting types for 'iconv'" style message.. >>> >>> Yeah, this is what I did: >> >> My apologies. Your suggestion is completely different, and should work >> without -Werror. Let me try that. > > Is something like the patch below what you wanted to try? This looks sensible. Will apply.