Re: [HACKERS] datetime.h defines like PM conflict with externallibraries

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [HACKERS] datetime.h defines like PM conflict with externallibraries
Дата
Msg-id dd5a046d-1098-e128-2396-338e62605573@2ndQuadrant.com
обсуждение исходный текст
Ответ на [HACKERS] datetime.h defines like PM conflict with external libraries  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] datetime.h defines like PM conflict with externallibraries  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers



On 10/03/2017 03:00 PM, Andres Freund wrote:
> Hi,
>
> In my llvm jit work I'd to
>
> #undef PM
> /* include some llvm headers */
> #define PM 1
>
> because llvm has a number of functions which have an argument named PM.
> Now that works, but it's fairly ugly. Perhaps it would be a good idea to
> name these defines in a manner that's slightly less likely to conflict?
>
> Alternatively we could use #pragma push_macro() around the includes, but
> that'd be a new dependency.
>
> Better ideas?
>


AFAICT at a quick glance these are only used in a couple of files. Maybe
the defs need to be floated off to a different header with more limited
inclusion?

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

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

Предыдущее
От: Nico Williams
Дата:
Сообщение: Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] datetime.h defines like PM conflict with externallibraries