This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC headers and DJGPP port


On Thu, Jul 20, 2000 at 10:42:29PM +0200, Martin v. Loewis wrote:
> Please tell me how you implement the above requirement without testing
> whether NULL has been defined?

Speaking as somebody who was there when the original decision was made, it was
the intention of the committee that you either:

   1)	Include a null.h include file that defines NULL, possibly having null.h
	being protected by #ifndef/#endif (IIRC, this was actually discussed,
	but it would be logical to do so);

   2)	Use #ifndef/#endif around the definition;

   3)	Define NULL using exactly the same spelling in each include file, in
	which case it would fall under the rule that identical redefinitions of
	macros using the same spelling are not treated as redefinitions.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]