Re: pg7.3b5 on cygwin 1.3.15-1 - Same error

Поиск
Список
Период
Сортировка
От Jason Tishler
Тема Re: pg7.3b5 on cygwin 1.3.15-1 - Same error
Дата
Msg-id 20021111170313.GB1476@tishler.net
обсуждение исходный текст
Ответ на Re: pg7.3b5 on cygwin 1.3.15-1 - Same error  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-cygwin
Peter,

On Sun, Nov 10, 2002 at 01:43:09PM +0100, Peter Eisentraut wrote:
> Jason Tishler writes:
> > The root cause is the following:
> >
> >     o In some recent version of Cygwin, the above two lines were
> >       added to stdio.h.
> >     o Recently, the HAVE_FSEEKO ifdef was added to pg_config.h.in.
>
> That doesn't explain why the PostgreSQL build would fail.

Sorry for the above weak explanation, but I was extremely limited on
time when I posted it.  I will try again.

> Is fseeko detected when it shouldn't have been, or vice versa?

Yes, but I consider this a Cygwin bug and not a PostgreSQL autoconf
issue because Cygwin:

    o defines fseeko() and ftello() in stdio.h
    o contains the code for fseeko() and ftello() in cygwin1.dll
    o does *not* export fseeko() and ftello() from cygwin1.dll

Hence, IMO, Cygwin is inconsistent with its treatment of fseeko() and
ftello() and confuses PostgreSQL's configure.  The following trivial
Cygwin patch which just exports fseeko() and ftello():

    http://cygwin.com/ml/cygwin-patches/2002-q4/msg00042.html

corrects the problem.

> These would be PostgreSQL and/or Autoconf problems, and I'd like to
> understand them so they can be fixed at the right place.

I think that Cygwin is the right place to correct this problem.
Otherwise, many application including PostgreSQL will have to fix this
problem over and over again.

> Adding a few things to a few headers files shouldn't cause things to
> blow up.

Agreed, but remember that this is Windows. :,)  It seems like the
following lines in pg_config.h:

    #define fseeko(a, b, c) fseek((a), (b), (c))
    #define ftello(a) ftell((a))

conflict with the following lines in stdio.h:

    int _EXFUN(fseeko, (FILE *, off_t, int));
    off_t   _EXFUN(ftello, ( FILE *));

Unfortunately, I couldn't figure out why.  You are certainly welcome to
do so yourself.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

В списке pgsql-cygwin по дате отправления:

Предыдущее
От: s0lao@netscape.net (S. L.)
Дата:
Сообщение: Re: Postmaster will not start
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: [ODBC] ODBC Unix distro building woes