Re: [GENERAL] Linux Largefile Support In Postgresql RPMS

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] Linux Largefile Support In Postgresql RPMS
Date: 2002-08-13 13:26:30
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA48879B6@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Looking at how to deal with this, is the following going to be
> portable?:
>
> in pg_dump/Makefile:
> CFLAGS += -D_LARGEFILE_SOURCE -D_OFFSET_BITS=64
>
> in pg_dump.h:
> #ifdef _LARGEFILE_SOURCE
> #define FSEEK fseeko
> #define FTELL ftello
> #define OFF_T_FORMAT %Ld
> typedef off_t OFF_T;
> #else
> #define FSEEK fseek
> #define FTELL ftell
> #define OFF_T_FORMAT %ld
> typedef long int OFF_T;
> #endif

No, look at the int8 code to see how to make it portable.
On AIX e.g it is %lld and long long int.

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-13 13:43:56 Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke
Previous Message Tom Lane 2002-08-13 13:24:20 Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke