Re: [HACKERS] Portability Issue in src/backend/port/snprintf.c (I think) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Portability Issue in src/backend/port/snprintf.c (I think)
Date
Msg-id 199810071714.NAA02118@candle.pha.pa.us
Whole thread Raw
In response to Portability Issue in src/backend/port/snprintf.c (I think)  (Frank Ridderbusch <ridderbusch.pad@sni.de>)
List pgsql-hackers
> Hi,
>
> I compiled Sundays snapshot in preparation of a SVR4/SINIX Readme. A
> couple of the problems, which I saw, have already been addressed by
> the recent UnixWare patch.
>
> Admittedly my operating system platform is somewhat old, however I
> would think, that there are more os versions out there, which don't
> have a 'long long' data type.
>
> In particular my compiler didn't like the following line in
> src/backend/port/snprintf.c:
>
> /* IRIX doesn't do 'long long' in va_arg(), so use a typedef */
> typedef long long long_long;
>
> I'm on a simple 32bit architecture with no long long support, so I
> changed 'long long' to 'long' and everything was okay.

Good point.

I have fixed snprintf.c so it properly works on machines that don't do
'long long'.  I used HAVE_LONG_INT_64 defines around the proper areas.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


pgsql-hackers by date:

Previous
From: Horak Daniel
Date:
Subject: NT port of PGSQL - success
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)