On Feb 13, 2013, at 9:49 AM, Jordan Justen <[email protected]> wrote:
> On Tue, Feb 12, 2013 at 8:49 PM, David F. <[email protected]> wrote: >> For visual studio the define for NULL in base.h should be >> >> #if defined(__cplusplus) >> #define NULL 0 >> #else >> #define NULL ((VOID *) 0) >> #endif > > I was under the impression that EDK II was intentionally avoiding C++ > support. (That is not to say that I agree with this plan. :) > I'm not a fan of making massive changes to support C++ but we should at a minimum make things that are "forced included" clean for C++. So for example AutoGen.h does the following: #ifdef __cplusplus extern "C" { #endif //... #ifdef __cplusplus } #endif And a lot of the AutoGen.h files include Base.h. If the C++ code was including Base.h you could do something like: #define NULL EDK2_NULL #include <Base.h> #undef NULL To work around the conflicts, but this is not possible with the force include of AutoGen.h > You really should follow the process in MdePkg/Contributions.txt for > any code you send to the list if you want it to be usable by EDK II. > +1 Thanks, Andrew ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
