tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bogus ifdef guard in sys/null.h

On Sat, Jul 17, 2010 at 12:16:13PM +0300, Stathis Kamperis wrote:
> Hi people,
> in ,
> the _SYS_NULL_H guard is bogus, since the whole header defines NULL
> only. And there's already a guard for NULL. The code as it is, breaks
> the following snippet:
> % cat t.c
> #include <stddef.h>
> #undef NULL
> #include <unistd.h>

Doing that between two includes is the fault of the one who wrote that code.


> POSIX says that both stddef.h and unistd.h shall provide NULL. This
shall != must

So not a mandatory requirement.


Home | Main Index | Thread Index | Old Index