Re: Severe regression in autoconf 2.61 - Mailing list pgsql-hackers

From Jeremy Drake
Subject Re: Severe regression in autoconf 2.61
Date
Msg-id Pine.BSO.4.64.0802182212180.21301@resin.csoft.net
Whole thread Raw
In response to Severe regression in autoconf 2.61  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 18 Feb 2008, Tom Lane wrote:

> There seems to have been a bit of a brain cramp upstream :-(.
> Previously, AC_FUNC_FSEEKO did this to test if fseeko was available:
>
>     return !fseeko;
>
> Now it does this:
>
>     return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
>
> Unfortunately, that gives the compiler enough of a syntactic clue
> to guess that fseeko is probably an undeclared function, and therefore
> *it will not error out*, only generate a warning, if it's not seen
> a declaration for fseeko.
>

So that's what that was.  I had the same problem in another project I was
working on (which I used some PostgreSQL configure code in).

I had to add this in the gcc section of configure:   PGAC_PROG_CC_CFLAGS_OPT([-Werror-implicit-function-declaration])

But it would be nice to find a better fix.  I don't understand how calling
a function that has not been defined yet is ever not an error.


-- 
In 1915 pancake make-up was invented but most people still preferred
syrup.


pgsql-hackers by date:

Previous
From: James Mansion
Date:
Subject: Re: wishlist for 8.4
Next
From: Zoltan Boszormenyi
Date:
Subject: Re: IDENTITY/GENERATED patch