www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/06/12:12:26

Message-Id: <199904061612.QAA06604@out2.ibm.net>
From: "Mark E." <snowball3 AT usa DOT net>
To: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Date: Tue, 6 Apr 1999 12:12:31 -0400
MIME-Version: 1.0
Subject: Re: locale.h patch
In-reply-to: <199904061517.LAA08863@envy.delorie.com>
References: <199904061447 DOT OAA59644 AT out1 DOT ibm DOT net> (snowball3 AT usa DOT net)
X-mailer: Pegasus Mail for Win32 (v3.01d)
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 
> > + /* Some programs think they know better... */
> > + #undef NULL
> >   #define NULL		0
> 
> Should we do that, or this?
> 
> #ifndef NULL
> #define NULL 0
> #endif
> 
> Whose NULL definition are we trying to avoid?
> 

The NULL from libstdc++:
# if defined __GNUG__ && \
   (__GNUC__ > 2 || (__GNUC__ == 2 && 
__GNUC_MINOR__ >= 8))
#  define NULL (__null)
# else
#  if !defined(__cplusplus)
#   define NULL ((void*)0)
#  else
#   define NULL (0)
#  endif
# endif
#endif

which way you want to go depends on your tolerance of __null.


--- 
Mark Elbrecht, snowball3 AT usa DOT net
http://snowball.digitalspace.net/

- Raw text -


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