lkml.org 
[lkml]   [2012]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RESEND] do not redefine userspace's NULL #define
On Fri, 13 Apr 2012 12:39:20 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> And quite frankly, kernel-external definitions of NULL have
> traditionally been pure sh*t (ie plain "0" without the cast to a
> pointer), so I'm not entirely convinced about this patch.

I was going to dispute this, and point out that I'm pretty sure
the C++ standard specifically requires the plain-integer 0/0L
definition. Then I realized this did not actually contradict
your description.

Maybe the thing to do would be to ensure that NULL goes to __null,
then define that to be ((void *) 0) if the compiler doesn't provide
it? The magic behavior of __null seems like it'd be preferable
where it is available.

-s
--
Listen, get this. Nobody with a good compiler needs to be justified.


\
 
 \ /
  Last update: 2012-04-14 00:05    [W:0.051 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site