DefineBuiltinMacro(Buf, "_GNU_SOURCE=1");
}
- // Filter out some microsoft extensions when trying to parse in ms-compat
- // mode.
if (LangOpts.Microsoft) {
+ // Filter out some microsoft extensions when trying to parse in ms-compat
+ // mode.
DefineBuiltinMacro(Buf, "__int8=__INT8_TYPE__");
DefineBuiltinMacro(Buf, "__int16=__INT16_TYPE__");
DefineBuiltinMacro(Buf, "__int32=__INT32_TYPE__");
DefineBuiltinMacro(Buf, "__int64=__INT64_TYPE__");
+ // Work around some issues with Visual C++ headerws.
+ if (LangOpts.CPlusPlus) {
+ // Since we define wchar_t in C++ mode.
+ DefineBuiltinMacro(Buf, "_WCHAR_T_DEFINED=1");
+ DefineBuiltinMacro(Buf, "_NATIVE_WCHAR_T_DEFINED=1");
+ // FIXME: This should be temporary until we have a __pragma
+ // solution, to avoid some errors flagged in VC++ headers.
+ DefineBuiltinMacro(Buf, "_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES=0");
+ }
}
if (LangOpts.Optimize)