Обсуждение: Portability Issue in src/backend/port/snprintf.c (I think)

Поиск
Список
Период
Сортировка

Portability Issue in src/backend/port/snprintf.c (I think)

От
Frank Ridderbusch
Дата:
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.

Any comments?

MfG/Regards
--
     /====                         Siemens AG
    /    Ridderbusch        / ,   ICP CS XS QM4
   /                       /./   Heinz Nixdorf Ring
  /=== /,== ,===/  /,==,  //    33106 Paderborn, Germany
 /    //   /   /  //   / / \   Tel.: (49) 5251-8-15211
/    /     `==/\ /    / /   \ Email: ridderbusch.pad@sni.de

Since I have taken all the Gates out of my computer, it finally works!!

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

От
Bruce Momjian
Дата:
> 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


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

От
"Thomas G. Lockhart"
Дата:
> 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.

Hi Frank. Can I consider this a report of success? Bruce has fixed the
problem you mentioned, and I'd like to update the ports list for this
release. Let me know...

Also, can everyone else who has done testing recently please report on
the regression test for their platform? We'll assume that the current
problems on Bruce's release list will be addressed before release, but
we should still get a passing regression test without those fixes.

I can report recent success on Linux-2.0.30 (and since that is the
regression reference machine it will stay good :)

TIA

                       - Tom