Thread: Re: [GENERAL] Linux Largefile Support In Postgresql RPMS

Re: [GENERAL] Linux Largefile Support In Postgresql RPMS

From
"Zeugswetter Andreas SB SD"
Date:
> 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


Re: [GENERAL] Linux Largefile Support In Postgresql RPMS

From
Oliver Elphick
Date:
On Tue, 2002-08-13 at 14:26, Zeugswetter Andreas SB SD wrote:
> 
> > Looking at how to deal with this, is the following going to be
> > portable?:

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

OK.  %lld is usable by glibc, so amend %Ld to %lld.

Any other comments?

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                            
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "Watch ye therefore, and pray always, that ye may be      accounted worthy
toescape all these things that shall     come to pass, and to stand before the Son of man."
    Luke 21:36