| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Severe regression in autoconf 2.61 |
| Date: | 2008-02-19 01:16:38 |
| Message-ID: | 200802190116.m1J1GcZ28086@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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.
>
> The proximate result of this in our HEAD is that configure fails to
> detect that _LARGEFILE_SOURCE is needed, resulting in a rather broken
> build on platforms where that really is needed. I had mis-blamed this
> on Bruce's recent NetBSD/BSDi hack, but I think it's been there since
> we installed 2.61 autoconf. I suspect that in fact the problem Bruce
> was seeing was due to this very bug, and that what we need to do is
> revert his BSD-specific patch and find a different solution.
I am not sure this explains the BSD case. NetBSD/BSDi uses
fsetpos/fgetpos to implement fseeko/ftello.
What I found with autoconf 2.59 was that setting ac_cv_func_fseeko=yes
was enough so AC_FUNC_FSEEKO thought fseeko exists. What I am finding
now is that the AC_FUNC_FSEEKO macro doesn't use ac_cv_func_fseeko in
the same way and I have to force HAVE_FSEEKO to 1, while in previous
versions of autoconf this was done for me.
The change that is causing me problems I think is:
if test $ac_cv_func_fseeko = yes; then
AC_DEFINE(HAVE_FSEEKO, 1,
[Define to 1 if fseeko (and presumably ftello) exists and is declared.])
fi
changed to:
if test $ac_cv_sys_largefile_source != unknown; then
AC_DEFINE(HAVE_FSEEKO, 1,
[Define to 1 if fseeko (and presumably ftello) exists and is declared.])
fi
I don't really understand why ac_cv_sys_largefile_source is now being
tested.
I put back the patch now that you are saying it isn't based on the BSD*
fix.
Once you find a more general fix I will test the BSD* cases again.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Justin | 2008-02-19 01:30:41 | Re: Ad Hoc Indexes |
| Previous Message | Stephen Denne | 2008-02-19 01:01:07 | Re: Ad Hoc Indexes |