Re: LLVM compile failing in seawasp - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: LLVM compile failing in seawasp
Date
Msg-id alpine.DEB.2.21.1907280935520.1292@lancre
Whole thread Raw
In response to Re: LLVM compile failing in seawasp  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: LLVM compile failing in seawasp
List pgsql-hackers
Hello Thomas,

>> I would just #undef Min for our small number of .cpp files that
>> include LLVM headers.  It's not as though you need it in C++, which
>> has std::min() from <algorithm>.
>
> Like so.  Fixes the problem for me (llvm-devel-9.0.d20190712).

Hmmm. Not so nice, but if it works, why not, at least the impact is 
much smaller than renaming.

Note that the Min macro is used in several pg headers (ginblock.h, 
ginxlog.h, hash.h, simplehash.h, spgist_private.h), so you might really 
need it depending on what is being done later.

Otherwise, why not simply move llvm C++ includes *before* postgres 
includes? They should be fully independent anyway, so the order should 
not matter?

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add parallelism and glibc dependent only options to reindexdb
Next
From: Tomas Vondra
Date:
Subject: Re: ANALYZE: ERROR: tuple already updated by self