Re: [HACKERS] taking stdbool.h into use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] taking stdbool.h into use
Дата
Msg-id 21392.1521526734@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] taking stdbool.h into use  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: [HACKERS] taking stdbool.h into use  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Mar 13, 2018 at 03:25:39PM -0400, Peter Eisentraut wrote:
>> So I'm going back to my proposal from December, to just use stdbool.h
>> when sizeof(bool) == 1, and add a static assertion to prevent other
>> configurations.

> So, on one side of the ring, we have more complicated patches to include
> so as support for sizeof(bool) == 4 becomes possible in the backend
> code, and on the opposite side one patch which restrains the use of
> stdbool.h only when the size is 1.  A size of 4 bytes for bool is
> defined in stdbool.h on a small set of platforms, so it could be
> tempting to use what is proposed here, still that feels like a
> halk-baked integration.  Thoughts from others?

I think it'd be worth identifying exactly which platforms have
sizeof(bool) different from 1.  Are any of them things that anyone
cares about going forward?  The point of this patch is to ease
future development of extensions, but it's unlikely any extension
authors care about portability onto, say, macOS 10.4 (prairiedog).

            regards, tom lane


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] taking stdbool.h into use
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Problem while setting the fpw with SIGHUP