Re: INT64_MIN and _MAX

Поиск
Список
Период
Сортировка
Искать
От
Petr Jelinek
Тема
Re: INT64_MIN and _MAX
Дата
Msg-id
550DF5A4.40509@2ndquadrant.com
Ответ на
INT64_MIN and _MAX (Andrew Gierth)
Список
Дерево обсуждения
INT64_MIN and _MAX Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: INT64_MIN and _MAX Petr Jelinek <petr@2ndquadrant.com>
Re: INT64_MIN and _MAX Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: INT64_MIN and _MAX Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: INT64_MIN and _MAX Andres Freund <andres@anarazel.de>
Re: INT64_MIN and _MAX Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: INT64_MIN and _MAX Andres Freund <andres@anarazel.de>
Re: INT64_MIN and _MAX Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: INT64_MIN and _MAX Kevin Grittner <kgrittn@ymail.com>
Re: INT64_MIN and _MAX Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: INT64_MIN and _MAX Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: INT64_MIN and _MAX Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: INT64_MIN and _MAX Peter Geoghegan <pg@heroku.com>
On 21/03/15 23:45, Andrew Gierth wrote:
> A couple of places (adt/timestamp.c and pgbench.c) have this:
>
> #ifndef INT64_MAX
> #define INT64_MAX	INT64CONST(0x7FFFFFFFFFFFFFFF)
> #endif
>
> #ifndef INT64_MIN
> #define INT64_MIN	(-INT64CONST(0x7FFFFFFFFFFFFFFF) - 1)
> #endif
>
> On the other hand, int8.c uses the INT64_MIN expression directly inline.
>
> On the third hand, INT64_MIN etc. would typically be defined in stdint.h
> if it exists.
>
> So wouldn't it make more sense to move these definitions into c.h and
> standardize their usage?
>

I was thinking the same when I've seen Peter's version of Numeric 
abbreviations patch. So +1 for that.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services


В списке pgsql-hackers по дате отправления
От: Andrew Gierth
Дата:
Сообщение: INT64_MIN and _MAX
От: Andrew Gierth
Дата:
Сообщение: Re: INT64_MIN and _MAX
FAQ