Mail Archives: djgpp-workers/2000/03/05/17:08:03
>
> Eli said:
> > On Sun, 5 Mar 2000, Martin Str|mberg wrote:
> >
> > > Here's the (standard) file iso646.h.
> >
> > Thanks!
> >
> > > Some files #defines constants several times. E. g. NULL is in wchar.h
> > > and in stddef.h.
> >
> > No, wchar.h simply includes stddef.h. So there's no problem in that
> > case.
>
> No. The standard says NULL is defined in wchar.h and in stddef.h.
Yes but it does not say, it should be a specific macro, it just mean
that if one #include <wchar.h> they can use NULL because it will be defined
Most <wchar.h> will just #include <stddef.h> to pull the relevant macros.
> IIRC (have not the document here) stddef.h is _not_ included in wchar.h.
>
It is up to the implementor of the library, whether you do
1)
#include <stddef.h>
2)
#ifndef NULL
# define NULL 0
#endif
The end result should be the same. NULL macro define.
In some cases, 2) is preferable if there is conflict .. Is there
a conflict between <wchar.h> and <stddef.h> that will prohibit <stddef.h>
to be included ?
--
au revoir, alain
----
Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!
- Raw text -