Re: [HACKERS] Portability Issue in src/backend/port/snprintf.c (I think)

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: ridderbusch.pad@sni.de (Frank Ridderbusch)
Cc: pgsql-hackers@postgreSQL.org
Date: 1998-10-07T17:14:07Z
Lists: 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