diff --git a/GCC/CMakeLists.txt b/GCC/CMakeLists.txt index 7052603..7543a88 100644 --- a/GCC/CMakeLists.txt +++ b/GCC/CMakeLists.txt @@ -1,4 +1,7 @@ PROJECT(GCC C) +IF(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0003 NEW) +ENDIF(COMMAND CMAKE_POLICY) IF(GCCXML_INSTALL_COMPONENT_NAME_RUNTIME_EXECUTABLE) SET(GCCXML_INSTALL_COMPONENT_RUNTIME_EXECUTABLE diff --git a/GCC/gcc/c-opts.c b/GCC/gcc/c-opts.c index be5a110..05df0ef 100644 --- a/GCC/gcc/c-opts.c +++ b/GCC/gcc/c-opts.c @@ -166,9 +166,9 @@ c_common_missing_argument (const char *opt, size_t code) case OPT_isysroot: case OPT_isystem: case OPT_iquote: -/* BEGIN GCC-XML MODIFICATIONS (2007/10/31 15:07:01) */ +/* BEGIN GCC-XML MODIFICATIONS 2007-10-31 */ case OPT_iwrapper: -/* END GCC-XML MODIFICATIONS (2007/10/31 15:07:01) */ +/* END GCC-XML MODIFICATIONS 2007-10-31 */ error ("missing path after %qs", opt); break; @@ -854,7 +854,12 @@ c_common_handle_option (size_t scode, const char *arg, int value) break; case OPT_isystem: - add_path (xstrdup (arg), SYSTEM, 0, true); +/* BEGIN GCC-XML MODIFICATIONS 2008-06-30 */ + /* The third argument is a boolean indicating whether the files + in the directory specified are C++-aware. GCC by default + hard-codes false, but for GCC-XML we use true. */ + add_path (xstrdup (arg), SYSTEM, 1, true); +/* END GCC-XML MODIFICATIONS 2008-06-30 */ break; case OPT_iwithprefix: diff --git a/GCC/gcc/cp/class.c b/GCC/gcc/cp/class.c index 94df614..a51fba2 100644 --- a/GCC/gcc/cp/class.c +++ b/GCC/gcc/cp/class.c @@ -2603,6 +2603,27 @@ add_implicitly_declared_members (tree t, TYPE_HAS_CONST_ASSIGN_REF (t) = !cant_have_const_assignment; CLASSTYPE_LAZY_ASSIGNMENT_OP (t) = 1; } + +/* BEGIN GCC-XML MODIFICATIONS 2008-06-18 */ + /* We want all these declarations to be included in the dump so we + do them always. */ + if (CLASSTYPE_LAZY_DEFAULT_CTOR (t)) + { + lazily_declare_fn (sfk_constructor, t); + } + if (CLASSTYPE_LAZY_COPY_CTOR (t)) + { + lazily_declare_fn (sfk_copy_constructor, t); + } + if (CLASSTYPE_LAZY_ASSIGNMENT_OP (t)) + { + lazily_declare_fn (sfk_assignment_operator, t); + } + if (CLASSTYPE_LAZY_DESTRUCTOR (t)) + { + lazily_declare_fn (sfk_destructor, t); + } +/* END GCC-XML MODIFICATIONS 2008-06-18 */ } /* Subroutine of finish_struct_1. Recursively count the number of fields diff --git a/GCC/gcc/cp/xml.c b/GCC/gcc/cp/xml.c index 98f6517..7275b16 100644 --- a/GCC/gcc/cp/xml.c +++ b/GCC/gcc/cp/xml.c @@ -65,7 +65,7 @@ along with this program; if not, write to the #include "toplev.h" /* ident_hash */ -#define GCC_XML_C_VERSION "$Revision: 1.120 $" +#define GCC_XML_C_VERSION "$Revision: 1.123 $" /*--------------------------------------------------------------------------*/ /* Data structures for the actual XML dump. */ @@ -1842,7 +1842,7 @@ xml_output_function_decl (xml_dump_info_p xdi, tree fd, xml_dump_node_p dn) tag = "OperatorMethod"; name = xml_reverse_opname_lookup (DECL_NAME (fd)); do_returns = 1; do_const = 1; do_virtual = 1; - do_static = 1; + do_static = 1; do_artificial = 1; } else { @@ -2188,11 +2188,12 @@ xml_output_record_type (xml_dump_info_p xdi, tree rt, xml_dump_node_p dn) { int id; - /* Don't process any compiler-generated functions except constructors - and destructors. */ + /* Don't process any compiler-generated functions except + constructors, destructors, and the assignment operator. */ if (DECL_ARTIFICIAL(func) && !DECL_CONSTRUCTOR_P (func) - && !DECL_DESTRUCTOR_P (func)) continue; + && !DECL_DESTRUCTOR_P (func) + && !DECL_ASSIGNMENT_OPERATOR_P (func)) continue; /* Don't output the cloned functions. */ if (DECL_CLONED_FUNCTION_P (func)) continue; @@ -2992,6 +2993,7 @@ xml_find_template_parm (tree t) case CONST_DECL: return 1; case VAR_DECL: return 1; case FUNCTION_DECL: return 1; + case FIELD_DECL: return 1; /* A template deferred scoped lookup. */ case SCOPE_REF: return 1; diff --git a/GCC/gcc/genmodes.c b/GCC/gcc/genmodes.c index dc0bce3..93ee767 100644 --- a/GCC/gcc/genmodes.c +++ b/GCC/gcc/genmodes.c @@ -785,11 +785,13 @@ calc_wider_mode (void) /* Output routines. */ +/* BEGIN GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */ #define tagged_printf(FMT, ARG, TAG) do { \ - int count_; \ + int count_=0; \ printf (" " FMT ",%n", ARG, &count_); \ printf ("%*s/* %s */\n", 27 - count_, "", TAG); \ } while (0) +/* END GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */ #define print_decl(TYPE, NAME, ASIZE) \ puts ("\nconst " TYPE " " NAME "[" ASIZE "] =\n{"); @@ -821,7 +823,9 @@ enum machine_mode\n{"); for (c = 0; c < MAX_MODE_CLASS; c++) for (m = modes[c]; m; m = m->next) { - int count_; +/* BEGIN GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */ + int count_=0; +/* END GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */ printf (" %smode,%n", m->name, &count_); printf ("%*s/* %s:%d */\n", 27 - count_, "", trim_filename (m->file), m->line); @@ -1264,9 +1268,9 @@ main(int argc, char **argv) { bool gen_header = false, gen_min = false; -/* BEGIN GCC-XML MODIFICATIONS (2007/10/31 15:07:06) */ +/* BEGIN GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */ gccxml_fix_printf(); -/* END GCC-XML MODIFICATIONS (2007/10/31 15:07:06) */ +/* END GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */ progname = argv[0]; diff --git a/GCC_XML/GXFront/gxConfiguration.cxx b/GCC_XML/GXFront/gxConfiguration.cxx index 15e92df..71292e8 100644 --- a/GCC_XML/GXFront/gxConfiguration.cxx +++ b/GCC_XML/GXFront/gxConfiguration.cxx @@ -26,6 +26,8 @@ #include #include +#include +#include //---------------------------------------------------------------------------- const char* gxConfigurationVc6Registry = @@ -46,6 +48,15 @@ const char* gxConfigurationVc8sdkRegistry = const char* gxConfigurationVc8sdk2Registry = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir"; +const char* gxConfigurationVc9Registry = +"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir"; +//"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\9.0;InstallDir"; // _WIN64 ? +const char* gxConfigurationVc9exRegistry = +"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir"; +//"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\9.0;InstallDir"; // _WIN64 ? +const char* gxConfigurationVc9sdkRegistry = +"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A;InstallationFolder"; + //---------------------------------------------------------------------------- gxConfiguration::gxConfiguration() { @@ -1072,6 +1083,20 @@ bool gxConfiguration::FindFlags() return this->FindFlagsMSVC8(); } } + else if(compilerName == "msvc9") + { + std::string loc; + bool have9ex = false; + // gxSystemTools::ReadRegistryValue(gxConfigurationVc9exRegistry, loc); + if(have9ex) + { + return false; // this->FindFlagsMSVC8ex(); + } + else + { + return this->FindFlagsMSVC9(); + } + } else if(compilerName == "cl") { // We must decide if this is MSVC 6, 7, 7.1, or 8. @@ -1084,6 +1109,9 @@ bool gxConfiguration::FindFlags() loc); bool have8ex = gxSystemTools::ReadRegistryValue(gxConfigurationVc8exRegistry, loc); + bool have9 = + (gxSystemTools::ReadRegistryValue(gxConfigurationVc9Registry, loc) || + gxSystemTools::ReadRegistryValue(gxConfigurationVc9exRegistry, loc)); // Look for a VS8 that is not the beta release. bool have8 = false; @@ -1105,27 +1133,31 @@ bool gxConfiguration::FindFlags() } // See if only one is installed. - if(have6 && !have7 && !have71 && !have8 && !have8ex) + if(have6 && !have7 && !have71 && !have8 && !have8ex && !have9) { return this->FindFlagsMSVC6(); } - else if(!have6 && have7 && !have71 && !have8 && !have8ex) + else if(!have6 && have7 && !have71 && !have8 && !have8ex && !have9) { return this->FindFlagsMSVC7(); } - else if(!have6 && !have7 && have71 && !have8 && !have8ex) + else if(!have6 && !have7 && have71 && !have8 && !have8ex && !have9) { return this->FindFlagsMSVC71(); } - else if(!have6 && !have7 && !have71 && have8 && !have8ex) + else if(!have6 && !have7 && !have71 && have8 && !have8ex && !have9) { return this->FindFlagsMSVC8(); } - else if(!have6 && !have7 && !have71 && !have8 && have8ex) + else if(!have6 && !have7 && !have71 && !have8 && have8ex && !have9) { return this->FindFlagsMSVC8ex(); } - else if(have6 || have7 || have71 || have8 || have8ex) + else if(!have6 && !have7 && !have71 && !have8 && !have8ex && have9) + { + return this->FindFlagsMSVC9(); + } + else if(have6 || have7 || have71 || have8 || have8ex || have9) { // Find available support directories. bool support6 = have6 && this->FindData("Vc6"); @@ -1133,30 +1165,42 @@ bool gxConfiguration::FindFlags() bool support71 = have71 && this->FindData("Vc71"); bool support8 = have8 && this->FindData("Vc8"); bool support8ex = have8ex && this->FindData("Vc8ex"); + bool support9 = have9 && this->FindData("Vc9"); // Have more than one. See if only one has the support // directory available. - if(support6 && !support7 && !support71 && !support8 && !support8ex) + if(support6 && !support7 && !support71 && !support8 && + !support8ex && !support9) { return this->FindFlagsMSVC6(); } - else if(!support6 && support7 && !support71 && !support8 && !support8ex) + else if(!support6 && support7 && !support71 && !support8 && + !support8ex && !support9) { return this->FindFlagsMSVC7(); } - else if(!support6 && !support7 && support71 && !support8 && !support8ex) + else if(!support6 && !support7 && support71 && !support8 && + !support8ex && !support9) { return this->FindFlagsMSVC71(); } - else if(!support6 && !support7 && !support71 && support8 && !support8ex) + else if(!support6 && !support7 && !support71 && support8 && + !support8ex && !support9) { return this->FindFlagsMSVC8(); } - else if(!support6 && !support7 && !support71 && !support8 && support8ex) + else if(!support6 && !support7 && !support71 && !support8 && + support8ex && !support9) { return this->FindFlagsMSVC8ex(); } - else if(!support6 && !support7 && !support71 && !support8 && !support8ex) + else if(!support6 && !support7 && !support71 && !support8 && + !support8ex && support9) + { + return this->FindFlagsMSVC9(); + } + else if(!support6 && !support7 && !support71 && !support8 && + !support8ex && !support9) { std::cerr << "Compiler \"" << m_GCCXML_COMPILER << "\" is not supported by GCC_XML because none of \n" @@ -1221,6 +1265,10 @@ bool gxConfiguration::FindFlags() return this->FindFlagsMSVC8ex(); } } + else if(output.find("Compiler Version 15.") != std::string::npos) + { + return this->FindFlagsMSVC9(); + } } // Couldn't tell by running the compiler. } @@ -1228,8 +1276,9 @@ bool gxConfiguration::FindFlags() // was used to build this executable. const char* const clText = "Compiler \"cl\" specified, but more than one of " - "MSVC 6, 7, 7.1, and 8 are installed.\n" - "Please specify \"msvc6\", \"msvc7\", \"msvc71\", or \"msvc8\" for " + "MSVC 6, 7, 7.1, 8, and 9 are installed.\n" + "Please specify \"msvc6\", \"msvc7\", \"msvc71\", \"msvc8\", " + "\"msvc8ex\", or \"msvc9\" for " "the GCCXML_COMPILER setting.\n"; #if defined(_MSC_VER) && ((_MSC_VER >= 1200) && (_MSC_VER < 1300)) std::cerr << "Warning:\n" << clText @@ -1262,6 +1311,11 @@ bool gxConfiguration::FindFlags() { std::cerr << "No installed version of MSVC 8 was found!\n"; } +#elif defined(_MSC_VER) && ((_MSC_VER >= 1500) && (_MSC_VER < 1600)) + std::cerr << "Warning:\n" << clText + << "Using MSVC 9 because it was used to build GCC-XML.\n" + << "\n"; + return this->FindFlagsMSVC9(); #else // Give up. The user must specify one. std::cerr << clText; @@ -1948,12 +2002,12 @@ bool gxConfiguration::FindFlagsMIPSpro() if (s.find(' ') == s.npos) { - INCLUDES += "-I"; + INCLUDES += "-isystem"; INCLUDES += s; } else { - INCLUDES += "-I\""; + INCLUDES += "-isystem\""; INCLUDES += s; INCLUDES += "\""; } @@ -2320,6 +2374,77 @@ bool gxConfiguration::FindFlagsMSVC8ex() return true; } +//---------------------------------------------------------------------------- +bool gxConfiguration::FindFlagsMSVC9() +{ + // The registry key to use when attempting to automatically find the + // MSVC include files. + std::string msvcPath; + if(!gxSystemTools::ReadRegistryValue(gxConfigurationVc9Registry, msvcPath) && + !gxSystemTools::ReadRegistryValue(gxConfigurationVc9exRegistry, msvcPath)) + { + std::cerr << "Error finding MSVC 9 from registry.\n"; + return false; + } + std::string psdkPath; + if(!gxSystemTools::ReadRegistryValue(gxConfigurationVc9sdkRegistry, psdkPath)) + { + std::cerr << "Error finding MSVC 9 Platform SDK from registry.\n"; + return false; + } + std::string msvcPath1 = msvcPath+"/../../Vc/Include"; + std::string msvcPath2 = psdkPath+"/Include"; + msvcPath1 = gxSystemTools::CollapseDirectory(msvcPath1.c_str()); + msvcPath2 = gxSystemTools::CollapseDirectory(msvcPath2.c_str()); + std::string vcIncludePath1; + std::string vcIncludePath2; + if(!this->FindData("Vc9/Include", vcIncludePath1) || + !this->FindData("Vc9/PlatformSDK", vcIncludePath2)) + { + return false; + } + + m_GCCXML_FLAGS = + "-U__STDC__ -U__STDC_HOSTED__ " + "-D__stdcall=__attribute__((__stdcall__)) " + "-D__cdecl=__attribute__((__cdecl__)) " + "-D__fastcall=__attribute__((__fastcall__)) " + "-D__thiscall=__attribute__((__thiscall__)) " + "-D_stdcall=__attribute__((__stdcall__)) " + "-D_cdecl=__attribute__((__cdecl__)) " + "-D_fastcall=__attribute__((__fastcall__)) " + "-D_thiscall=__attribute__((__thiscall__)) " + "-D__declspec(x)=__attribute__((x)) -D__pragma(x)= " + "-D__cplusplus -D_inline=inline -D__forceinline=__inline " + "-D_MSC_VER=1500 -D_MSC_EXTENSIONS -D_WIN32 " + "-D_M_IX86 " + "-D_WCHAR_T_DEFINED -DPASCAL= -DRPC_ENTRY= -DSHSTDAPI=HRESULT " + "-D_INTEGRAL_MAX_BITS=64 " + "-D__uuidof(x)=IID() -DSHSTDAPI_(x)=x " + "-D__w64= " + "-D__int8=char " + "-D__int16=short " + "-D__int32=int " + "-D__int64=\"long long\" " + "-D__ptr64= " + "-DSTRSAFE_NO_DEPRECATE " + "-D_CRT_FAR_MAPPINGS_NO_DEPRECATE " + "-D_CRT_MANAGED_FP_NO_DEPRECATE " + "-D_CRT_MANAGED_HEAP_NO_DEPRECATE " + "-D_CRT_NONSTDC_NO_DEPRECATE " + "-D_CRT_OBSOLETE_NO_DEPRECATE " + "-D_CRT_SECURE_NO_DEPRECATE " + "-D_CRT_SECURE_NO_DEPRECATE_GLOBALS " + "-D_CRT_VCCLRIT_NO_DEPRECATE " + "-D_SCL_SECURE_NO_DEPRECATE " + "-D_WINDOWS_SECURE_NO_DEPRECATE " + "-iwrapper\""+vcIncludePath1+"\" " + "-iwrapper\""+vcIncludePath2+"\" " + "-I\""+msvcPath1+"\" " + "-I\""+msvcPath2+"\" "; + return true; +} + //---------------------------------------------------------------------------- bool gxConfiguration::FindFlagsBCC55(const char* inBcc32) { diff --git a/GCC_XML/GXFront/gxConfiguration.h b/GCC_XML/GXFront/gxConfiguration.h index 2c2af26..8fcfe33 100644 --- a/GCC_XML/GXFront/gxConfiguration.h +++ b/GCC_XML/GXFront/gxConfiguration.h @@ -162,6 +162,7 @@ class gxConfiguration bool FindFlagsMSVC71(); bool FindFlagsMSVC8(); bool FindFlagsMSVC8ex(); + bool FindFlagsMSVC9(); bool FindFlagsBCC55(const char* inBcc32); }; diff --git a/GCC_XML/KWSys/CMakeLists.txt b/GCC_XML/KWSys/CMakeLists.txt index 7c4a39c..8d5a46d 100644 --- a/GCC_XML/KWSys/CMakeLists.txt +++ b/GCC_XML/KWSys/CMakeLists.txt @@ -122,6 +122,14 @@ ENDIF(KWSYS_STANDALONE) # The project name is that of the specified namespace. PROJECT(${KWSYS_NAMESPACE}) +# Tell CMake how to follow dependencies of sources in this directory. +IF(COMMAND SET_PROPERTY) + SET_PROPERTY(DIRECTORY + PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM + "KWSYS_HEADER(%)=<${KWSYS_NAMESPACE}/%>" + ) +ENDIF(COMMAND SET_PROPERTY) + # Select library components. IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_ENABLE_C 1) diff --git a/GCC_XML/KWSys/CPU.h.in b/GCC_XML/KWSys/CPU.h.in index 73239ac..6b2e49c 100644 --- a/GCC_XML/KWSys/CPU.h.in +++ b/GCC_XML/KWSys/CPU.h.in @@ -32,6 +32,14 @@ #elif defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA) # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE +/* Arm */ +#elif defined(__arm__) +# if !defined(__ARMEB__) +# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE +# else +# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG +# endif + /* Intel x86 */ #elif defined(__i386) || defined(__i386__) || defined(_M_IX86) # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE diff --git a/GCC_XML/KWSys/DynamicLoader.cxx b/GCC_XML/KWSys/DynamicLoader.cxx index ce22f5a..ff6da4f 100644 --- a/GCC_XML/KWSys/DynamicLoader.cxx +++ b/GCC_XML/KWSys/DynamicLoader.cxx @@ -305,7 +305,7 @@ const char* DynamicLoader::LibExtension() //---------------------------------------------------------------------------- const char* DynamicLoader::LastError() { - LPVOID lpMsgBuf; + LPVOID lpMsgBuf=NULL; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, @@ -317,6 +317,11 @@ const char* DynamicLoader::LastError() NULL ); + if(!lpMsgBuf) + { + return NULL; + } + static char* str = 0; delete [] str; str = strcpy(new char[strlen((char*)lpMsgBuf)+1], (char*)lpMsgBuf); diff --git a/GCC_XML/KWSys/ProcessUNIX.c b/GCC_XML/KWSys/ProcessUNIX.c index 95ea9d5..757dc91 100644 --- a/GCC_XML/KWSys/ProcessUNIX.c +++ b/GCC_XML/KWSys/ProcessUNIX.c @@ -2807,7 +2807,7 @@ static char** kwsysProcessParseVerbatimCommand(const char* command) } } } - else if(isspace(*c)) + else if(isspace((unsigned char) *c)) { if(in_argument) { diff --git a/GCC_XML/KWSys/ProcessWin32.c b/GCC_XML/KWSys/ProcessWin32.c index 1dafabe..0e30dc1 100644 --- a/GCC_XML/KWSys/ProcessWin32.c +++ b/GCC_XML/KWSys/ProcessWin32.c @@ -379,7 +379,7 @@ kwsysProcess* kwsysProcess_New(void) /* Construct the executable name from the process id and kwsysProcess instance. This should be unique. */ - sprintf(fwdName, KWSYS_NAMESPACE_STRING "pew9xfwd_%u_%p.exe", + sprintf(fwdName, KWSYS_NAMESPACE_STRING "pew9xfwd_%ld_%p.exe", GetCurrentProcessId(), cp); /* If we have a temp directory, use it. */ diff --git a/GCC_XML/KWSys/RegularExpression.cxx b/GCC_XML/KWSys/RegularExpression.cxx index d502e85..84cf857 100644 --- a/GCC_XML/KWSys/RegularExpression.cxx +++ b/GCC_XML/KWSys/RegularExpression.cxx @@ -74,6 +74,43 @@ RegularExpression::RegularExpression (const RegularExpression& rxp) { this->regmlen = rxp.regmlen; // Copy remaining private data } +// operator= -- Copies the given regular expression. +RegularExpression& RegularExpression::operator= (const RegularExpression& rxp) +{ + if(this == &rxp) + { + return *this; + } + if ( !rxp.program ) + { + this->program = 0; + return *this; + } + int ind; + this->progsize = rxp.progsize; // Copy regular expression size + delete [] this->program; + this->program = new char[this->progsize]; // Allocate storage + for(ind=this->progsize; ind-- != 0;) // Copy regular expresion + this->program[ind] = rxp.program[ind]; + this->startp[0] = rxp.startp[0]; // Copy pointers into last + this->endp[0] = rxp.endp[0]; // Successful "find" operation + this->regmust = rxp.regmust; // Copy field + if (rxp.regmust != 0) { + char* dum = rxp.program; + ind = 0; + while (dum != rxp.regmust) { + ++dum; + ++ind; + } + this->regmust = this->program + ind; + } + this->regstart = rxp.regstart; // Copy starting index + this->reganch = rxp.reganch; // Copy remaining private data + this->regmlen = rxp.regmlen; // Copy remaining private data + + return *this; +} + // operator== -- Returns true if two regular expressions have the same // compiled program for pattern matching. bool RegularExpression::operator== (const RegularExpression& rxp) const { diff --git a/GCC_XML/KWSys/RegularExpression.hxx.in b/GCC_XML/KWSys/RegularExpression.hxx.in index 9a07844..4411c0b 100644 --- a/GCC_XML/KWSys/RegularExpression.hxx.in +++ b/GCC_XML/KWSys/RegularExpression.hxx.in @@ -233,6 +233,11 @@ public: */ inline kwsys_stl::string::size_type end() const; + /** + * Copy the given regular expression. + */ + RegularExpression& operator= (const RegularExpression& rxp); + /** * Returns true if two regular expressions have the same * compiled program for pattern matching. diff --git a/GCC_XML/KWSys/System.c b/GCC_XML/KWSys/System.c index 92a088d..2ff820e 100644 --- a/GCC_XML/KWSys/System.c +++ b/GCC_XML/KWSys/System.c @@ -74,6 +74,13 @@ static int kwsysSystem_Shell__CharNeedsQuotesOnUnix(char c) (c == '*') || (c == '^') || (c == '\\')); } +/*--------------------------------------------------------------------------*/ +static int kwsysSystem_Shell__CharNeedsQuotesOnWindows(char c) +{ + return ((c == '\'') || (c == '#') || (c == '&') || + (c == '<') || (c == '>') || (c == '|') || (c == '^')); +} + /*--------------------------------------------------------------------------*/ static int kwsysSystem_Shell__CharNeedsQuotes(char c, int isUnix, int flags) { @@ -99,14 +106,10 @@ static int kwsysSystem_Shell__CharNeedsQuotes(char c, int isUnix, int flags) } else { - /* On Windows single-quotes must be escaped in some make - environments, such as in mingw32-make. */ - if(flags & kwsysSystem_Shell_Flag_Make) + /* On Windows several special characters need quotes to preserve them. */ + if(kwsysSystem_Shell__CharNeedsQuotesOnWindows(c)) { - if(c == '\'') - { - return 1; - } + return 1; } } return 0; @@ -380,6 +383,10 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out, *out++ = *c++; } + /* The make variable reference eliminates any escaping needed + for preceding backslashes. */ + windows_backslashes = 0; + /* Stop if we have reached the end of the string. */ if(!*c) { diff --git a/GCC_XML/KWSys/SystemInformation.cxx b/GCC_XML/KWSys/SystemInformation.cxx index f127bef..daf7ba3 100644 --- a/GCC_XML/KWSys/SystemInformation.cxx +++ b/GCC_XML/KWSys/SystemInformation.cxx @@ -218,7 +218,7 @@ class SystemInformationImplementation unsigned int IsHyperThreadingSupported(); LongLong GetCyclesDifference(DELAY_FUNC, unsigned int); - // For Linux + // For Linux and Cygwin, /proc/cpuinfo formats are slightly different int RetreiveInformationFromCpuInfoFile(); kwsys_stl::string ExtractValueFromCpuInfoFile(kwsys_stl::string buffer, const char* word, size_t init=0); @@ -799,8 +799,6 @@ void SystemInformationImplementation::Delay(unsigned int uiMS) bool SystemInformationImplementation::DoesCPUSupportCPUID() { - int CPUIDPresent = 0; - #if USE_ASM_INSTRUCTIONS // Use SEH to determine CPUID presence __try { @@ -829,15 +827,15 @@ bool SystemInformationImplementation::DoesCPUSupportCPUID() __except(1) { // Stop the class from trying to use CPUID again! - CPUIDPresent = false; return false; } + + // The cpuid instruction succeeded. + return true; #else - CPUIDPresent = false; + // Assume no cpuid instruction. + return false; #endif - - // Return true to indicate support or false to indicate lack. - return (CPUIDPresent == 0) ? true : false; } bool SystemInformationImplementation::RetrieveCPUFeatures() @@ -1963,16 +1961,16 @@ bool SystemInformationImplementation::RetrieveClassicalCPUIdentity() case 6: switch (this->ChipID.Model) { - case 1: sprintf (this->ChipID.ProcessorName,"Athlon™ (0.25 micron)"); break; - case 2: sprintf (this->ChipID.ProcessorName,"Athlon™ (0.18 micron)"); break; - case 3: sprintf (this->ChipID.ProcessorName,"Duron™ (SF core)"); break; - case 4: sprintf (this->ChipID.ProcessorName,"Athlon™ (Thunderbird core)"); break; - case 6: sprintf (this->ChipID.ProcessorName,"Athlon™ (Palomino core)"); break; - case 7: sprintf (this->ChipID.ProcessorName,"Duron™ (Morgan core)"); break; + case 1: sprintf (this->ChipID.ProcessorName,"Athlon- (0.25 micron)"); break; + case 2: sprintf (this->ChipID.ProcessorName,"Athlon- (0.18 micron)"); break; + case 3: sprintf (this->ChipID.ProcessorName,"Duron- (SF core)"); break; + case 4: sprintf (this->ChipID.ProcessorName,"Athlon- (Thunderbird core)"); break; + case 6: sprintf (this->ChipID.ProcessorName,"Athlon- (Palomino core)"); break; + case 7: sprintf (this->ChipID.ProcessorName,"Duron- (Morgan core)"); break; case 8: if (this->Features.ExtendedFeatures.SupportsMP) - sprintf (this->ChipID.ProcessorName,"Athlon™ MP (Thoroughbred core)"); - else sprintf (this->ChipID.ProcessorName,"Athlon™ XP (Thoroughbred core)"); + sprintf (this->ChipID.ProcessorName,"Athlon - MP (Thoroughbred core)"); + else sprintf (this->ChipID.ProcessorName,"Athlon - XP (Thoroughbred core)"); break; default: sprintf (this->ChipID.ProcessorName,"Unknown K7 family"); return false; } @@ -2160,41 +2158,60 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() fileSize++; } fclose( fd ); - buffer.resize(fileSize-2); - - // Number of CPUs + // Number of logical CPUs (combination of multiple processors, multi-core + // and hyperthreading) size_t pos = buffer.find("processor\t"); while(pos != buffer.npos) { this->NumberOfLogicalCPU++; - this->NumberOfPhysicalCPU++; pos = buffer.find("processor\t",pos+1); } - // Count the number of physical ids that are the same - int currentId = -1; - kwsys_stl::string idc = this->ExtractValueFromCpuInfoFile(buffer,"physical id"); - +#ifdef __linux + // Find the largest physical id. + int maxId = -1; + kwsys_stl::string idc = + this->ExtractValueFromCpuInfoFile(buffer,"physical id"); while(this->CurrentPositionInFile != buffer.npos) { - int id = atoi(idc.c_str()); - if(id == currentId) + int id = atoi(idc.c_str()); + if(id > maxId) { - this->NumberOfPhysicalCPU--; + maxId=id; } - currentId = id; - idc = this->ExtractValueFromCpuInfoFile(buffer,"physical id",this->CurrentPositionInFile+1); + idc = this->ExtractValueFromCpuInfoFile(buffer,"physical id", + this->CurrentPositionInFile+1); + } + // Physical ids returned by Linux don't distinguish cores. + // We want to record the total number of cores in this->NumberOfPhysicalCPU + // (checking only the first proc) + kwsys_stl::string cores = + this->ExtractValueFromCpuInfoFile(buffer,"cpu cores"); + int numberOfCoresPerCPU=atoi(cores.c_str()); + this->NumberOfPhysicalCPU=numberOfCoresPerCPU*(maxId+1); + +#else // __CYGWIN__ + // does not have "physical id" entries, neither "cpu cores" + // this has to be fixed for hyper-threading. + kwsys_stl::string cpucount = + this->ExtractValueFromCpuInfoFile(buffer,"cpu count"); + this->NumberOfPhysicalCPU= + this->NumberOfLogicalCPU = atoi(cpucount.c_str()); +#endif + // gotta have one, and if this is 0 then we get a / by 0n + // beter to have a bad answer than a crash + if(this->NumberOfPhysicalCPU <= 0) + { + this->NumberOfPhysicalCPU = 1; } - - if(this->NumberOfPhysicalCPU>0) - { - this->NumberOfLogicalCPU /= this->NumberOfPhysicalCPU; - } + // LogicalProcessorsPerPhysical>1 => hyperthreading. + this->Features.ExtendedFeatures.LogicalProcessorsPerPhysical= + this->NumberOfLogicalCPU/this->NumberOfPhysicalCPU; // CPU speed (checking only the first proc kwsys_stl::string CPUSpeed = this->ExtractValueFromCpuInfoFile(buffer,"cpu MHz"); - this->CPUSpeedInMHz = (float)atof(CPUSpeed.c_str()); + this->CPUSpeedInMHz = static_cast(atof(CPUSpeed.c_str())); // Chip family this->ChipID.Family = atoi(this->ExtractValueFromCpuInfoFile(buffer,"cpu family").c_str()); @@ -2215,8 +2232,6 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() cacheSize = cacheSize.substr(0,pos); } this->Features.L1CacheSize = atoi(cacheSize.c_str()); - - return 1; } @@ -2230,13 +2245,19 @@ int SystemInformationImplementation::QueryMemory() #ifdef __CYGWIN__ return 0; #elif _WIN32 +#if _MSC_VER < 1300 MEMORYSTATUS ms; GlobalMemoryStatus(&ms); - - unsigned long tv = ms.dwTotalVirtual; - unsigned long tp = ms.dwTotalPhys; - unsigned long av = ms.dwAvailVirtual; - unsigned long ap = ms.dwAvailPhys; +#define MEM_VAL(value) dw##value +#else + MEMORYSTATUSEX ms; + GlobalMemoryStatusEx(&ms); +#define MEM_VAL(value) ull##value +#endif + unsigned long tv = ms.MEM_VAL(TotalVirtual); + unsigned long tp = ms.MEM_VAL(TotalPhys); + unsigned long av = ms.MEM_VAL(AvailVirtual); + unsigned long ap = ms.MEM_VAL(AvailPhys); this->TotalVirtualMemory = tv>>10>>10; this->TotalPhysicalMemory = tp>>10>>10; this->AvailableVirtualMemory = av>>10>>10; @@ -2586,13 +2607,13 @@ int SystemInformationImplementation::CPUCount() // number of logical processors. unsigned int i = 1; unsigned char PHY_ID_MASK = 0xFF; - unsigned char PHY_ID_SHIFT = 0; + //unsigned char PHY_ID_SHIFT = 0; while (i < this->NumberOfLogicalCPU) { i *= 2; PHY_ID_MASK <<= 1; - PHY_ID_SHIFT++; + // PHY_ID_SHIFT++; } hCurrentProcessHandle = GetCurrentProcess(); @@ -2922,7 +2943,7 @@ bool SystemInformationImplementation::QueryOSInformation() OSVERSIONINFOEX osvi; BOOL bIsWindows64Bit; BOOL bOsVersionInfoEx; - char * operatingSystem = new char [256]; + char operatingSystem[256]; // Try calling GetVersionEx using the OSVERSIONINFOEX structure. ZeroMemory (&osvi, sizeof (OSVERSIONINFOEX)); @@ -2994,7 +3015,7 @@ bool SystemInformationImplementation::QueryOSInformation() } } - sprintf (operatingSystem, "%s(Build %d)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF); + sprintf (operatingSystem, "%s(Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF); this->OSVersion = operatingSystem; } else @@ -3043,7 +3064,7 @@ bool SystemInformationImplementation::QueryOSInformation() if (osvi.dwMajorVersion <= 4) { // NB: NT 4.0 and earlier. - sprintf (operatingSystem, "version %d.%d %s (Build %d)", + sprintf (operatingSystem, "version %ld.%ld %s (Build %ld)", osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.szCSDVersion, @@ -3074,7 +3095,7 @@ bool SystemInformationImplementation::QueryOSInformation() else { // Windows 2000 and everything else. - sprintf (operatingSystem,"%s(Build %d)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF); + sprintf (operatingSystem,"%s(Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF); this->OSVersion = operatingSystem; } break; @@ -3117,8 +3138,6 @@ bool SystemInformationImplementation::QueryOSInformation() this->OSRelease = "Unknown"; break; } - delete [] operatingSystem; - operatingSystem = 0; // Get the hostname WORD wVersionRequested; diff --git a/GCC_XML/KWSys/SystemTools.cxx b/GCC_XML/KWSys/SystemTools.cxx index 5f56cee..237862e 100644 --- a/GCC_XML/KWSys/SystemTools.cxx +++ b/GCC_XML/KWSys/SystemTools.cxx @@ -78,7 +78,7 @@ #endif #define VTK_URL_PROTOCOL_REGEX "([a-zA-Z0-9]*)://(.*)" -#define VTK_URL_REGEX "([a-zA-Z0-9]*)://(([A-Za-z]+)(:([^:@]+))?@)?([^:@/]+)(:([0-9]+))?/(.+)?" +#define VTK_URL_REGEX "([a-zA-Z0-9]*)://(([A-Za-z0-9]+)(:([^:@]+))?@)?([^:@/]+)(:([0-9]+))?/(.+)?" #ifdef _MSC_VER #include @@ -493,6 +493,30 @@ void SystemTools::ReplaceString(kwsys_stl::string& source, free(orig); } +#if defined(KEY_WOW64_32KEY) && defined(KEY_WOW64_64KEY) +# define KWSYS_ST_KEY_WOW64_32KEY KEY_WOW64_32KEY +# define KWSYS_ST_KEY_WOW64_64KEY KEY_WOW64_64KEY +#else +# define KWSYS_ST_KEY_WOW64_32KEY 0x0200 +# define KWSYS_ST_KEY_WOW64_64KEY 0x0100 +#endif + +#if defined(_WIN32) && !defined(__CYGWIN__) +static DWORD SystemToolsMakeRegistryMode(DWORD mode, + SystemTools::KeyWOW64 view) +{ + if(view == SystemTools::KeyWOW64_32) + { + return mode | KWSYS_ST_KEY_WOW64_32KEY; + } + else if(view == SystemTools::KeyWOW64_64) + { + return mode | KWSYS_ST_KEY_WOW64_64KEY; + } + return mode; +} +#endif + // Read a registry value. // Example : // HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath @@ -501,7 +525,8 @@ void SystemTools::ReplaceString(kwsys_stl::string& source, // => will return the data of the "Root" value of the key #if defined(_WIN32) && !defined(__CYGWIN__) -bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value) +bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value, + KeyWOW64 view) { bool valueset = false; kwsys_stl::string primary = key; @@ -549,7 +574,7 @@ bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value) if(RegOpenKeyEx(primaryKey, second.c_str(), 0, - KEY_READ, + SystemToolsMakeRegistryMode(KEY_READ, view), &hKey) != ERROR_SUCCESS) { return false; @@ -589,7 +614,8 @@ bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value) return valueset; } #else -bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &) +bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &, + KeyWOW64) { return false; } @@ -604,7 +630,8 @@ bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &) // => will set the data of the "Root" value of the key #if defined(_WIN32) && !defined(__CYGWIN__) -bool SystemTools::WriteRegistryValue(const char *key, const char *value) +bool SystemTools::WriteRegistryValue(const char *key, const char *value, + KeyWOW64 view) { kwsys_stl::string primary = key; kwsys_stl::string second; @@ -654,7 +681,7 @@ bool SystemTools::WriteRegistryValue(const char *key, const char *value) 0, "", REG_OPTION_NON_VOLATILE, - KEY_WRITE, + SystemToolsMakeRegistryMode(KEY_WRITE, view), NULL, &hKey, &dwDummy) != ERROR_SUCCESS) @@ -674,7 +701,7 @@ bool SystemTools::WriteRegistryValue(const char *key, const char *value) return false; } #else -bool SystemTools::WriteRegistryValue(const char *, const char *) +bool SystemTools::WriteRegistryValue(const char *, const char *, KeyWOW64) { return false; } @@ -688,7 +715,7 @@ bool SystemTools::WriteRegistryValue(const char *, const char *) // => will delete the data of the "Root" value of the key #if defined(_WIN32) && !defined(__CYGWIN__) -bool SystemTools::DeleteRegistryValue(const char *key) +bool SystemTools::DeleteRegistryValue(const char *key, KeyWOW64 view) { kwsys_stl::string primary = key; kwsys_stl::string second; @@ -735,7 +762,7 @@ bool SystemTools::DeleteRegistryValue(const char *key) if(RegOpenKeyEx(primaryKey, second.c_str(), 0, - KEY_WRITE, + SystemToolsMakeRegistryMode(KEY_WRITE, view), &hKey) != ERROR_SUCCESS) { return false; @@ -752,7 +779,7 @@ bool SystemTools::DeleteRegistryValue(const char *key) return false; } #else -bool SystemTools::DeleteRegistryValue(const char *) +bool SystemTools::DeleteRegistryValue(const char *, KeyWOW64) { return false; } @@ -3125,9 +3152,9 @@ void SystemTools::SplitPath(const char* p, if(root.size() == 1) { #if defined(_WIN32) && !defined(__CYGWIN__) - if(const char* p = getenv("USERPROFILE")) + if(const char* userp = getenv("USERPROFILE")) { - homedir = p; + homedir = userp; } else #endif @@ -4279,10 +4306,10 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() } res += " "; - sprintf(buffer, "%d", osvi.dwMajorVersion); + sprintf(buffer, "%ld", osvi.dwMajorVersion); res += buffer; res += "."; - sprintf(buffer, "%d", osvi.dwMinorVersion); + sprintf(buffer, "%ld", osvi.dwMinorVersion); res += buffer; } @@ -4304,7 +4331,7 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() if (lRet == ERROR_SUCCESS) { res += " Service Pack 6a (Build "; - sprintf(buffer, "%d", osvi.dwBuildNumber & 0xFFFF); + sprintf(buffer, "%ld", osvi.dwBuildNumber & 0xFFFF); res += buffer; res += ")"; } @@ -4313,7 +4340,7 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() res += " "; res += osvi.szCSDVersion; res += " (Build "; - sprintf(buffer, "%d", osvi.dwBuildNumber & 0xFFFF); + sprintf(buffer, "%ld", osvi.dwBuildNumber & 0xFFFF); res += buffer; res += ")"; } @@ -4325,7 +4352,7 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() res += " "; res += osvi.szCSDVersion; res += " (Build "; - sprintf(buffer, "%d", osvi.dwBuildNumber & 0xFFFF); + sprintf(buffer, "%ld", osvi.dwBuildNumber & 0xFFFF); res += buffer; res += ")"; } diff --git a/GCC_XML/KWSys/SystemTools.hxx.in b/GCC_XML/KWSys/SystemTools.hxx.in index 1de89e0..825c272 100644 --- a/GCC_XML/KWSys/SystemTools.hxx.in +++ b/GCC_XML/KWSys/SystemTools.hxx.in @@ -707,20 +707,30 @@ public: * ----------------------------------------------------------------- */ + /** + * Specify access to the 32-bit or 64-bit application view of + * registry values. The default is to match the currently running + * binary type. + */ + enum KeyWOW64 { KeyWOW64_Default, KeyWOW64_32, KeyWOW64_64 }; + /** * Read a registry value */ - static bool ReadRegistryValue(const char *key, kwsys_stl::string &value); + static bool ReadRegistryValue(const char *key, kwsys_stl::string &value, + KeyWOW64 view = KeyWOW64_Default); /** * Write a registry value */ - static bool WriteRegistryValue(const char *key, const char *value); + static bool WriteRegistryValue(const char *key, const char *value, + KeyWOW64 view = KeyWOW64_Default); /** * Delete a registry value */ - static bool DeleteRegistryValue(const char *key); + static bool DeleteRegistryValue(const char *key, + KeyWOW64 view = KeyWOW64_Default); /** ----------------------------------------------------------------- * Environment Manipulation Routines diff --git a/GCC_XML/KWSys/Terminal.c b/GCC_XML/KWSys/Terminal.c index 19a268a..b492c2f 100644 --- a/GCC_XML/KWSys/Terminal.c +++ b/GCC_XML/KWSys/Terminal.c @@ -141,20 +141,38 @@ static const char* kwsysTerminalVT100Names[] = "con80x43", "con80x50", "con80x60", + "cons25", "console", "cygwin", + "dtterm", + "eterm-color", + "gnome", + "gnome-256color", "konsole", "konsole-256color", + "kterm", "linux", "msys", + "linux-c", + "mach-color", + "mlterm", + "putty", "rxvt", + "rxvt-cygwin", + "rxvt-cygwin-native", "rxvt-unicode", "screen", "screen-256color", + "screen-bce", + "screen-w", + "screen.linux", "vt100", "xterm", - "xterm-color", + "xterm-16color", "xterm-256color", + "xterm-88color", + "xterm-color", + "xterm-debian", 0 }; diff --git a/GCC_XML/KWSys/kwsysDateStamp.cmake b/GCC_XML/KWSys/kwsysDateStamp.cmake index f4d2a8e..6513cfd 100644 --- a/GCC_XML/KWSys/kwsysDateStamp.cmake +++ b/GCC_XML/KWSys/kwsysDateStamp.cmake @@ -4,7 +4,7 @@ SET(KWSYS_DATE_STAMP_YEAR 2008) # KWSys version date month component. Format is MM. -SET(KWSYS_DATE_STAMP_MONTH 04) +SET(KWSYS_DATE_STAMP_MONTH 07) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 08) +SET(KWSYS_DATE_STAMP_DAY 10) diff --git a/GCC_XML/Support/GCC/find_flags b/GCC_XML/Support/GCC/find_flags index 0f923fd..a9676d8 100755 --- a/GCC_XML/Support/GCC/find_flags +++ b/GCC_XML/Support/GCC/find_flags @@ -43,7 +43,7 @@ INCLUDES=` awk '/^[^ \/].*$/ { if (f) { printf("\n"); exit } } /^[ ]*\/[^ ]*$/ { if (f) { printf("-I%s ",$0) } } /\#include <\.\.\..*$/ {f=1} ' - | - sed 's/^-I /-I/;s/ -I / -I/g' + sed 's/^-I /-isystem/;s/ -I / -isystem/g' ` # The support headers are located where this script is. diff --git a/GCC_XML/VcInstall/CMakeLists.txt b/GCC_XML/VcInstall/CMakeLists.txt index b8dbdcd..d40de88 100644 --- a/GCC_XML/VcInstall/CMakeLists.txt +++ b/GCC_XML/VcInstall/CMakeLists.txt @@ -36,6 +36,8 @@ ADD_CUSTOM_COMMAND( ${GCCXML_SOURCE_DIR}/VcInstall/vc8ExpressInclude.patch ${GCCXML_SOURCE_DIR}/VcInstall/vc8ExpressPlatformSDK.patch ${GCCXML_SOURCE_DIR}/VcInstall/vc8sp1ExpressInclude.patch + ${GCCXML_SOURCE_DIR}/VcInstall/vc9Include.patch + ${GCCXML_SOURCE_DIR}/VcInstall/vc9PlatformSDK.patch ) ADD_CUSTOM_TARGET(vcInstallPatch DEPENDS ${GCCXML_BINARY_DIR}/vcInstall_stamp.c) diff --git a/GCC_XML/VcInstall/vc9Include.patch b/GCC_XML/VcInstall/vc9Include.patch new file mode 100644 index 0000000..7a25f0f --- /dev/null +++ b/GCC_XML/VcInstall/vc9Include.patch @@ -0,0 +1,1945 @@ +Index: algorithm +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/algorithm,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** algorithm 29 Jan 2008 21:05:21 -0000 1.1 +--- algorithm 21 Apr 2008 14:19:05 -0000 1.2 +*************** +*** 11,16 **** +--- 11,51 ---- + #pragma warning(disable: 4244) + #endif /* _MSC_VER */ + ++ /* ------------------------------------------------------------------------ */ ++ /* Forward declare these now because they are used as non-dependent names. */ ++ _STDEXT_BEGIN ++ template ++ inline _OutIt unchecked_remove_copy(_InIt _First, _InIt _Last, ++ _OutIt _Dest, const _Ty& _Val); ++ template ++ inline _OutIt unchecked_remove_copy_if(_InIt _First, _InIt _Last, ++ _OutIt _Dest, _Pr _Pred); ++ template ++ inline _OutIt unchecked_merge(_InIt1 _First1, _InIt1 _Last1, ++ _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest); ++ template ++ inline _OutIt unchecked_merge(_InIt1 _First1, _InIt1 _Last1, ++ _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, ++ _Pr _Pred); ++ template ++ inline _BidIt3 _Unchecked_merge_backward(_BidIt1 _First1, _BidIt1 _Last1, ++ _BidIt2 _First2, _BidIt2 _Last2, ++ _BidIt3 _Dest); ++ template ++ inline _BidIt3 _Unchecked_merge_backward(_BidIt1 _First1, _BidIt1 _Last1, ++ _BidIt2 _First2, _BidIt2 _Last2, ++ _BidIt3 _Dest, _Pr _Pred); ++ template ++ inline void _Unchecked_chunked_merge(_BidIt _First, _BidIt _Last, ++ _OutIt _Dest, _Diff _Chunk, ++ _Diff _Count); ++ template ++ inline void _Unchecked_chunked_merge(_BidIt _First, _BidIt _Last, ++ _OutIt _Dest, _Diff _Chunk, ++ _Diff _Count, _Pr _Pred); ++ _STDEXT_END ++ /* ------------------------------------------------------------------------ */ ++ + _STD_BEGIN + + // COMMON SORT PARAMETERS +Index: crtdefs.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/crtdefs.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** crtdefs.h 29 Jan 2008 21:05:21 -0000 1.1 +--- crtdefs.h 21 Apr 2008 13:38:16 -0000 1.2 +*************** typedef __time64_t time_t; /* time +*** 654,752 **** + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(_ReturnType, _FuncName, _DstType, _Dst) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size]) \ + { \ +! return _FuncName(_Dst, _Size); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1) \ + { \ +! return _FuncName(_Dst, _Size, _TArg1); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! return _FuncName(_Dst, _Size, _TArg1, _TArg2); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! return _FuncName(_Dst, _Size, _TArg1, _TArg2, _TArg3); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3, _TType4, _TArg4) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3, _TType4 _TArg4) \ + { \ +! return _FuncName(_Dst, _Size, _TArg1, _TArg2, _TArg3, _TArg4); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(_ReturnType, _FuncName, _HType1, _HArg1, _DstType, _Dst, _TType1, _TArg1) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Size], _TType1 _TArg1) \ + { \ +! return _FuncName(_HArg1, _Dst, _Size, _TArg1); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(_ReturnType, _FuncName, _HType1, _HArg1, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! return _FuncName(_HArg1, _Dst, _Size, _TArg1, _TArg2); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(_ReturnType, _FuncName, _HType1, _HArg1, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! return _FuncName(_HArg1, _Dst, _Size, _TArg1, _TArg2, _TArg3); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(_ReturnType, _FuncName, _HType1, _HArg1, _HType2, _HArg2, _DstType, _Dst) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _HType2 _HArg2, _DstType (&_Dst)[_Size]) \ + { \ +! return _FuncName(_HArg1, _HArg2, _Dst, _Size); \ + } \ + } + +--- 654,752 ---- + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(_ReturnType, _FuncName, _DstType, _Dst) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz]) \ + { \ +! return _FuncName(_Dst, _Sz); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1) \ + { \ +! return _FuncName(_Dst, _Sz, _TArg1); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! return _FuncName(_Dst, _Sz, _TArg1, _TArg2); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! return _FuncName(_Dst, _Sz, _TArg1, _TArg2, _TArg3); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3, _TType4, _TArg4) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3, _TType4 _TArg4) \ + { \ +! return _FuncName(_Dst, _Sz, _TArg1, _TArg2, _TArg3, _TArg4); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(_ReturnType, _FuncName, _HType1, _HArg1, _DstType, _Dst, _TType1, _TArg1) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Sz], _TType1 _TArg1) \ + { \ +! return _FuncName(_HArg1, _Dst, _Sz, _TArg1); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(_ReturnType, _FuncName, _HType1, _HArg1, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! return _FuncName(_HArg1, _Dst, _Sz, _TArg1, _TArg2); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(_ReturnType, _FuncName, _HType1, _HArg1, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! return _FuncName(_HArg1, _Dst, _Sz, _TArg1, _TArg2, _TArg3); \ + } \ + } + + #define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(_ReturnType, _FuncName, _HType1, _HArg1, _HType2, _HArg2, _DstType, _Dst) \ + extern "C++" \ + { \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _HType2 _HArg2, _DstType (&_Dst)[_Sz]) \ + { \ +! return _FuncName(_HArg1, _HArg2, _Dst, _Sz); \ + } \ + } + +*************** typedef __time64_t time_t; /* time +*** 755,767 **** + { \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg1); \ +! return _VFuncName(_Dst, _Size, _TArg1, _ArgList); \ + } \ + __pragma(warning(pop)); \ + } +--- 755,767 ---- + { \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg1); \ +! return _VFuncName(_Dst, _Sz, _TArg1, _ArgList); \ + } \ + __pragma(warning(pop)); \ + } +*************** typedef __time64_t time_t; /* time +*** 771,783 **** + { \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg2); \ +! return _VFuncName(_Dst, _Size, _TArg1, _TArg2, _ArgList); \ + } \ + __pragma(warning(pop)); \ + } +--- 771,783 ---- + { \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg2); \ +! return _VFuncName(_Dst, _Sz, _TArg1, _TArg2, _ArgList); \ + } \ + __pragma(warning(pop)); \ + } +*************** typedef __time64_t time_t; /* time +*** 914,924 **** + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size), _Dst); \ + } \ + template <> \ + inline \ +--- 914,924 ---- + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 959,970 **** + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size]) \ + { \ + size_t _SizeRead = 0; \ +! errno_t _Err = _FuncName##_s(_Dst + 2, (_Size - 2) < ((size_t)_Dst[0]) ? (_Size - 2) : ((size_t)_Dst[0]), &_SizeRead); \ + _Dst[1] = (_DstType)(_SizeRead); \ + return (_Err == 0 ? _Dst + 2 : 0); \ + } \ +--- 959,970 ---- + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz]) \ + { \ + size_t _SizeRead = 0; \ +! errno_t _Err = _FuncName##_s(_Dst + 2, (_Sz - 2) < ((size_t)_Dst[0]) ? (_Sz - 2) : ((size_t)_Dst[0]), &_SizeRead); \ + _Dst[1] = (_DstType)(_SizeRead); \ + return (_Err == 0 ? _Dst + 2 : 0); \ + } \ +*************** typedef __time64_t time_t; /* time +*** 1014,1024 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +--- 1014,1024 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1059,1069 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1, _TArg2), _Dst); \ + } \ + template <> \ + inline \ +--- 1059,1069 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz, _TArg1, _TArg2), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1104,1114 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1, _TArg2, _TArg3), _Dst); \ + } \ + template <> \ + inline \ +--- 1104,1114 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz, _TArg1, _TArg2, _TArg3), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1149,1159 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3, _TArg4); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3, _TType4 _TArg4) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1, _TArg2, _TArg3, _TArg4), _Dst); \ + } \ + template <> \ + inline \ +--- 1149,1159 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3, _TArg4); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3, _TType4 _TArg4) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz, _TArg1, _TArg2, _TArg3, _TArg4), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1194,1204 **** + { \ + return __insecure_##_FuncName(_HArg1, _Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Size], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_HArg1, _Dst, _Size, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +--- 1194,1204 ---- + { \ + return __insecure_##_FuncName(_HArg1, _Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _DstType (&_Dst)[_Sz], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_HArg1, _Dst, _Sz, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1239,1249 **** + { \ + return __insecure_##_FuncName(_HArg1, _HArg2, _Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _HType2 _HArg2, _DstType (&_Dst)[_Size]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_HArg1, _HArg2, _Dst, _Size), _Dst); \ + } \ + template <> \ + inline \ +--- 1239,1249 ---- + { \ + return __insecure_##_FuncName(_HArg1, _HArg2, _Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_HType1 _HArg1, _HType2 _HArg2, _DstType (&_Dst)[_Sz]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_HArg1, _HArg2, _Dst, _Sz), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1300,1312 **** + \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg1); \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Size, _TArg1, _ArgList), _Dst); \ + } \ + __pragma(warning(pop)); \ + \ +--- 1300,1312 ---- + \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg1); \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Sz, _TArg1, _ArgList), _Dst); \ + } \ + __pragma(warning(pop)); \ + \ +*************** typedef __time64_t time_t; /* time +*** 1344,1354 **** + { \ + return __insecure_##_VFuncName(_Dst, _TArg1, _ArgList); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _VFuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, va_list _ArgList) \ + { \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Size, _TArg1, _ArgList), _Dst); \ + } \ + template <> \ + inline \ +--- 1344,1354 ---- + { \ + return __insecure_##_VFuncName(_Dst, _TArg1, _ArgList); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _VFuncName(_DstType (&_Dst)[_Sz], _TType1 _TArg1, va_list _ArgList) \ + { \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Sz, _TArg1, _ArgList), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1405,1417 **** + \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg2); \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Size, _TArg1, _TArg2, _ArgList), _Dst); \ + } \ + __pragma(warning(pop)); \ + \ +--- 1405,1417 ---- + \ + __pragma(warning(push)); \ + __pragma(warning(disable: 4793)); \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, ...) \ + { \ + va_list _ArgList; \ + _crt_va_start(_ArgList, _TArg2); \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Sz, _TArg1, _TArg2, _ArgList), _Dst); \ + } \ + __pragma(warning(pop)); \ + \ +*************** typedef __time64_t time_t; /* time +*** 1449,1459 **** + { \ + return __insecure_##_VFuncName(_Dst, _TArg1, _TArg2, _ArgList); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _VFuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, va_list _ArgList) \ + { \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Size, _TArg1, _TArg2, _ArgList), _Dst); \ + } \ + template <> \ + inline \ +--- 1449,1459 ---- + { \ + return __insecure_##_VFuncName(_Dst, _TArg1, _TArg2, _ArgList); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _VFuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, va_list _ArgList) \ + { \ +! _ReturnPolicy(_SecureVFuncName(_Dst, _Sz, _TArg1, _TArg2, _ArgList), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1494,1505 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2); \ + } \ +! template \ + inline \ +! size_t __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2) \ + { \ + size_t _Ret = 0; \ +! _SecureFuncName(&_Ret, _Dst, _Size, _TArg1, _TArg2); \ + return (_Ret > 0 ? (_Ret - 1) : _Ret); \ + } \ + template <> \ +--- 1494,1505 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2); \ + } \ +! template \ + inline \ +! size_t __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2) \ + { \ + size_t _Ret = 0; \ +! _SecureFuncName(&_Ret, _Dst, _Sz, _TArg1, _TArg2); \ + return (_Ret > 0 ? (_Ret - 1) : _Ret); \ + } \ + template <> \ +*************** typedef __time64_t time_t; /* time +*** 1543,1554 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3); \ + } \ +! template \ + inline \ +! size_t __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ + size_t _Ret = 0; \ +! _SecureFuncName(&_Ret, _Dst, _Size, _TArg1, _TArg2, _TArg3); \ + return (_Ret > 0 ? (_Ret - 1) : _Ret); \ + } \ + template <> \ +--- 1543,1554 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3); \ + } \ +! template \ + inline \ +! size_t __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ + size_t _Ret = 0; \ +! _SecureFuncName(&_Ret, _Dst, _Sz, _TArg1, _TArg2, _TArg3); \ + return (_Ret > 0 ? (_Ret - 1) : _Ret); \ + } \ + template <> \ +*************** typedef __time64_t time_t; /* time +*** 1590,1600 **** + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size), _Dst); \ + } \ + template <> \ + inline \ +--- 1590,1600 ---- + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1633,1643 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +--- 1633,1643 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1676,1686 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1, _TArg2), _Dst); \ + } \ + template <> \ + inline \ +--- 1676,1686 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz, _TArg1, _TArg2), _Dst); \ + } \ + template <> \ + inline \ +*************** typedef __time64_t time_t; /* time +*** 1719,1729 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1, _TArg2, _TArg3), _Dst); \ + } \ + template <> \ + inline \ +--- 1719,1729 ---- + { \ + return __insecure_##_FuncName(_Dst, _TArg1, _TArg2, _TArg3); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Sz], _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Sz, _TArg1, _TArg2, _TArg3), _Dst); \ + } \ + template <> \ + inline \ +Index: deque +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/deque,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** deque 29 Jan 2008 21:05:21 -0000 1.1 +--- deque 21 Apr 2008 15:37:01 -0000 1.2 +*************** public: +*** 61,68 **** + _Deque_const_iterator<_Ty, _Alloc, false>, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend _Deque_const_iterator<_Ty, _Alloc, false>; +! friend _Deque_const_iterator<_Ty, _Alloc, true>; + + _Deque_const_iterator<_Ty, _Alloc, false> _Checked_iterator_base() const + { +--- 61,67 ---- + _Deque_const_iterator<_Ty, _Alloc, false>, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend class _Deque_const_iterator<_Ty, _Alloc, !_SECURE_VALIDATION>; + + _Deque_const_iterator<_Ty, _Alloc, false> _Checked_iterator_base() const + { +*************** public: +*** 356,363 **** + _Deque_iterator<_Ty, _Alloc, false>, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend _Deque_iterator<_Ty, _Alloc, false>; +! friend _Deque_iterator<_Ty, _Alloc, true>; + + _Deque_iterator<_Ty, _Alloc, false> _Checked_iterator_base() const + { +--- 355,361 ---- + _Deque_iterator<_Ty, _Alloc, false>, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend class _Deque_iterator<_Ty, _Alloc, !_SECURE_VALIDATION>; + + _Deque_iterator<_Ty, _Alloc, false> _Checked_iterator_base() const + { +*************** public: +*** 376,382 **** + { // construct with null vector pointer + } + +! _Deque_iterator(size_type _Off, const _Mybase::_Mydequebase *_Pdeque) + : _Mybase(_Off, _Pdeque) + { // construct with offset _Off in *_Pdeque + } +--- 374,380 ---- + { // construct with null vector pointer + } + +! _Deque_iterator(size_type _Off, const typename _Mybase::_Mydequebase *_Pdeque) + : _Mybase(_Off, _Pdeque) + { // construct with offset _Off in *_Pdeque + } +Index: eh.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/eh.h,v +retrieving revision 1.1 +retrieving revision 1.3 +diff -c -3 -p -r1.1 -r1.3 +*** eh.h 29 Jan 2008 21:05:21 -0000 1.1 +--- eh.h 21 Apr 2008 13:53:32 -0000 1.3 +*************** +*** 30,35 **** +--- 30,38 ---- + #error "eh.h is only for C++!" + #endif + ++ namespace std { class type_info; } ++ using std::type_info; ++ + /* terminate_handler is the standard name; terminate_function is supported for historical reasons */ + #ifndef _M_CEE_PURE + typedef void (__cdecl *terminate_function)(); +Index: iosfwd +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/iosfwd,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** iosfwd 29 Jan 2008 21:05:21 -0000 1.1 +--- iosfwd 21 Apr 2008 14:07:00 -0000 1.2 +*************** struct _Secure_char_traits_tag +*** 145,150 **** +--- 145,184 ---- + { + }; + ++ /* ------------------------------------------------------------------------ */ ++ /* Forward declare these now because they are used as non-dependent names. */ ++ namespace _Traits_helper ++ { ++ template ++ inline ++ typename _Traits::char_type *copy_s(typename _Traits::char_type *_First1, size_t _Size, ++ const typename _Traits::char_type *_First2, size_t _Count); ++ template ++ inline ++ typename _Traits::char_type *copy_s(typename _Traits::char_type *_First1, size_t _Size, ++ const typename _Traits::char_type *_First2, size_t _Count, _Secure_char_traits_tag); ++ template ++ inline ++ _SCL_INSECURE_DEPRECATE ++ typename _Traits::char_type *copy_s(typename _Traits::char_type *_First1, size_t _Size, ++ const typename _Traits::char_type *_First2, size_t _Count, _Unsecure_char_traits_tag); ++ template ++ inline ++ typename _Traits::char_type *move_s(typename _Traits::char_type *_First1, size_t _Size, ++ const typename _Traits::char_type *_First2, size_t _Count); ++ template ++ inline ++ typename _Traits::char_type *move_s(typename _Traits::char_type *_First1, size_t _Size, ++ const typename _Traits::char_type *_First2, size_t _Count, _Secure_char_traits_tag); ++ template ++ inline ++ _SCL_INSECURE_DEPRECATE ++ typename _Traits::char_type *move_s(typename _Traits::char_type *_First1, size_t _Size, ++ const typename _Traits::char_type *_First2, size_t _Count, _Unsecure_char_traits_tag); ++ ++ } // namespace _Traits_helper ++ /* ------------------------------------------------------------------------ */ ++ + // TEMPLATE STRUCT _Char_traits_base + // Used to define the Secure_char_traits tag. This typedef is used + // only for user defined char_traits. A user defined char_traits should +Index: iterator +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/iterator,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** iterator 29 Jan 2008 21:05:21 -0000 1.1 +--- iterator 21 Apr 2008 14:18:44 -0000 1.2 +*************** template ::pointer, + typename _STD iterator_traits<_Iter>::reference> + { +! friend class checked_iterator; + public: + typedef checked_iterator<_Cont, _Iter> _Myt; + typedef typename _STD iterator_traits<_Iter>::difference_type difference_type; +--- 361,367 ---- + typename _STD iterator_traits<_Iter>::pointer, + typename _STD iterator_traits<_Iter>::reference> + { +! //friend class checked_iterator; + public: + typedef checked_iterator<_Cont, _Iter> _Myt; + typedef typename _STD iterator_traits<_Iter>::difference_type difference_type; +Index: limits +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/limits,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** limits 29 Jan 2008 21:05:21 -0000 1.1 +--- limits 21 Apr 2008 15:37:21 -0000 1.2 +*************** _STCONSDEF(_Num_base, int, min_exponent) +*** 93,110 **** + _STCONSDEF(_Num_base, int, min_exponent10) + _STCONSDEF(_Num_base, int, radix) + + // TEMPLATE CLASS numeric_limits + template + class numeric_limits + : public _Num_base + { // numeric limits for arbitrary type _Ty (say little or nothing) + public: +! static _Ty (__CRTDECL min)() _THROW0() + { // return minimum value + return (_Ty(0)); + } + +! static _Ty (__CRTDECL max)() _THROW0() + { // return maximum value + return (_Ty(0)); + } +--- 93,112 ---- + _STCONSDEF(_Num_base, int, min_exponent10) + _STCONSDEF(_Num_base, int, radix) + ++ #define __GCCXML_AVOID_MACRO_EXPANSION ++ + // TEMPLATE CLASS numeric_limits + template + class numeric_limits + : public _Num_base + { // numeric limits for arbitrary type _Ty (say little or nothing) + public: +! static _Ty __CRTDECL min __GCCXML_AVOID_MACRO_EXPANSION() _THROW0() + { // return minimum value + return (_Ty(0)); + } + +! static _Ty __CRTDECL max __GCCXML_AVOID_MACRO_EXPANSION() _THROW0() + { // return maximum value + return (_Ty(0)); + } +Index: list +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/list,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** list 29 Jan 2008 21:05:21 -0000 1.1 +--- list 21 Apr 2008 15:37:01 -0000 1.2 +*************** public: +*** 191,198 **** + _Const_iterator, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend _Const_iterator; +! friend _Const_iterator; + + _Const_iterator _Checked_iterator_base() const + { +--- 191,197 ---- + _Const_iterator, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend class _Const_iterator; + + _Const_iterator _Checked_iterator_base() const + { +*************** public: +*** 373,380 **** + _Iterator, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend _Iterator; +! friend _Iterator; + + _Iterator _Checked_iterator_base() const + { +--- 372,378 ---- + _Iterator, + _Unchanged_checked_iterator_base_type_tag>::_Result _Checked_iterator_base_type; + +! friend class _Iterator; + + _Iterator _Checked_iterator_base() const + { +Index: locale +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/locale,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** locale 29 Jan 2008 21:05:21 -0000 1.1 +--- locale 24 Apr 2008 03:14:54 -0000 1.2 +*************** public: +*** 64,71 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT collate<_Elem>( +! _Locinfo(_Ploc->name())); + return (_X_COLLATE); + } + +--- 64,73 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT collate<_Elem>(_Loc); +! } + return (_X_COLLATE); + } + +Index: memory +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/memory,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** memory 29 Jan 2008 21:05:21 -0000 1.1 +--- memory 21 Apr 2008 14:19:05 -0000 1.2 +*************** +*** 10,15 **** +--- 10,26 ---- + #pragma pack(push,_CRT_PACKING) + #pragma warning(push,3) + #endif /* _MSC_VER */ ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Forward declare these now because they are used as non-dependent names. */ ++ _STDEXT_BEGIN ++ template ++ inline _FwdIt unchecked_uninitialized_copy(_InIt _First, _InIt _Last, _FwdIt _Dest); ++ template ++ inline _FwdIt unchecked_uninitialized_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, _Alloc& _Al); ++ _STDEXT_END ++ /* ------------------------------------------------------------------------ */ ++ + _STD_BEGIN + + // TEMPLATE FUNCTION get_temporary_buffer +Index: sal.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/sal.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** sal.h 29 Jan 2008 21:05:21 -0000 1.1 +--- sal.h 21 Apr 2008 13:36:06 -0000 1.2 +*************** +*** 107,113 **** + + // choose attribute or __declspec implementation + #ifndef _USE_DECLSPECS_FOR_SAL +! #define _USE_DECLSPECS_FOR_SAL 0 + #endif + + #if _USE_DECLSPECS_FOR_SAL +--- 107,113 ---- + + // choose attribute or __declspec implementation + #ifndef _USE_DECLSPECS_FOR_SAL +! #define _USE_DECLSPECS_FOR_SAL 1 + #endif + + #if _USE_DECLSPECS_FOR_SAL +Index: setjmp.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/setjmp.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** setjmp.h 29 Jan 2008 21:05:21 -0000 1.1 +--- setjmp.h 21 Apr 2008 14:19:23 -0000 1.2 +*************** int __cdecl setjmp(_Out_ jmp_buf _Buf); +*** 253,259 **** + #ifdef __cplusplus + extern "C" + { +! _CRTIMP __declspec(noreturn) void __cdecl longjmp(_In_ jmp_buf _Buf, _In_ int _Value) throw(...); + } + #else + _CRTIMP __declspec(noreturn) void __cdecl longjmp(_In_ jmp_buf _Buf, _In_ int _Value); +--- 253,259 ---- + #ifdef __cplusplus + extern "C" + { +! _CRTIMP __declspec(noreturn) void __cdecl longjmp(_In_ jmp_buf _Buf, _In_ int _Value); + } + #else + _CRTIMP __declspec(noreturn) void __cdecl longjmp(_In_ jmp_buf _Buf, _In_ int _Value); +Index: typeinfo +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/typeinfo,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** typeinfo 29 Jan 2008 21:05:21 -0000 1.1 +--- typeinfo 21 Apr 2008 13:53:32 -0000 1.2 +*************** struct __type_info_node { +*** 40,45 **** +--- 40,46 ---- + + extern __type_info_node __type_info_root_node; + ++ namespace std { + class type_info { + public: + virtual ~type_info(); +*************** private: +*** 56,61 **** +--- 57,64 ---- + _CRTIMP_PURE static const char *__CLRCALL_OR_CDECL _Name_base(const type_info *,__type_info_node* __ptype_info_node); + _CRTIMP_PURE static void __CLRCALL_OR_CDECL _Type_info_dtor(type_info *); + }; ++ } ++ using std::type_info; + + #if _HAS_EXCEPTIONS + +Index: vector +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/vector,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** vector 29 Jan 2008 21:05:21 -0000 1.1 +--- vector 21 Apr 2008 15:37:38 -0000 1.2 +*************** public: +*** 2243,2249 **** + + void flip() + { // toggle all elements +! for (_Vbtype::iterator _Next = _Myvec.begin(); + _Next != _Myvec.end(); ++_Next) + *_Next = (_Vbase)~*_Next; + _Trim(_Mysize); +--- 2243,2249 ---- + + void flip() + { // toggle all elements +! for (typename _Vbtype::iterator _Next = _Myvec.begin(); + _Next != _Myvec.end(); ++_Next) + *_Next = (_Vbase)~*_Next; + _Trim(_Mysize); +Index: xhash +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xhash,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xhash 29 Jan 2008 21:05:21 -0000 1.1 +--- xhash 21 Apr 2008 15:37:53 -0000 1.2 +*************** public: +*** 260,266 **** + } + + protected: +! typename _Mylist::_Iterator<0> _Mypos; + }; + + typedef _List_position _Myvec_value_type; +--- 260,266 ---- + } + + protected: +! typename _Mylist::template _Iterator<0> _Mypos; + }; + + typedef _List_position _Myvec_value_type; +Index: xlocale +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xlocale,v +retrieving revision 1.1 +retrieving revision 1.3 +diff -c -3 -p -r1.1 -r1.3 +*** xlocale 29 Jan 2008 21:05:21 -0000 1.1 +--- xlocale 21 Apr 2008 14:06:27 -0000 1.3 +*************** template +*** 54,59 **** +--- 54,61 ---- + class locale; + template + const _Facet& __CRTDECL use_facet(const locale&); ++ template ++ class collate; + + // warning 4412 is benign here + #pragma warning(push) +*************** public: +*** 782,789 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>( +! _Locinfo(_Ploc->name())); + return (_X_CTYPE); + } + +--- 784,793 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>(_Loc); +! } + return (_X_CTYPE); + } + +*************** public: +*** 900,907 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>( +! _Locinfo(_Ploc->name())); + return (_X_CTYPE); + } + +--- 904,913 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>(_Loc); +! } + return (_X_CTYPE); + } + +*************** public: +*** 1142,1149 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>( +! _Locinfo(_Ploc->name())); + return (_X_CTYPE); + } + +--- 1148,1157 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>(_Loc); +! } + return (_X_CTYPE); + } + +*************** public: +*** 1484,1491 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT ctype<_Elem>( +! _Locinfo(_Ploc->name())); + return (_X_CTYPE); + } + +--- 1492,1501 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT ctype<_Elem>(_Loc); +! } + return (_X_CTYPE); + } + +*************** public: +*** 1789,1796 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT ctype<_Elem>( +! _Locinfo(_Ploc->name())); + return (_X_CTYPE); + } + +--- 1799,1808 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT ctype<_Elem>(_Loc); +! } + return (_X_CTYPE); + } + +*************** public: +*** 2030,2037 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT ctype<_Elem>( +! _Locinfo(_Ploc->name())); + return (_X_CTYPE); + } + +--- 2042,2051 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT ctype<_Elem>(_Loc); +! } + return (_X_CTYPE); + } + +*************** public: +*** 2304,2311 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT ctype<_Elem>( +! _Locinfo(_Ploc->name())); + return (_X_CTYPE); + } + +--- 2318,2327 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT ctype<_Elem>(_Loc); +! } + return (_X_CTYPE); + } + +Index: xlocmes +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xlocmes,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xlocmes 29 Jan 2008 21:05:21 -0000 1.1 +--- xlocmes 24 Apr 2008 03:14:54 -0000 1.2 +*************** public: +*** 76,83 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT messages<_Elem>( +! _Locinfo(_Ploc->name())); + return (_X_MESSAGES); + } + +--- 76,85 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT messages<_Elem>(_Loc); +! } + return (_X_MESSAGES); + } + +Index: xlocmon +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xlocmon,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xlocmon 29 Jan 2008 21:05:21 -0000 1.1 +--- xlocmon 24 Apr 2008 03:14:54 -0000 1.2 +*************** public: +*** 280,287 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT moneypunct<_Elem, _Intl>( +! _Locinfo(_Ploc->name()), 0, true); + return (_X_MONETARY); + } + +--- 280,289 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT moneypunct<_Elem, _Intl>(_Loc, 0, true); +! } + return (_X_MONETARY); + } + +*************** public: +*** 373,380 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT money_get<_Elem, _InIt>( +! _Locinfo(_Ploc->name())); + return (_X_MONETARY); + } + +--- 375,384 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT money_get<_Elem, _InIt>(_Loc); +! } + return (_X_MONETARY); + } + +*************** public: +*** 666,673 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT money_put<_Elem, _OutIt>( +! _Locinfo(_Ploc->name())); + return (_X_MONETARY); + } + +--- 670,679 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT money_put<_Elem, _OutIt>(_Loc); +! } + return (_X_MONETARY); + } + +Index: xlocnum +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xlocnum,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xlocnum 29 Jan 2008 21:05:21 -0000 1.1 +--- xlocnum 24 Apr 2008 03:14:54 -0000 1.2 +*************** public: +*** 111,118 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT numpunct<_Elem>( +! _Locinfo(_Ploc->name()), 0, true); + return (_X_NUMERIC); + } + +--- 111,120 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT numpunct<_Elem>(_Loc, 0, true); +! } + return (_X_NUMERIC); + } + +*************** public: +*** 239,246 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT num_get<_Elem, _InIt>( +! _Locinfo(_Ploc->name())); + return (_X_NUMERIC); + } + +--- 241,250 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT num_get<_Elem, _InIt>(_Loc); +! } + return (_X_NUMERIC); + } + +*************** public: +*** 1032,1039 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT num_put<_Elem, _OutIt>( +! _Locinfo(_Ploc->name())); + return (_X_NUMERIC); + } + +--- 1036,1045 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT num_put<_Elem, _OutIt>(_Loc); +! } + return (_X_NUMERIC); + } + +Index: xloctime +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xloctime,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xloctime 29 Jan 2008 21:05:21 -0000 1.1 +--- xloctime 24 Apr 2008 03:14:54 -0000 1.2 +*************** public: +*** 97,104 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT time_get<_Elem, _InIt>( +! _Locinfo(_Ploc->name())); + return (_X_TIME); + } + +--- 97,106 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT time_get<_Elem, _InIt>(_Loc); +! } + return (_X_TIME); + } + +*************** public: +*** 458,465 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT time_put<_Elem, _OutIt>( +! _Locinfo(_Ploc->name())); + return (_X_TIME); + } + +--- 460,469 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT time_put<_Elem, _OutIt>(_Loc); +! } + return (_X_TIME); + } + +*************** public: +*** 591,598 **** + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! *_Ppf = _NEW_CRT time_put<_Elem, _OutIt>( +! _Locinfo(_Ploc->name())); + return (_X_TIME); + } + +--- 595,604 ---- + const locale *_Ploc = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) +! { +! _Locinfo _Loc(_Ploc->name()); +! *_Ppf = _NEW_CRT time_put<_Elem, _OutIt>(_Loc); +! } + return (_X_TIME); + } + +Index: xstddef +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xstddef,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xstddef 29 Jan 2008 21:05:21 -0000 1.1 +--- xstddef 21 Apr 2008 13:36:23 -0000 1.2 +*************** _STD_BEGIN +*** 33,39 **** + #endif /* _THROWS */ + + #define _THROW0() throw () +! #define _THROW1(x) throw (...) + + #define _THROW(x, y) throw x(y) + #define _THROW_NCEE(x, y) _THROW(x, y) +--- 33,39 ---- + #endif /* _THROWS */ + + #define _THROW0() throw () +! #define _THROW1(x) throw (x) + + #define _THROW(x, y) throw x(y) + #define _THROW_NCEE(x, y) _THROW(x, y) +Index: xutility +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/xutility,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xutility 29 Jan 2008 21:05:21 -0000 1.1 +--- xutility 21 Apr 2008 13:54:00 -0000 1.2 +*************** +*** 12,19 **** +--- 12,48 ---- + #pragma warning(push,3) + #endif /* _MSC_VER */ + ++ /* GCC-XML simulation of MSVC builtin __is_base_of. */ ++ #define __is_base_of(base, derived) \ ++ __gccxml_is_base_of< base , derived >::value ++ template ++ struct __gccxml_is_base_of ++ { ++ typedef char(&yes_type)[1]; ++ typedef char(&no_type)[2]; ++ static yes_type check(_Base*); ++ static no_type check(const volatile void*); ++ static _Derived* derived(); ++ static const bool value = sizeof(check(derived())) == sizeof(yes_type); ++ }; ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Forward declare these now because they are used as non-dependent names. */ ++ _STDEXT_BEGIN ++ template class checked_array_iterator; ++ template ++ checked_array_iterator<_Iter> make_checked_array_iterator(_Iter _Ptr, size_t _Size); ++ _STDEXT_END ++ /* ------------------------------------------------------------------------ */ ++ + _STD_BEGIN + ++ /* ------------------------------------------------------------------------ */ ++ /* Forward declare these now because they are used as non-dependent names. */ ++ class out_of_range; ++ class invalid_argument; ++ /* ------------------------------------------------------------------------ */ ++ + // RANGE CHECKED ITERATOR TAGS + struct _Unchecked_iterator_tag + { +*************** template inl +*** 992,999 **** + __CLRCALL_OR_CDECL _Iter_random(const _Iter1&, const _Iter2&) + { // return category from iterator argument + typename _Iter_random_helper< +! iterator_traits<_Iter1>::iterator_category, +! iterator_traits<_Iter2>::iterator_category>::_Iter_random_cat _Cat; + return (_Cat); + } + +--- 1021,1028 ---- + __CLRCALL_OR_CDECL _Iter_random(const _Iter1&, const _Iter2&) + { // return category from iterator argument + typename _Iter_random_helper< +! typename iterator_traits<_Iter1>::iterator_category, +! typename iterator_traits<_Iter2>::iterator_category>::_Iter_random_cat _Cat; + return (_Cat); + } + +*************** template::iterator_category, +! iterator_traits<_Iter2>::iterator_category, +! iterator_traits<_Iter3>::iterator_category>::_Iter_random_cat _Cat; + return (_Cat); + } + +--- 1034,1042 ---- + __CLRCALL_OR_CDECL _Iter_random(const _Iter1&, const _Iter2&, const _Iter3&) + { // return category from iterator argument + typename _Iter_random_helper3< +! typename iterator_traits<_Iter1>::iterator_category, +! typename iterator_traits<_Iter2>::iterator_category, +! typename iterator_traits<_Iter3>::iterator_category>::_Iter_random_cat _Cat; + return (_Cat); + } + +*************** public: +*** 2136,2142 **** + + _Checked_iterator_base_type _Checked_iterator_base() const + { +! typename _Checked_iterator_base_type _Base(_CHECKED_BASE(this->current)); + return _Base; + } + +--- 2165,2171 ---- + + _Checked_iterator_base_type _Checked_iterator_base() const + { +! _Checked_iterator_base_type _Base(_CHECKED_BASE(this->current)); + return _Base; + } + +Index: yvals.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/yvals.h,v +retrieving revision 1.1 +retrieving revision 1.4 +diff -c -3 -p -r1.1 -r1.4 +*** yvals.h 29 Jan 2008 21:05:21 -0000 1.1 +--- yvals.h 21 Apr 2008 15:38:15 -0000 1.4 +*************** +*** 116,122 **** + #define _STR2WSTR(str) __STR2WSTR(str) + + #define __FILEW__ _STR2WSTR(__FILE__) +! #define __FUNCTIONW__ _STR2WSTR(__FUNCTION__) + + /* _SECURE_SCL switches: default values */ + +--- 116,122 ---- + #define _STR2WSTR(str) __STR2WSTR(str) + + #define __FILEW__ _STR2WSTR(__FILE__) +! #define __FUNCTIONW__ L"" + + /* _SECURE_SCL switches: default values */ + +*************** +*** 181,186 **** +--- 181,206 ---- + + #endif + ++ /* ------------------------------------------------------------------------ */ ++ /* Forward declare these now because they are used as non-dependent names. */ ++ #ifdef _DEBUG ++ ++ #if !defined(_NATIVE_WCHAR_T_DEFINED) && defined(_M_CEE_PURE) ++ extern "C++" ++ #else ++ extern "C" ++ #endif ++ _CRTIMP void __cdecl _invalid_parameter(_In_opt_z_ const wchar_t *, _In_opt_z_ const wchar_t *, _In_opt_z_ const wchar_t *, unsigned int, uintptr_t); ++ ++ #else /* _DEBUG */ ++ ++ extern "C" ++ _CRTIMP void __cdecl _invalid_parameter_noinfo(void); ++ ++ #endif /* def _DEBUG */ ++ /* ------------------------------------------------------------------------ */ ++ ++ + #if _SECURE_SCL_THROWS + + #define _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT _Xinvarg() +*************** _STD_END +*** 529,536 **** + /* VC++ COMPILER PARAMETERS */ + #define _LONGLONG __int64 + #define _ULONGLONG unsigned __int64 +! #define _LLONG_MAX 0x7fffffffffffffff +! #define _ULLONG_MAX 0xffffffffffffffff + + /* INTEGER PROPERTIES */ + #define _C2 1 /* 0 if not 2's complement */ +--- 549,556 ---- + /* VC++ COMPILER PARAMETERS */ + #define _LONGLONG __int64 + #define _ULONGLONG unsigned __int64 +! #define _LLONG_MAX 0x7fffffffffffffffi64 +! #define _ULLONG_MAX 0xffffffffffffffffui64 + + /* INTEGER PROPERTIES */ + #define _C2 1 /* 0 if not 2's complement */ +Index: CodeAnalysis/sourceannotations.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/CodeAnalysis/sourceannotations.h,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -c -3 -p -r1.2 -r1.3 +*** CodeAnalysis/sourceannotations.h 29 Feb 2008 16:31:44 -0000 1.2 +--- CodeAnalysis/sourceannotations.h 29 Feb 2008 16:33:19 -0000 1.3 +*************** typedef unsigned short wchar_t; +*** 32,38 **** + + #ifdef __cplusplus + #define SA( id ) id +! #define REPEATABLE [repeatable] + #else // !__cplusplus + #define SA( id ) SA_##id + #define REPEATABLE +--- 32,38 ---- + + #ifdef __cplusplus + #define SA( id ) id +! #define REPEATABLE + #else // !__cplusplus + #define SA( id ) SA_##id + #define REPEATABLE +*************** typedef enum SA( AccessType ) SA( Access +*** 66,72 **** + #ifndef SAL_NO_ATTRIBUTE_DECLARATIONS + + REPEATABLE +- [source_annotation_attribute( SA( Parameter ) )] + struct PreAttribute + { + #ifdef __cplusplus +--- 66,71 ---- +*************** struct PreAttribute +*** 97,103 **** + }; + + REPEATABLE +- [source_annotation_attribute( SA( Parameter )|SA( ReturnValue ) )] + struct PostAttribute + { + #ifdef __cplusplus +--- 96,101 ---- +*************** struct PostAttribute +*** 128,134 **** + const wchar_t* Condition; + }; + +- [source_annotation_attribute( SA( Parameter ) )] + struct FormatStringAttribute + { + #ifdef __cplusplus +--- 126,131 ---- +*************** struct FormatStringAttribute +*** 140,146 **** + }; + + REPEATABLE +- [source_annotation_attribute( SA( ReturnValue ) )] + struct InvalidCheckAttribute + { + #ifdef __cplusplus +--- 137,142 ---- +*************** struct InvalidCheckAttribute +*** 150,156 **** + long Value; + }; + +- [source_annotation_attribute( SA( Method ) )] + struct SuccessAttribute + { + #ifdef __cplusplus +--- 146,151 ---- +*************** struct SuccessAttribute +*** 161,167 **** + }; + + REPEATABLE +- [source_annotation_attribute( SA( Parameter ) )] + struct PreBoundAttribute + { + #ifdef __cplusplus +--- 156,161 ---- +*************** struct PreBoundAttribute +*** 171,177 **** + }; + + REPEATABLE +- [source_annotation_attribute( SA( Parameter )|SA( ReturnValue ) )] + struct PostBoundAttribute + { + #ifdef __cplusplus +--- 165,170 ---- +*************** struct PostBoundAttribute +*** 181,187 **** + }; + + REPEATABLE +- [source_annotation_attribute( SA( Parameter ) )] + struct PreRangeAttribute + { + #ifdef __cplusplus +--- 174,179 ---- +*************** struct PreRangeAttribute +*** 193,199 **** + }; + + REPEATABLE +- [source_annotation_attribute( SA( Parameter )|SA( ReturnValue ) )] + struct PostRangeAttribute + { + #ifdef __cplusplus +--- 185,190 ---- diff --git a/GCC_XML/VcInstall/vc9PlatformSDK.patch b/GCC_XML/VcInstall/vc9PlatformSDK.patch new file mode 100644 index 0000000..3e7d0f2 --- /dev/null +++ b/GCC_XML/VcInstall/vc9PlatformSDK.patch @@ -0,0 +1,383 @@ +Index: OAIdl.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/PlatformSDK/OAIdl.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** OAIdl.h 29 Jan 2008 21:05:24 -0000 1.1 +--- OAIdl.h 21 Apr 2008 14:20:46 -0000 1.2 +*************** struct tagVARIANT +*** 442,448 **** + FLOAT fltVal; + DOUBLE dblVal; + VARIANT_BOOL boolVal; +! _VARIANT_BOOL bool; + SCODE scode; + CY cyVal; + DATE date; +--- 442,448 ---- + FLOAT fltVal; + DOUBLE dblVal; + VARIANT_BOOL boolVal; +! // _VARIANT_BOOL bool; + SCODE scode; + CY cyVal; + DATE date; +*************** struct tagVARIANT +*** 457,463 **** + FLOAT *pfltVal; + DOUBLE *pdblVal; + VARIANT_BOOL *pboolVal; +! _VARIANT_BOOL *pbool; + SCODE *pscode; + CY *pcyVal; + DATE *pdate; +--- 457,463 ---- + FLOAT *pfltVal; + DOUBLE *pdblVal; + VARIANT_BOOL *pboolVal; +! // _VARIANT_BOOL *pbool; + SCODE *pscode; + CY *pcyVal; + DATE *pdate; +Index: ObjBase.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/PlatformSDK/ObjBase.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** ObjBase.h 29 Jan 2008 21:05:24 -0000 1.1 +--- ObjBase.h 21 Apr 2008 15:30:52 -0000 1.2 +*************** extern "C++" +*** 237,243 **** + template void** IID_PPV_ARGS_Helper(T** pp) + { + // make sure everyone derives from IUnknown +! static_cast(*pp); + + return reinterpret_cast(pp); + } +--- 237,243 ---- + template void** IID_PPV_ARGS_Helper(T** pp) + { + // make sure everyone derives from IUnknown +! //static_cast(*pp); + + return reinterpret_cast(pp); + } +Index: PropIdl.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/PlatformSDK/PropIdl.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** PropIdl.h 29 Jan 2008 21:05:24 -0000 1.1 +--- PropIdl.h 21 Apr 2008 14:20:46 -0000 1.2 +*************** struct tag_inner_PROPVARIANT +*** 310,316 **** + FLOAT fltVal; + DOUBLE dblVal; + VARIANT_BOOL boolVal; +! _VARIANT_BOOL bool; + SCODE scode; + CY cyVal; + DATE date; +--- 310,316 ---- + FLOAT fltVal; + DOUBLE dblVal; + VARIANT_BOOL boolVal; +! // _VARIANT_BOOL bool; + SCODE scode; + CY cyVal; + DATE date; +Index: WinNT.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/PlatformSDK/WinNT.h,v +retrieving revision 1.1 +retrieving revision 1.3 +diff -c -3 -p -r1.1 -r1.3 +*** WinNT.h 29 Jan 2008 21:05:25 -0000 1.1 +--- WinNT.h 21 Apr 2008 14:22:57 -0000 1.3 +*************** Int64ShllMod32 ( +*** 682,694 **** + DWORD ShiftCount + ) + { +- __asm { +- mov ecx, ShiftCount +- mov eax, dword ptr [Value] +- mov edx, dword ptr [Value+4] +- shld edx, eax, cl +- shl eax, cl +- } + } + + __inline LONGLONG +--- 682,687 ---- +*************** Int64ShraMod32 ( +*** 698,710 **** + DWORD ShiftCount + ) + { +- __asm { +- mov ecx, ShiftCount +- mov eax, dword ptr [Value] +- mov edx, dword ptr [Value+4] +- shrd eax, edx, cl +- sar edx, cl +- } + } + + __inline ULONGLONG +--- 691,696 ---- +*************** Int64ShrlMod32 ( +*** 714,726 **** + DWORD ShiftCount + ) + { +- __asm { +- mov ecx, ShiftCount +- mov eax, dword ptr [Value] +- mov edx, dword ptr [Value+4] +- shrd eax, edx, cl +- shr edx, cl +- } + } + + #if _MSC_VER >= 1200 +--- 700,705 ---- +*************** InterlockedBitTestAndSet ( +*** 3158,3169 **** + IN LONG Bit + ) + { +- __asm { +- mov eax, Bit +- mov ecx, Base +- lock bts [ecx], eax +- setc al +- }; + } + + FORCEINLINE +--- 3137,3142 ---- +*************** InterlockedBitTestAndReset ( +*** 3173,3184 **** + IN LONG Bit + ) + { +- __asm { +- mov eax, Bit +- mov ecx, Base +- lock btr [ecx], eax +- setc al +- }; + } + #pragma warning(pop) + +--- 3146,3151 ---- +*************** InterlockedBitTestAndComplement ( +*** 3214,3225 **** + IN LONG Bit + ) + { +- __asm { +- mov eax, Bit +- mov ecx, Base +- lock btc [ecx], eax +- setc al +- }; + } + #pragma warning(pop) + #endif /* _M_CEE_PURE */ +--- 3181,3186 ---- +*************** _mm_pause ( +*** 3340,3346 **** + #else + + #if !defined(_M_CEE_PURE) +! #define YieldProcessor() __asm { rep nop } + #endif // !defined(_M_CEE_PURE) + + #endif // (_MSC_FULL_VER >= 140041204) +--- 3301,3307 ---- + #else + + #if !defined(_M_CEE_PURE) +! #define YieldProcessor() + #endif // !defined(_M_CEE_PURE) + + #endif // (_MSC_FULL_VER >= 140041204) +*************** MemoryBarrier ( +*** 3364,3372 **** + ) + { + LONG Barrier; +- __asm { +- xchg Barrier, eax +- } + } + #pragma warning( pop ) + +--- 3325,3330 ---- +*************** ReadPMC ( +*** 3409,3419 **** + ) + + { +- +- __asm { +- mov ecx, Counter +- rdpmc +- }; + } + + #endif +--- 3367,3372 ---- +*************** ReadTimeStampCounter ( +*** 3442,3449 **** + ) + + { +- +- __asm rdtsc + } + + #endif +--- 3395,3400 ---- +*************** DbgRaiseAssertionFailure ( +*** 3474,3480 **** + ) + + { +- __asm int 0x2c + } + + #pragma warning( pop ) +--- 3425,3430 ---- +*************** __inline PVOID GetCurrentFiber( void ) { +*** 3495,3506 **** + #pragma warning(push) + #endif + #pragma warning (disable:4035 4793) // disable 4035 (function must return something) +! __inline PVOID GetFiberData( void ) { __asm { +! mov eax, fs:[0x10] +! mov eax,[eax] +! } +! } +! __inline PVOID GetCurrentFiber( void ) { __asm mov eax, fs:[0x10] } + + #if _MSC_VER >= 1200 + #pragma warning(pop) +--- 3445,3452 ---- + #pragma warning(push) + #endif + #pragma warning (disable:4035 4793) // disable 4035 (function must return something) +! __inline PVOID GetFiberData( void ) {} +! __inline PVOID GetCurrentFiber( void ) {} + + #if _MSC_VER >= 1200 + #pragma warning(pop) +*************** typedef enum _ENLISTMENT_INFORMATION_CLA +*** 12655,12661 **** + } ENLISTMENT_INFORMATION_CLASS; + + typedef struct _TRANSACTION_LIST_ENTRY { +! UOW UOW; + } TRANSACTION_LIST_ENTRY, *PTRANSACTION_LIST_ENTRY; + + typedef struct _TRANSACTION_LIST_INFORMATION { +--- 12601,12607 ---- + } ENLISTMENT_INFORMATION_CLASS; + + typedef struct _TRANSACTION_LIST_ENTRY { +! ::UOW UOW; + } TRANSACTION_LIST_ENTRY, *PTRANSACTION_LIST_ENTRY; + + typedef struct _TRANSACTION_LIST_INFORMATION { +*************** __inline struct _TEB * NtCurrentTeb( voi +*** 12942,12948 **** + + #pragma warning (disable:4035) // disable 4035 (function must return something) + +! __inline struct _TEB * NtCurrentTeb( void ) { __asm mov eax, fs:[PcTeb] } + + #if _MSC_VER >= 1200 + #pragma warning(pop) +--- 12888,12894 ---- + + #pragma warning (disable:4035) // disable 4035 (function must return something) + +! __inline struct _TEB * NtCurrentTeb( void ) {} + + #if _MSC_VER >= 1200 + #pragma warning(pop) +Index: ktmtypes.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/PlatformSDK/ktmtypes.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** ktmtypes.h 29 Jan 2008 21:05:27 -0000 1.1 +--- ktmtypes.h 21 Apr 2008 14:22:57 -0000 1.2 +*************** typedef struct _TRANSACTION_NOTIFICATION +*** 138,144 **** + + typedef struct _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT { + GUID EnlistmentId; +! UOW UOW; + } TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT, *PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT; + + typedef ULONG SAVEPOINT_ID, *PSAVEPOINT_ID; +--- 138,144 ---- + + typedef struct _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT { + GUID EnlistmentId; +! ::UOW UOW; + } TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT, *PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT; + + typedef ULONG SAVEPOINT_ID, *PSAVEPOINT_ID; +*************** typedef struct _KCRM_MARSHAL_HEADER { +*** 176,182 **** + } KCRM_MARSHAL_HEADER, *PKCRM_MARSHAL_HEADER, *RESTRICTED_POINTER PRKCRM_MARSHAL_HEADER; + + typedef struct _KCRM_TRANSACTION_BLOB { +! UOW UOW; + GUID TmIdentity; + ULONG IsolationLevel; + ULONG IsolationFlags; +--- 176,182 ---- + } KCRM_MARSHAL_HEADER, *PKCRM_MARSHAL_HEADER, *RESTRICTED_POINTER PRKCRM_MARSHAL_HEADER; + + typedef struct _KCRM_TRANSACTION_BLOB { +! ::UOW UOW; + GUID TmIdentity; + ULONG IsolationLevel; + ULONG IsolationFlags; +Index: specstrings_strict.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/PlatformSDK/specstrings_strict.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** specstrings_strict.h 29 Jan 2008 21:05:29 -0000 1.1 +--- specstrings_strict.h 21 Apr 2008 14:20:25 -0000 1.2 +*************** +*** 1009,1017 **** + *************************************************************************/ + #define __allowed(p) __$allowed_##p + #define __$allowed_as_global_decl /* empty */ +! #define __$allowed_as_statement_with_arg(x) \ +! __pragma(warning(push)) __pragma(warning(disable : 4548)) \ +! do {__noop(x);} while((0,0) __pragma(warning(pop)) ) + #define __$allowed_as_statement __$allowed_as_statement_with_arg(1) + + /************************************************************************** +--- 1009,1015 ---- + *************************************************************************/ + #define __allowed(p) __$allowed_##p + #define __$allowed_as_global_decl /* empty */ +! #define __$allowed_as_statement_with_arg(x) + #define __$allowed_as_statement __$allowed_as_statement_with_arg(1) + + /************************************************************************** diff --git a/GCC_XML/VcInstall/vcInstall.cxx b/GCC_XML/VcInstall/vcInstall.cxx index 198f6cd..e3b59cd 100644 --- a/GCC_XML/VcInstall/vcInstall.cxx +++ b/GCC_XML/VcInstall/vcInstall.cxx @@ -79,7 +79,14 @@ int main(int argc, char* argv[]) "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3;Install Dir"; const char* vc8sdk2Registry = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir"; - + const char* vc9Registry = + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir"; + //"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\9.0;InstallDir"; // _WIN64 ? + const char* vc9exRegistry = + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir"; + //"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\9.0;InstallDir"; // _WIN64 ? + const char* vc9sdkRegistry = + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A;InstallationFolder"; // Check which versions of MSVC are installed. std::string msvc6; std::string msvc7; @@ -87,11 +94,17 @@ int main(int argc, char* argv[]) std::string msvc8; std::string msvc8ex; std::string msvc8sdk; + std::string msvc9; + std::string msvc9sdk; bool have6 = gxSystemTools::ReadRegistryValue(vc6Registry, msvc6); bool have7 = gxSystemTools::ReadRegistryValue(vc7Registry, msvc7); bool have71 = gxSystemTools::ReadRegistryValue(vc71Registry, msvc71); bool have8 = false; bool have8ex = false; + bool have9 = (gxSystemTools::ReadRegistryValue(vc9Registry, msvc9) || + gxSystemTools::ReadRegistryValue(vc9exRegistry, msvc9)); + bool have9sdk = + have9 && gxSystemTools::ReadRegistryValue(vc9sdkRegistry, msvc9sdk); // Look for a VS8 express that is not the beta release. if(gxSystemTools::ReadRegistryValue(vc8exRegistry, msvc8ex)) { @@ -135,23 +148,23 @@ int main(int argc, char* argv[]) } // See if there is anything to do. - if(!have6 && !have7 && !have71 && !have8 && !have8ex) + if(!have6 && !have7 && !have71 && !have8 && !have8ex && !have9) { - std::cout << "None of MSVC 6, 7, 7.1, or 8 is installed.\n"; + std::cout << "None of MSVC 6, 7, 7.1, 8, or 9 is installed.\n"; } // Need to install at least one of the support directories. We need // to find the cat and patch executables. std::string patchCommand; if(!FindTool(patchDir.c_str(), "patch", patchCommand) && - (have6||have7||have71||have8||have8ex)) + (have6||have7||have71||have8||have8ex||have9)) { std::cerr << "Cannot find patch executable.\n"; return 1; } std::string catCommand; if(!FindTool(patchDir.c_str(), "cat", catCommand) && - (have6||have7||have71||have8||have8ex)) + (have6||have7||have71||have8||have8ex||have9)) { std::cerr << "Cannot find cat executable.\n"; return 1; @@ -353,6 +366,52 @@ int main(int argc, char* argv[]) } } + if(have9) + { + std::string msvc9i = msvc9 + "/../../Vc/Include"; + msvc9i = gxSystemTools::CollapseDirectory(msvc9i.c_str()); + std::string patchIname = "vc9Include.patch"; + std::string destPathI = gccxmlRoot+"/Vc9/Include"; + std::string patchI = patchDir + "/" + patchIname; + if(gxSystemTools::FileExists(patchI.c_str())) + { + if(!InstallSupport(patchCommand.c_str(), catCommand.c_str(), + patchI.c_str(), msvc9i.c_str(), destPathI.c_str())) + { + result = 1; + } + } + else + { + std::cerr << "Have MSVC 9, but cannot find " + << patchIname << ".\n"; + result = 1; + } + } + if(have9sdk) + { + std::string msvc9p = msvc9sdk + "/Include"; + msvc9p = gxSystemTools::CollapseDirectory(msvc9p.c_str()); + std::string patchPname = "vc9PlatformSDK.patch"; + std::string destPathP = gccxmlRoot+"/Vc9/PlatformSDK"; + + std::string patchP = patchDir + "/" + patchPname; + if(gxSystemTools::FileExists(patchP.c_str())) + { + if(!InstallSupport(patchCommand.c_str(), catCommand.c_str(), + patchP.c_str(), msvc9p.c_str(), destPathP.c_str())) + { + result = 1; + } + } + else + { + std::cerr << "Have MSVC 9 Platform SDK, but " + << "cannot find " << patchPname << ".\n"; + result = 1; + } + } + // If we succeeded, write the timestamp file. if(result == 0 && (timestamp.length() > 0)) {