On Thu, 26 Jun 2003 08:58:02 -0400, Ron Natalie <> wrote:
>
> "Sam Holden" <> wrote in message news:. ..
>> On Wed, 25 Jun 2003 10:30:29 -0400, Ron Natalie <> wrote:
>> >
>> > "Sam Holden" <> wrote in message news:. ..
>> >
>> >>
>> >> Upgrade to a version which actually tries to follow the C++ standard a little...
>> >>
>> >> It's free software after all 
>> >>
>> >
>> > What's that supposed to mean? Both the versions posted are explicitly
>> > permitted by the standard (and the latter definition is pretty close to the
>> > latest version if not identical).
>>
>> #define NULL ((void *)0)
>>
>> is *not* permitted by the standard.
>>
> Yes and if you looked at the inclusion it DOES NOT define it that way.
> Did you see all that ifdef stuff in there? It keeps the cast off the C++ code.
Here's the snippet:
if defined (_STDDEF_H) || defined (__need_NULL)
#undef NULL /* in case <stdio.h> has defined it. */
#ifdef __GNUG__
#define NULL __null
#else /* G++ */
#define NULL ((void *)0)
#endif /* G++ */
#endif /* NULL not defined and <stddef.h> or need NULL. */
#undef __need_NULL
Surely G++ is the indicator for the c++ path...
And hence #define NULL ((void *)0) is defined for c++ code.
if not, then whomever thought labelling the non c++ path as G++ must
have a very strange outlook on the world.
--
Sam Holden