Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 09 Jan 2013 15:42:07 +0100
From: Luca Barbato <lu_zero@...too.org>
To: musl@...ts.openwall.com
Subject: Re: NULL

On 09/01/13 12:02, John Spencer wrote:
> 2) change musl so it is compatible with those apps. this would mean:
> #if defined(__GNUC__) && defined(__cplusplus__)
> #define NULL __null
> #elif defined (__cplusplus__)
> #define NULL 0
> #else
> #define NULL (void *) 0 /* for C code */
> #end
> this change is the easiest solution: any problem will be magically fixed.

I'm not sure if there is a way to warn properly at compile time for that
specific usage.

IMHO going with 2+3 is the only safe way to grant musl more support

Having a flag to turn those compatibility hacks off would be good.

I wonder why in the hell C++ can't use the (void *) 0 definition or
equivalent.

lu


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.