<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 28, 2014 at 1:16 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div class="">On Mon, Apr 28, 2014 at 1:05 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr">Even if we commit this workaround, can we report this as a bug to upstream Linux?</div></blockquote><div><br></div></div><div>As mentioned above, I'm guessing Linux probably doesn't want to depend on C standard headers, so they wouldn't see this as a bug in Linux.</div>

<div><br></div><div>You could say that it's a bug in glibc that they include headers that pull in Linux's internal linux/stddef.h in glibc headers used by applications, but based on previous interactions with glibc I would guess that their reply would be "we do include this internal linux header, but we're careful to define __need_NULL and re-include stddef.h to fix the issues caused by that". (I'm happy to file a bug like this if you think it has a chance of not being WontFixed immediately.)</div>
</div></div></div></blockquote><div><br></div><div>I don't think they'll be responsive.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">  The test case you have shows how this definition of NULL is broken on x86_64, even in C with gcc:</div>
</blockquote><div><br></div></div><div>The Linux header does</div><div><br></div><div>#if c++</div><div>#define NULL 0</div><div>#else</div><div>#define NULL (void*)0</div><div>#endif</div><div><br></div><div>so that should be fine (?)</div>
</div></div></div></blockquote><div><br></div><div>Great, so they have a definition that follows the letter of the C++ standard, but not the intention.  I doubt they will change their headers to be more C++-friendly.  IIRC they were famous for using C++ keywords in headers in the past.</div>
<div><br></div><div>Let's commit the workaround.  It's what glibc wants.</div></div></div></div>