Re: AIX compilation problems (was Re: Proposal ...)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>
Cc: PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: AIX compilation problems (was Re: Proposal ...)
Date: 2002-09-26 22:28:18
Message-ID: Pine.LNX.4.44.0209261955300.1149-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeugswetter Andreas SB SD writes:

> The problem is, that scan.c includes unistd.h before postgres.h
> and thus unistd.h defines _LARGE_FILE_API which is not allowed
> together with _LARGE_FILES. Do you know an answer ?
> Offhand I can only think of using -D_LARGE_FILES as a compiler flag :-(

That would be pretty tricky to arrange, since the macro that detects all
this is bundled with Autoconf. Also, it would only fix one particular
manifestation of the overall problem, namely that pg_config.h needs to
come first, period.

I can see two ways to fix this properly:

1. Change the flex call to something like

(echo '#include "postgres.h"'; $(FLEX) -t -o$@) >$@

This would throw off all #line references by one.

2. Direct the flex output to another file, say scan2.c, and create a new
scan.c like this:

#include "postgres.h"
#include "scan2.c"

and create the object file from that.

We have half a dozen flex calls in our tree, so either fix would propagate
a great deal of ugliness around.

> Do we really want a general 64 bit off_t or would it be sufficient in the
> two places that use fseeko ?

It affects all the I/O functions. If we want to access large files we
need to use the large-file capable function interface.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-26 22:30:53 Re: Bug in PL/pgSQL GET DIAGNOSTICS?
Previous Message Peter Eisentraut 2002-09-26 22:26:53 Re: Bug in PL/pgSQL GET DIAGNOSTICS?