[HACKERS] datetime.h defines like PM conflict with external libraries - Mailing list pgsql-hackers

From Andres Freund
Subject [HACKERS] datetime.h defines like PM conflict with external libraries
Date
Msg-id 20171003190033.nsizxfnvgwx6frap@alap3.anarazel.de
Whole thread Raw
Responses Re: [HACKERS] datetime.h defines like PM conflict with externallibraries
List pgsql-hackers
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?

Greetings,

Andres Freund


-- 
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 by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiverafter OOM
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables