Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.
Дата
Msg-id 20170930162040.pt2clbqsrpdddtxd@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.
Список pgsql-committers
On 2017-09-30 12:17:06 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Extend & revamp pg_bswap.h infrastructure.
> 
> Hm, what is the point of this in pg_bswap.h:
> 
> +#ifdef _MSC_VER
> +#include <stdlib.h>
> +#endif
> 
> c.h will already have included <stdlib.h>.  There might be some
> value in this if we anticipated allowing freestanding use of this
> header, but that won't happen because it depends on configure symbols.

Well, it's not that obvious where the _byteswap_* functions are coming
from on msvc. I guess we can just leave the comment
/* In all supported versions msvc provides _byteswap_* functions in stdlib.h */
there, but I see no harm in the current form either.


> but that won't happen because it depends on configure symbols.

FWIW, I've wondered about replacing the pg_config.h tests with explicit
gcc version checks. But doesn't seem worth it for now.

Greetings,

Andres Freund


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.