Re: [edk2] CPP Build Issue VC NULL

Subject: Re: [edk2] CPP Build Issue VC NULL

From: Tim Lewis <tim.lewis@insyde.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2013-02-14 01:38:02

David --

Just to clarify: the C++ 98 spec requires that NULL evaluate to 0, which is where I suspect VC++ is having trouble. In C++ 11 it must be 0 or a value of type nullptr_t. In C is it allowed to also be ((VOID *) 0). See http://www.cplusplus.com/reference/cstring/NULL/

Having said that: I think your change makes sense.
 
Tim

-----Original Message-----
From: David F. [mailto:df7729@gmail.com] 
Sent: Tuesday, February 12, 2013 8:49 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] CPP Build Issue VC NULL

For visual studio the define for NULL in base.h should be

#if defined(__cplusplus)
#define NULL 0
#else
#define NULL  ((VOID *) 0)
#endif

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel