[cfe-commits] [patch] Let NULL and MSVC headers coexist

Nico Weber thakis at chromium.org
Tue Apr 24 14:25:47 PDT 2012


On Tue, Apr 24, 2012 at 2:06 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Tue, Apr 24, 2012 at 1:49 PM, Nico Weber <thakis at chromium.org> wrote:
>> Hi,
>>
>> the attached patch fixes both issues mentioned in
>> http://llvm.org/PR12146 . Like suggested by Eli in that bug, it does
>> this by defining NULL to 0 instead of __null on windows. I think it
>> would be nice to have a __clang_null, but this patch fixes the
>> immediate issues I'm seeing without me having to argue with Eli :-)
>> Maybe I'll do that in a follow-up patch.
>>
>> Ok?
>
> Not exactly sure what you did to make the test show up twice in the patch...
>
> Are you sure we want to do this for __MINGW32__?  I don't know of
> anyone having issues here with MinGW.

I added a line for target i386-mingw32 to the test. Posts like
http://www.klayge.org/wiki/index.php/Installation suggest that this
should probably be done for mingw too.

I moved the test to a single file like suggested by dblaikie.

Nico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-ms-null.patch
Type: application/octet-stream
Size: 1322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120424/7045addc/attachment.obj>


More information about the cfe-commits mailing list