Artem B. Bityuckiy
Thu Oct 2 13:23:00 GMT 2003
Ahmed Masud wrote:
> Artem B. Bityuckiy wrote:
>> I've found than there is no "standard" place for NULL in Newlib. NULL
>> is defined in stdio.h, stdlib.h, locale.h, time.h, wchar.h and in a
>> variety of internal .c files. In all cases there are
>> #ifndef NULL
>> #define NULL
>> in these files. What is the reason of such many NULL definition? I
>> need NULL for internal use when I'm changing Newlib. And I've also
>> defined one more version of NULL. May be it is better to add NULL
>> definition to somewhere like sys/_types.h ?
> May be desirable to actually put it in stdio.h; or in its own file
> null.h. In addition NULL should be defined as:
> #ifndef NULL
> #define NULL ((void *)0)
> Not as a blank.
Of course, NULL isn't the blank, I wanted to write
#define NULL 0
NULL is defined in GCC's stddef.h.
Sorry for silly question.
More information about the Newlib