
> >> Yeah.  AFAICS the only way around this is to avoid doing any I/O
> >> operations in the flex-generated files.  Fortunately, 
> that's not much
> >> of a restriction.
> 
> > Unfortunately I do not think that is sufficient, since the problem is already
> > at the #include level. The compiler barfs on the second #include <unistd.h>
> > from postgres.h
> 
> AIX is too stupid to wrap unistd.h in an "#ifndef" to protect against
> double inclusion?  I suppose we could do that for them...

I guess that is exactly not wanted, since that would hide the actual
problem, namely that _LARGE_FILE_API gets defined (off_t --> 32bit).
Thus I think IBM did not protect unistd.h on purpose.

Andreas

Tue, 29 Oct 2002 17:08:14 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: pg_dump and large files - is this a problem? 
Zeugswetter Andreas SB SD writes:

> > AIX is too stupid to wrap unistd.h in an "#ifndef" to protect against
> > double inclusion?  I suppose we could do that for them...
>
> I guess that is exactly not wanted, since that would hide the actual
> problem, namely that _LARGE_FILE_API gets defined (off_t --> 32bit).
> Thus I think IBM did not protect unistd.h on purpose.

I think the problem is more accurately described thus:  Flex generated
files include <stdio.h> before "postgres.h" due to the way it lays out the
code in the output.  stdio.h does something which prevents switching to
the large file model later on in postgres.h.  (This manifests itself in
unistd.h, but unistd.h itself is not the problem per se.)

The proposed fix was to include the flex output in some other file (such
as the corresponding grammar file) rather than to compile it separately.
The patch just needs to be tried out.

-- 
Peter Eisentraut   peter_e@gmx.net


Tue, 29 Oct 2002 23:19:32 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Re: pg_dump and large files - is this a problem? 
Peter Eisentraut <peter_e@gmx.net> writes:
> The proposed fix was to include the flex output in some other file (such
> as the corresponding grammar file) rather than to compile it separately.

Seems like a reasonable solution.  Can you make that happen in the next
day or two?  If not, I'll take a whack at it ...

			regards, tom lane

Thu, 31 Oct 2002 17:07:28 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump and large files - is this a problem? 
Peter Eisentraut <peter_e@gmx.net> writes:
> I think the problem is more accurately described thus:  Flex generated
> files include <stdio.h> before "postgres.h" due to the way it lays out the
> code in the output.  stdio.h does something which prevents switching to
> the large file model later on in postgres.h.  (This manifests itself in
> unistd.h, but unistd.h itself is not the problem per se.)

> The proposed fix was to include the flex output in some other file (such
> as the corresponding grammar file) rather than to compile it separately.

I have made this change.  CVS tip should compile cleanly now on machines
where this is an issue.

			regards, tom lane

Fri, 01 Nov 2002 19:31:44 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump and large files - is this a problem? 