[HACKERS] Missing SIZE_MAX

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [HACKERS] Missing SIZE_MAX
Дата
Msg-id 15883.1504278595@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [HACKERS] Missing SIZE_MAX  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] Missing SIZE_MAX  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Commit 2e70d6b5e added a dependency on SIZE_MAX to libpq/fe_exec.c.
According to C99 and recent POSIX, that symbol should be provided
by <stdint.h>, but SUS v2 (POSIX 2001) doesn't require <stdint.h>
to exist at all ... and I now notice that gaur/pademelon doesn't
have it, and unsurprisingly is failing to compile fe_exec.c.

We have a workaround for that symbol in timezone/private.h:

#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1)
#endif

and a bit of grepping finds other places that are using the (size_t) -1
trick explicitly.  So what I'm tempted to do is move the above stanza
into c.h.  Any objections?
        regards, tom lane



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: [HACKERS] signed logging format for pid in log_line_prefix?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] signed logging format for pid in log_line_prefix?