Re: cast pid_t to int when using *printf

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: cast pid_t to int when using *printf
Дата
Msg-id 200410090242.i992glu02408@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: cast pid_t to int when using *printf  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: cast pid_t to int when using *printf  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Tom Lane wrote:
> Neil Conway <neilc@samurai.com> writes:
> > I guess it would be safest to use %ld and cast pid_t to long. Of course,
> > this seems a little paranoid -- is there actually a system with
> > sizeof(pid_t) != 4?
>
> Traditionally PIDs fit in 16 bits, let alone 32.  I'd recommend that we
> standardize on casting pid_t to int for printing purposes;

Done.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: cast pid_t to int when using *printf
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: cast pid_t to int when using *printf