Re: 32-bit ints on 64-bit linux

Поиск
Список
Период
Сортировка
От Kelly Burkhart
Тема Re: 32-bit ints on 64-bit linux
Дата
Msg-id 1111433339.26601.89.camel@krb06
обсуждение исходный текст
Ответ на Re: 32-bit ints on 64-bit linux  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: 32-bit ints on 64-bit linux  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 32-bit ints on 64-bit linux  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-odbc
On Fri, 2005-03-18 at 09:25, Peter Eisentraut wrote:
> Am Donnerstag, 3. März 2005 16:05 schrieb Kelly Burkhart:
> > I'm attaching a patch which fixes this, and some other questionable
> > sprintf format strings in convert.c.
>
> Do we have any evidence that the other ones are broken?

No, I do not.

I suggested that the other format strings were questionable based on a
reading of the glibc printf man page.  Aside from the 32-bit integer
problem the other formats work fine in the unmodified form on the three
platforms I use.

Can anyone with a better understanding of the libc standard comment on
the "correctness" of the following lines?

int8_t i1;
int16_t i2;

printf("%d", i1);
printf("%d", i2);

vs:

printf("%hhd", i1);
printf("%hd", i2);

-K

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Philippe Lang"
Дата:
Сообщение: Command Prompt Commercial ODBC driver?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 32-bit ints on 64-bit linux