delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/05/17:08:03

Message-Id: <200003052154.QAA17956@qnx.com>
Subject: Re: iso646.h and some questions
To: djgpp-workers AT delorie DOT com
Date: Sun, 5 Mar 2000 16:54:08 -0500 (EST)
From: "Alain Magloire" <alain AT qnx DOT com>
In-Reply-To: <200003051426.PAA15900@mars.lu.erisoft.se> from "Martin Stromberg" at Mar 05, 2000 03:26:01 PM
X-Mailer: ELM [version 2.5 PL0b1]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 
> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019