From 92f9bed4d74a8af310a14e3b5608dcdcf1598e30 Mon Sep 17 00:00:00 2001 From: GCC-XML Date: Fri, 27 Feb 2009 09:38:08 -0500 Subject: [PATCH] gccxml 2009-02-27 (b43d753b) --- GCC/config_cmake/libiberty_config.h.in | 3 + GCC/gcc/CMakeLists.txt | 5 +- GCC/gcc/cp/cp-tree.h | 9 +- GCC/gcc/cp/method.c | 10 + GCC/gcc/cp/pt.c | 13 + GCC/gcc/cp/xml.c | 88 +- GCC/gcc/diagnostic.c | 4 + GCC/gcc/tree.h | 4 + GCC/include/splay-tree.h | 8 +- GCC_XML/GXFront/gxConfiguration.cxx | 89 +- GCC_XML/GXFront/gxSystemTools.cxx | 7 + GCC_XML/GXFront/gxSystemTools.h | 5 + GCC_XML/KWSys/CMakeLists.txt | 26 + GCC_XML/KWSys/CTestConfig.cmake | 10 +- GCC_XML/KWSys/DynamicLoader.cxx | 11 +- GCC_XML/KWSys/DynamicLoader.hxx.in | 2 - GCC_XML/KWSys/ProcessUNIX.c | 14 +- GCC_XML/KWSys/System.c | 6 + GCC_XML/KWSys/SystemInformation.cxx | 96 +- GCC_XML/KWSys/SystemTools.cxx | 49 +- GCC_XML/KWSys/SystemTools.hxx.in | 31 +- GCC_XML/KWSys/kwsysDateStamp.cmake | 6 +- GCC_XML/KWSys/testProcess.c | 2 +- GCC_XML/Support/CMakeLists.txt | 2 +- GCC_XML/Support/GCC/4.3/gccxml_builtins.h | 13 + GCC_XML/Support/GCC/find_flags | 112 - GCC_XML/Support/gccxml_find_flags | 93 - GCC_XML/Support/gccxml_identify_compiler.cc | 11 + GCC_XML/VcInstall/CMakeLists.txt | 1 + GCC_XML/VcInstall/vc6Include.patch | 21 + GCC_XML/VcInstall/vc71Include.patch | 25 + GCC_XML/VcInstall/vc7Include.patch | 75 +- GCC_XML/VcInstall/vc8ExpressInclude.patch | 29 + GCC_XML/VcInstall/vc8Include.patch | 29 + GCC_XML/VcInstall/vc8sp1Include.patch | 29 + GCC_XML/VcInstall/vc9Include.patch | 60 +- GCC_XML/VcInstall/vc9sp1Include.patch | 2510 +++++++++++++++++++ GCC_XML/VcInstall/vcInstall.cxx | 16 + 38 files changed, 3175 insertions(+), 349 deletions(-) delete mode 100755 GCC_XML/Support/GCC/find_flags delete mode 100755 GCC_XML/Support/gccxml_find_flags create mode 100644 GCC_XML/Support/gccxml_identify_compiler.cc create mode 100644 GCC_XML/VcInstall/vc9sp1Include.patch diff --git a/GCC/config_cmake/libiberty_config.h.in b/GCC/config_cmake/libiberty_config.h.in index 624dbf6..b1a1b49 100644 --- a/GCC/config_cmake/libiberty_config.h.in +++ b/GCC/config_cmake/libiberty_config.h.in @@ -194,6 +194,9 @@ /* Define to 1 if you have the `snprintf' function. */ #cmakedefine HAVE_SNPRINTF @HAVE_SNPRINTF@ +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDDEF_H @HAVE_STDDEF_H@ + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ diff --git a/GCC/gcc/CMakeLists.txt b/GCC/gcc/CMakeLists.txt index 93c3ca0..fd947b4 100644 --- a/GCC/gcc/CMakeLists.txt +++ b/GCC/gcc/CMakeLists.txt @@ -145,7 +145,10 @@ ENDFOREACH(f) IF(WIN32 AND NOT CYGWIN) SET(AWK_EXECUTABLE "${GCC_SOURCE_DIR}/config_cmake/nawk.exe") ELSE(WIN32 AND NOT CYGWIN) - FIND_PROGRAM(AWK_EXECUTABLE NAMES gawk awk) + # Prefer GNU awk at any location over the native awk if possible. + # The native awk on opensolaris causes opt-gather.awk to sort incorrectly. + FIND_PROGRAM(AWK_EXECUTABLE NAMES gawk) + FIND_PROGRAM(AWK_EXECUTABLE NAMES awk) MARK_AS_ADVANCED(AWK_EXECUTABLE) ENDIF(WIN32 AND NOT CYGWIN) diff --git a/GCC/gcc/cp/cp-tree.h b/GCC/gcc/cp/cp-tree.h index 768e371..337d927 100644 --- a/GCC/gcc/cp/cp-tree.h +++ b/GCC/gcc/cp/cp-tree.h @@ -4559,10 +4559,15 @@ extern tree cxx_staticp (tree); extern int cp_gimplify_expr (tree *, tree *, tree *); extern void cp_genericize (tree); -/* BEGIN GCC-XML MODIFICATIONS (2007/10/31 15:08:38) */ +/* BEGIN GCC-XML MODIFICATIONS 2003-11-21 */ /* in xml.c */ extern void do_xml_output PARAMS ((const char *)); -/* END GCC-XML MODIFICATIONS (2007/10/31 15:08:38) */ +/* END GCC-XML MODIFICATIONS 2003-11-21 */ + +/* BEGIN GCC-XML MODIFICATIONS 2008-02-27 */ +/* In FUNCTION_DECL, true for artifical methods that should not exist. */ +#define GCCXML_DECL_ERROR(NODE) DECL_COMMON_CHECK (NODE)->decl_common.gccxml_decl_error +/* END GCC-XML MODIFICATIONS 2008-02-27 */ /* -- end of C++ */ diff --git a/GCC/gcc/cp/method.c b/GCC/gcc/cp/method.c index 2c8d966..cc11a20 100644 --- a/GCC/gcc/cp/method.c +++ b/GCC/gcc/cp/method.c @@ -736,6 +736,10 @@ do_build_assign_ref (tree fndecl) finish_compound_stmt (compound_stmt); } +/* BEGIN GCC-XML MODIFICATIONS 2008-02-27 */ +extern int diagnostic_xml_synthesize_test; +/* END GCC-XML MODIFICATIONS 2008-02-27 */ + /* Synthesize FNDECL, a non-static member function. */ void @@ -748,6 +752,9 @@ synthesize_method (tree fndecl) location_t save_input_location = input_location; int error_count = errorcount; int warning_count = warningcount; +/* BEGIN GCC-XML MODIFICATIONS 2008-02-27 */ + int gccxml_synth_test = diagnostic_xml_synthesize_test; +/* END GCC-XML MODIFICATIONS 2008-02-27 */ /* Reset the source location, we might have been previously deferred, and thus have saved where we were first needed. */ @@ -812,6 +819,9 @@ synthesize_method (tree fndecl) if (error_count != errorcount || warning_count != warningcount) inform ("%Hsynthesized method %qD first required here ", &input_location, fndecl); +/* BEGIN GCC-XML MODIFICATIONS 2008-02-27 */ + GCCXML_DECL_ERROR(fndecl) = diagnostic_xml_synthesize_test != gccxml_synth_test; +/* END GCC-XML MODIFICATIONS 2008-02-27 */ } /* Use EXTRACTOR to locate the relevant function called for each base & diff --git a/GCC/gcc/cp/pt.c b/GCC/gcc/cp/pt.c index ca18b6f..130d155 100644 --- a/GCC/gcc/cp/pt.c +++ b/GCC/gcc/cp/pt.c @@ -4382,6 +4382,12 @@ classtype_mangled_name (tree t) return TYPE_IDENTIFIER (t); } +/* BEGIN GCC-XML MODIFICATIONS 2008-01-05 */ +/* xml.c uses this to suppress pending templates when testing whether + synthesizing an artificially-generated function succeeds. */ +extern bool diagnostic_get_xml_synthesize_test(); +/* END GCC-XML MODIFICATIONS 2008-01-05 */ + static void add_pending_template (tree d) { @@ -4391,6 +4397,13 @@ add_pending_template (tree d) tree pt; int level; +/* BEGIN GCC-XML MODIFICATIONS 2008-01-05 */ + if(diagnostic_get_xml_synthesize_test()) + { + return; + } +/* END GCC-XML MODIFICATIONS 2008-01-05 */ + if (TI_PENDING_TEMPLATE_FLAG (ti)) return; diff --git a/GCC/gcc/cp/xml.c b/GCC/gcc/cp/xml.c index 9c88de7..dd02bfd 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.124 $" +#define GCC_XML_C_VERSION "$Revision: 1.128 $" /*--------------------------------------------------------------------------*/ /* Data structures for the actual XML dump. */ @@ -1100,7 +1100,74 @@ xml_document_add_attribute_static_method(xml_document_element_p element) } /*--------------------------------------------------------------------------*/ -/* Print XML attributes virtual="" and pure_virtual="" for a decl. */ +static int +xml_print_overrides_r (xml_dump_info_p xdi, tree type, tree fndecl); + +static int +xml_print_overrides (xml_dump_info_p xdi, tree type, tree fndecl) +{ + tree binfo = TYPE_BINFO (type); + tree base_binfo; + int ix; + int found = 0; + + for (ix = 0; BINFO_BASE_ITERATE (binfo, ix, base_binfo); ix++) + { + tree basetype = BINFO_TYPE (base_binfo); + + if (TYPE_POLYMORPHIC_P (basetype)) + { + found += xml_print_overrides_r (xdi, basetype, fndecl); + } + } + return found; +} + +/* Look in TYPE for virtual functions overrides by FNDECL. Check both + TYPE itself and its bases. */ +static int +xml_print_overrides_r (xml_dump_info_p xdi, tree type, tree fndecl) +{ + tree fn = look_for_overrides_here (type, fndecl); + + if (fn) + { + int id = xml_add_node (xdi, fn, 1); + + if(id) + { + fprintf (xdi->file, "_%d ", id); + } + + return 1; + } + + /* We failed to find one declared in this class. Look in its bases. */ + return xml_print_overrides (xdi, type, fndecl); +} + +static void +xml_print_overrides_method_attribute (xml_dump_info_p xdi, tree d) +{ + if (DECL_VIRTUAL_P (d)) + { + fprintf (xdi->file, " overrides=\""); + xml_print_overrides(xdi, CP_DECL_CONTEXT(d), d); + fprintf (xdi->file, "\""); + } +} + +static void +xml_document_add_attribute_overrides_method(xml_document_element_p element) +{ + xml_document_add_attribute(element, "overrides", + xml_document_attribute_type_idrefs, + xml_document_attribute_use_optional, 0); +} + +/*--------------------------------------------------------------------------*/ +/* Print XML attributes virtual="", overrides="", and pure_virtual="" + for a decl. */ static void xml_print_virtual_method_attributes (xml_dump_info_p xdi, tree d) { @@ -1113,6 +1180,8 @@ xml_print_virtual_method_attributes (xml_dump_info_p xdi, tree d) { fprintf (xdi->file, " pure_virtual=\"1\""); } + + xml_print_overrides_method_attribute(xdi, d); } static void @@ -1124,6 +1193,7 @@ xml_document_add_attribute_virtual_method(xml_document_element_p element) xml_document_add_attribute(element, "pure_virtual", xml_document_attribute_type_boolean, xml_document_attribute_use_optional, "0"); + xml_document_add_attribute_overrides_method(element); } /*--------------------------------------------------------------------------*/ @@ -3273,16 +3343,16 @@ xml_add_node (xml_dump_info_p xdi, tree n, int complete) synthesize_method (n); pop_from_top_level (); - /* If an error occurred (and was suppressed) then this function is - invalid and should not be included. */ - if(diagnostic_xml_synthesize_test > 1) - { - diagnostic_xml_synthesize_test = 0; - return 0; - } + /* Error messages have been converted to GCCXML_DECL_ERROR marks. */ diagnostic_xml_synthesize_test = 0; } + /* Skip synthesized invalid compiler-generated functions. */ + if (TREE_CODE (n) == FUNCTION_DECL && GCCXML_DECL_ERROR (n)) + { + return 0; + } + /* Some nodes don't need to be dumped and just refer to other nodes. These nodes should can have index zero because they should never be referenced. */ diff --git a/GCC/gcc/diagnostic.c b/GCC/gcc/diagnostic.c index ccedb6a..72fffaa 100644 --- a/GCC/gcc/diagnostic.c +++ b/GCC/gcc/diagnostic.c @@ -178,6 +178,10 @@ static bool diagnostic_in_xml_synthesize_test() } return false; } +bool diagnostic_get_xml_synthesize_test() +{ + return diagnostic_xml_synthesize_test > 0; +} /* END GCC-XML MODIFICATIONS 2008-10-01 */ /* Count a diagnostic. Return true if the message should be printed. */ diff --git a/GCC/gcc/tree.h b/GCC/gcc/tree.h index ecd98b2..281b4d1 100644 --- a/GCC/gcc/tree.h +++ b/GCC/gcc/tree.h @@ -2570,6 +2570,10 @@ struct tree_decl_common GTY(()) parm decl. */ unsigned gimple_reg_flag : 1; unsigned call_clobbered_flag : 1; +/* BEGIN GCC-XML MODIFICATIONS 2008-02-27 */ + /* In FUNCTION_DECL, true for artifical methods that should not exist. */ + unsigned gccxml_decl_error : 1; +/* END GCC-XML MODIFICATIONS 2008-02-27 */ union tree_decl_u1 { /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is diff --git a/GCC/include/splay-tree.h b/GCC/include/splay-tree.h index 5d90134..545ca37 100644 --- a/GCC/include/splay-tree.h +++ b/GCC/include/splay-tree.h @@ -44,8 +44,12 @@ extern "C" { these types, if necessary. These types should be sufficiently wide that any pointer or scalar can be cast to these types, and then cast back, without loss of precision. */ -typedef unsigned long int splay_tree_key; -typedef unsigned long int splay_tree_value; +/* BEGIN GCC-XML MODIFICATIONS 2009-02-05 */ +/* For GCC-XML this is size_t instead of unsigned long int to support + 64-bit compilers that have a 32-bit long. */ +typedef size_t splay_tree_key; +typedef size_t splay_tree_value; +/* END GCC-XML MODIFICATIONS 2009-02-05 */ /* Forward declaration for a node in the tree. */ typedef struct splay_tree_node_s *splay_tree_node; diff --git a/GCC_XML/GXFront/gxConfiguration.cxx b/GCC_XML/GXFront/gxConfiguration.cxx index 71292e8..a9268a2 100644 --- a/GCC_XML/GXFront/gxConfiguration.cxx +++ b/GCC_XML/GXFront/gxConfiguration.cxx @@ -985,35 +985,27 @@ std::string gxConfiguration::GetCompilerId() // std::string compilerID("ERROR_unsupported_compiler_in_gxConfiguration_GetCompilerId"); - // Write a temp file such that after preprocessing there should only be - // one "(.*)" chunk in the output. - // - std::string cppFile(GetTempFileName("gx", ".cpp")); - std::ofstream ofs(cppFile.c_str()); - - ofs << "#if defined(__GNUC__)" << std::endl; - ofs << "GCC" << std::endl; - ofs << "#elif defined(__sgi) && defined(_COMPILER_VERSION)" << std::endl; - ofs << "MIPSpro" << std::endl; - ofs << "#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 700)" << std::endl; - ofs << "Intel" << std::endl; - ofs << "#else" << std::endl; - ofs << "ERROR_unsupported_compiler_in_gxConfiguration_GetCompilerId" << std::endl; - ofs << "#endif" << std::endl; - - ofs.flush(); - ofs.close(); + std::string cppFile; + if(!this->FindData("gccxml_identify_compiler.cc", cppFile)) + { + return "ERROR_cannot_find_compiler_id_source"; + } // Try running the compiler against the temp file with -E to preprocess - // the input. Then analyze the output looking for the "(.*)" chunk. + // the input. Then analyze the output looking for the id chunk. // std::string output; int retVal=0; - if(gxSystemTools::RunCommand((m_GCCXML_COMPILER + " -E \"" + cppFile + - "\"").c_str(), output, retVal) && (0 == retVal)) + std::string cmd = m_GCCXML_COMPILER; + cmd += " "; + cmd += m_GCCXML_CXXFLAGS; + cmd += " -E \""; + cmd += cppFile; + cmd += "\""; + if(gxSystemTools::RunCommand(cmd.c_str(), output, retVal) && (0 == retVal)) { gxsys::RegularExpression reId; - reId.compile("(.*)"); + reId.compile("GCCXML_SUPPORT=\"(.*)\""); std::vector lines = gxSystemTools::SplitString(output.c_str(), '\n'); std::vector::iterator it; @@ -1031,10 +1023,6 @@ std::string gxConfiguration::GetCompilerId() std::cerr << "error: could not identify compiler via -E preprocessing" << std::endl; } - // Clean up: - // - gxsys::SystemTools::RemoveFile(cppFile.c_str()); - return compilerID; } @@ -1326,7 +1314,7 @@ bool gxConfiguration::FindFlags() { std::cerr << "Compiler \"" << m_GCCXML_COMPILER << "\" is not supported by GCC_XML because " - << "none of MSVC 6, 7, 7.1, 8 is installed.\n"; + << "none of MSVC 6, 7, 7.1, 8, or 9 is installed.\n"; return false; } } @@ -1384,24 +1372,24 @@ bool gxConfiguration::FindFlags() << "(gxConfiguration::FindFlags)\n"; return false; #else - // This is a UNIX environment. Use the gccxml_find_flags script. - std::string gccxmlFindFlags; - std::string gccxmlFindFlagsScript; - if(!this->FindData("gccxml_find_flags", gccxmlFindFlagsScript)) - { - return false; - } - if(gccxmlFindFlagsScript.find(" ") != std::string::npos) + // Determine the compiler. + std::string compilerID = this->GetCompilerId(); + + // For GCC use our C++ implementation to find flags. + if(compilerID == "GCC") { - gccxmlFindFlags = "\""; - gccxmlFindFlags += gccxmlFindFlagsScript; - gccxmlFindFlags += "\""; + return this->FindFlagsGCC(); } - else + + // For other compilers fall back to the old shell scripts. + std::string findFlags; + if(!this->FindData((compilerID+"/find_flags").c_str(), findFlags, true)) { - gccxmlFindFlags = gccxmlFindFlagsScript; + return false; } - gccxmlFindFlags += " "; + std::string gccxmlFindFlags = "\""; + gccxmlFindFlags += findFlags; + gccxmlFindFlags += "\" "; gccxmlFindFlags += m_GCCXML_COMPILER; gccxmlFindFlags += " "; gccxmlFindFlags += m_GCCXML_CXXFLAGS; @@ -1512,7 +1500,7 @@ bool gxConfiguration::FindFlagsGCC() output = ""; retVal = 0; if(gxSystemTools::RunCommand((std::string("echo \"\" | \"") + m_GCCXML_COMPILER + "\" -v -x c++ -E " + - m_GCCXML_CXXFLAGS + " -").c_str(), output, retVal) && (retVal == 0)) + m_GCCXML_CXXFLAGS + " 2>&1 -").c_str(), output, retVal) && (retVal == 0)) { std::vector lines = gxSystemTools::SplitString(output.c_str(), '\n'); @@ -1543,17 +1531,17 @@ bool gxConfiguration::FindFlagsGCC() INCLUDES += " "; } - if (s.find(' ') == s.npos) + if(s.find("/Frameworks") != s.npos) { - INCLUDES += "-I"; - INCLUDES += s; + INCLUDES += "-F"; } else { - INCLUDES += "-I\""; - INCLUDES += s; - INCLUDES += "\""; + INCLUDES += "-isystem"; } + INCLUDES += "\""; + INCLUDES += s; + INCLUDES += "\""; } else { @@ -1584,6 +1572,11 @@ bool gxConfiguration::FindFlagsGCC() INCLUDES = "-iwrapper\"" + supportPath + "/2.96\" " + INCLUDES; } } + else if(MAJOR_VERSION == 4 && MINOR_VERSION >= 3) + { + INCLUDES = "-iwrapper\"" + supportPath + "/4.3\" " + INCLUDES; + SPECIAL = "-include \"gccxml_builtins.h\""; + } else if(MAJOR_VERSION == 4 && MINOR_VERSION >= 2) { INCLUDES = "-iwrapper\"" + supportPath + "/4.2\" " + INCLUDES; diff --git a/GCC_XML/GXFront/gxSystemTools.cxx b/GCC_XML/GXFront/gxSystemTools.cxx index f021d88..a045d10 100644 --- a/GCC_XML/GXFront/gxSystemTools.cxx +++ b/GCC_XML/GXFront/gxSystemTools.cxx @@ -107,3 +107,10 @@ std::string gxSystemTools::CollapseDirectory(const char* in_dir) { return gxsys::SystemTools::CollapseFullPath(in_dir); } + +//---------------------------------------------------------------------------- +bool gxSystemTools::ReadRegistryValue(const char *key, std::string &value) +{ + return SystemTools::ReadRegistryValue(key, value, + SystemTools::KeyWOW64_32); +} diff --git a/GCC_XML/GXFront/gxSystemTools.h b/GCC_XML/GXFront/gxSystemTools.h index 5a0d49b..a918b45 100644 --- a/GCC_XML/GXFront/gxSystemTools.h +++ b/GCC_XML/GXFront/gxSystemTools.h @@ -44,6 +44,11 @@ class gxSystemTools: public gxsys::SystemTools /** Given a path to a directory, convert it to a full path. This * collapses away relative paths. The full path is returned. */ static std::string CollapseDirectory(const char* in_dir); + + /** + * Read a registry value from the 32-bit registry view. + */ + static bool ReadRegistryValue(const char *key, std::string &value); }; #endif diff --git a/GCC_XML/KWSys/CMakeLists.txt b/GCC_XML/KWSys/CMakeLists.txt index 2c64055..645a419 100644 --- a/GCC_XML/KWSys/CMakeLists.txt +++ b/GCC_XML/KWSys/CMakeLists.txt @@ -122,6 +122,16 @@ ENDIF(KWSYS_STANDALONE) # The project name is that of the specified namespace. PROJECT(${KWSYS_NAMESPACE}) +# Some properties we set only with CMake 2.6 and above. +IF(COMMAND SET_PROPERTY) + MACRO(KWSYS_SET_PROPERTY) + SET_PROPERTY(${ARGV}) + ENDMACRO(KWSYS_SET_PROPERTY) +ELSE(COMMAND SET_PROPERTY) + MACRO(KWSYS_SET_PROPERTY) + ENDMACRO(KWSYS_SET_PROPERTY) +ENDIF(COMMAND SET_PROPERTY) + # Tell CMake how to follow dependencies of sources in this directory. IF(COMMAND SET_PROPERTY) SET_PROPERTY(DIRECTORY @@ -729,6 +739,7 @@ FOREACH(c ${KWSYS_CLASSES}) # Configure the header for this class. CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${c}.hxx.in ${KWSYS_HEADER_DIR}/${c}.hxx @ONLY IMMEDIATE) + SET(KWSYS_CXX_SRCS ${KWSYS_CXX_SRCS} ${KWSYS_HEADER_DIR}/${c}.hxx) # Create an install target for the header. IF(KWSYS_INSTALL_INCLUDE_DIR) @@ -747,6 +758,7 @@ FOREACH(h ${KWSYS_H_FILES}) # Configure the header into the given directory. CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${h}.h.in ${KWSYS_HEADER_DIR}/${h}.h @ONLY IMMEDIATE) + SET(KWSYS_C_SRCS ${KWSYS_C_SRCS} ${KWSYS_HEADER_DIR}/${h}.h) # Create an install target for the header. IF(KWSYS_INSTALL_INCLUDE_DIR) @@ -765,6 +777,7 @@ FOREACH(h ${KWSYS_HXX_FILES}) # Configure the header into the given directory. CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${h}.hxx.in ${KWSYS_HEADER_DIR}/${h}.hxx @ONLY IMMEDIATE) + SET(KWSYS_CXX_SRCS ${KWSYS_CXX_SRCS} ${KWSYS_HEADER_DIR}/${h}.hxx) # Create an install target for the header. IF(KWSYS_INSTALL_INCLUDE_DIR) @@ -783,6 +796,7 @@ ENDFOREACH(h) IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS) ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE} ${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS}) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE} PROPERTY LABELS ${KWSYS_LABELS_LIB}) IF(KWSYS_USE_DynamicLoader) IF(UNIX) TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS}) @@ -812,6 +826,7 @@ ENDIF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS) # Add a C-only library if requested. IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS) ADD_LIBRARY(${KWSYS_NAMESPACE}_c ${KWSYS_LIBRARY_TYPE} ${KWSYS_C_SRCS}) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}_c PROPERTY LABELS ${KWSYS_LABELS_LIB}) # Apply user-defined target properties to the library. IF(KWSYS_PROPERTIES_C) @@ -844,6 +859,8 @@ IF(KWSYS_USE_Process) # encode it into a C file. ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c) ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE}) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE}) # Construct the location of the executable to be encoded. SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -906,9 +923,11 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ${KWSYS_C_TESTS} ) ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsC ${KWSYS_C_TEST_SRCS}) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsC PROPERTY LABELS ${KWSYS_LABELS_EXE}) TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsC ${KWSYS_NAMESPACE}_c) FOREACH(test ${KWSYS_C_TESTS}) ADD_TEST(kwsys.${test} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestsC ${test} ${KWSYS_TEST_ARGS_${test}}) + KWSYS_SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST}) ENDFOREACH(test) # C++ tests @@ -932,12 +951,14 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testDynamicLoader) # If kwsys contains the DynamicLoader, need extra library ADD_LIBRARY(${KWSYS_NAMESPACE}TestDynload MODULE testDynload.c) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestDynload PROPERTY LABELS ${KWSYS_LABELS_LIB}) ENDIF(KWSYS_USE_DynamicLoader) CREATE_TEST_SOURCELIST( KWSYS_CXX_TEST_SRCS ${KWSYS_NAMESPACE}TestsCxx.cxx ${KWSYS_CXX_TESTS} ) ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_CXX_TEST_SRCS}) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE}) TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_NAMESPACE}) SET(TEST_SYSTEMTOOLS_BIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/testSystemTools.bin") @@ -984,16 +1005,19 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ) FOREACH(test ${KWSYS_CXX_TESTS}) ADD_TEST(kwsys.${test} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestsCxx ${test} ${KWSYS_TEST_ARGS_${test}}) + KWSYS_SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST}) ENDFOREACH(test) # Process tests. ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestProcess testProcess.c) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestProcess PROPERTY LABELS ${KWSYS_LABELS_EXE}) TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestProcess ${KWSYS_NAMESPACE}_c) IF(NOT CYGWIN) SET(KWSYS_TEST_PROCESS_7 7) ENDIF(NOT CYGWIN) FOREACH(n 1 2 3 4 5 6 ${KWSYS_TEST_PROCESS_7}) ADD_TEST(kwsys.testProcess-${n} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestProcess ${n}) + KWSYS_SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST}) ENDFOREACH(n) # Test SharedForward @@ -1001,7 +1025,9 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE) ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestSharedForward ${PROJECT_BINARY_DIR}/testSharedForward.c) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestSharedForward PROPERTY LABELS ${KWSYS_LABELS_EXE}) ADD_TEST(kwsys.testSharedForward ${EXEC_DIR}/${KWSYS_NAMESPACE}TestSharedForward 1) + KWSYS_SET_PROPERTY(TEST kwsys.testSharedForward PROPERTY LABELS ${KWSYS_LABELS_TEST}) # Configure some test properties. IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE) diff --git a/GCC_XML/KWSys/CTestConfig.cmake b/GCC_XML/KWSys/CTestConfig.cmake index 23a5bd1..e4e7b0d 100644 --- a/GCC_XML/KWSys/CTestConfig.cmake +++ b/GCC_XML/KWSys/CTestConfig.cmake @@ -1,3 +1,7 @@ -SET (CTEST_PROJECT_NAME "kwsys") -SET (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -SET (CTEST_DART_SERVER_VERSION "2") +set (CTEST_PROJECT_NAME "kwsys") +set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") +set (CTEST_DART_SERVER_VERSION "2") +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "www.cdash.org") +set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/GCC_XML/KWSys/DynamicLoader.cxx b/GCC_XML/KWSys/DynamicLoader.cxx index 672dee5..ec3137d 100644 --- a/GCC_XML/KWSys/DynamicLoader.cxx +++ b/GCC_XML/KWSys/DynamicLoader.cxx @@ -335,20 +335,13 @@ const char* DynamicLoader::LastError() #endif //_WIN32 // --------------------------------------------------------------- -// 4. Implementation for BeOS / Haiku -#if defined __BEOS__ || defined(__HAIKU__) +// 4. Implementation for BeOS +#if defined __BEOS__ #include // for strerror() -#ifdef __BEOS__ #include #include -#endif - -#ifdef __HAIKU__ -#include -#include -#endif #define DYNAMICLOADER_DEFINED 1 diff --git a/GCC_XML/KWSys/DynamicLoader.hxx.in b/GCC_XML/KWSys/DynamicLoader.hxx.in index a30ee6b..5910c52 100644 --- a/GCC_XML/KWSys/DynamicLoader.hxx.in +++ b/GCC_XML/KWSys/DynamicLoader.hxx.in @@ -25,8 +25,6 @@ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 #include #endif -#elif defined(__HAIKU__) - #include #elif defined(__BEOS__) #include #endif diff --git a/GCC_XML/KWSys/ProcessUNIX.c b/GCC_XML/KWSys/ProcessUNIX.c index b7526f1..765d1e0 100644 --- a/GCC_XML/KWSys/ProcessUNIX.c +++ b/GCC_XML/KWSys/ProcessUNIX.c @@ -723,7 +723,8 @@ void kwsysProcess_Execute(kwsysProcess* cp) if(cp->WorkingDirectory) { int r; - if(!getcwd(cp->RealWorkingDirectory, cp->RealWorkingDirectoryLength)) + if(!getcwd(cp->RealWorkingDirectory, + (size_t)(cp->RealWorkingDirectoryLength))) { kwsysProcessCleanup(cp, 1); return; @@ -1426,7 +1427,8 @@ static int kwsysProcessInitialize(kwsysProcess* cp) #else cp->RealWorkingDirectoryLength = 4096; #endif - cp->RealWorkingDirectory = malloc(cp->RealWorkingDirectoryLength); + cp->RealWorkingDirectory = + malloc((size_t)(cp->RealWorkingDirectoryLength)); if(!cp->RealWorkingDirectory) { return 0; @@ -1736,7 +1738,7 @@ static int kwsysProcessCreate(kwsysProcess* cp, int prIndex, { /* Keep trying to read until the operation is not interrupted. */ while(((n = read(si->ErrorPipe[0], cp->ErrorMessage+total, - KWSYSPE_PIPE_BUFFER_SIZE-total)) < 0) && + (size_t)(KWSYSPE_PIPE_BUFFER_SIZE-total))) < 0) && (errno == EINTR)); if(n > 0) { @@ -2665,7 +2667,7 @@ static int kwsysProcessAppendByte(char* local, if((*end - *begin) >= *size) { kwsysProcess_ptrdiff_t length = *end - *begin; - char* newBuffer = (char*)malloc(*size*2); + char* newBuffer = (char*)malloc((size_t)(*size*2)); if(!newBuffer) { return 0; @@ -2719,14 +2721,14 @@ static int kwsysProcessAppendArgument(char** local, } /* Allocate space for the argument string. */ - **end = (char*)malloc(*arg_end - *arg_begin); + **end = (char*)malloc((size_t)(*arg_end - *arg_begin)); if(!**end) { return 0; } /* Store the argument in the command array. */ - memcpy(**end, *arg_begin, *arg_end - *arg_begin); + memcpy(**end, *arg_begin,(size_t)(*arg_end - *arg_begin)); ++(*end); /* Reset the argument to be empty. */ diff --git a/GCC_XML/KWSys/System.c b/GCC_XML/KWSys/System.c index 2ff820e..2208361 100644 --- a/GCC_XML/KWSys/System.c +++ b/GCC_XML/KWSys/System.c @@ -170,6 +170,12 @@ flag later when we understand applications of this better. static int kwsysSystem_Shell__ArgumentNeedsQuotes(const char* in, int isUnix, int flags) { + /* The empty string needs quotes. */ + if(!*in) + { + return 1; + } + /* Scan the string for characters that require quoting. */ { const char* c; diff --git a/GCC_XML/KWSys/SystemInformation.cxx b/GCC_XML/KWSys/SystemInformation.cxx index 08a7d17..8b3e52e 100644 --- a/GCC_XML/KWSys/SystemInformation.cxx +++ b/GCC_XML/KWSys/SystemInformation.cxx @@ -62,6 +62,10 @@ # include #endif +#ifdef __HAIKU__ +#include +#endif + #include #include #include @@ -242,6 +246,9 @@ class SystemInformationImplementation kwsys_stl::string ParseValueFromKStat(const char* arguments); kwsys_stl::string RunProcess(kwsys_stl::vector args); + //For Haiku OS + bool QueryHaikuInfo(); + // Evaluate the memory information. int QueryMemory(); unsigned long TotalVirtualMemory; @@ -535,6 +542,8 @@ void SystemInformationImplementation::RunCPUCheck() this->ParseSysCtl(); #elif defined (__SVR4) && defined (__sun) this->QuerySolarisInfo(); +#elif defined(__HAIKU__) + this->QueryHaikuInfo(); #else this->RetreiveInformationFromCpuInfoFile(); #endif @@ -551,6 +560,8 @@ void SystemInformationImplementation::RunMemoryCheck() this->ParseSysCtl(); #elif defined (__SVR4) && defined (__sun) this->QuerySolarisInfo(); +#elif defined(__HAIKU__) + this->QueryHaikuInfo(); #else this->QueryMemory(); #endif @@ -2158,7 +2169,7 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() size_t fileSize = 0; while(!feof(fd)) { - buffer += fgetc(fd); + buffer += static_cast(fgetc(fd)); fileSize++; } fclose( fd ); @@ -2500,7 +2511,7 @@ unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void) #if USE_ASM_INSTRUCTIONS if (!this->IsHyperThreadingSupported()) { - return (unsigned char) 1; // HT not supported + return static_cast(1); // HT not supported } __asm { @@ -2509,7 +2520,7 @@ unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void) mov Regebx, ebx } #endif - return (unsigned char) ((Regebx & NUM_LOGICAL_BITS) >> 16); + return static_cast ((Regebx & NUM_LOGICAL_BITS) >> 16); } /** Works only for windows */ @@ -2565,7 +2576,7 @@ unsigned char SystemInformationImplementation::GetAPICId() #if USE_ASM_INSTRUCTIONS if (!this->IsHyperThreadingSupported()) { - return (unsigned char) -1; // HT not supported + return static_cast(-1); // HT not supported } // Logical processor = 1 __asm { @@ -2574,7 +2585,7 @@ unsigned char SystemInformationImplementation::GetAPICId() mov Regebx, ebx } #endif - return (unsigned char) ((Regebx & INITIAL_APIC_ID_BITS) >> 24); + return static_cast((Regebx & INITIAL_APIC_ID_BITS) >> 24); } /** Count the number of CPUs. Works only on windows. */ @@ -2727,7 +2738,7 @@ bool SystemInformationImplementation::ParseSysCtl() this->NumberOfLogicalCPU /= this->NumberOfPhysicalCPU; } - this->CPUSpeedInMHz = atoi(this->ExtractValueFromSysCtl("hw.cpufrequency:").c_str()); + this->CPUSpeedInMHz = static_cast(atoi(this->ExtractValueFromSysCtl("hw.cpufrequency:").c_str())); this->CPUSpeedInMHz /= 1000000; // Chip family @@ -2897,7 +2908,7 @@ kwsys_stl::string SystemInformationImplementation::ParseValueFromKStat(const cha bool SystemInformationImplementation::QuerySolarisInfo() { // Parse values - this->NumberOfPhysicalCPU = atoi(this->ParseValueFromKStat("-n systethis->misc -s ncpus").c_str()); + this->NumberOfPhysicalCPU = atoi(this->ParseValueFromKStat("-n syste_misc -s ncpus").c_str()); this->NumberOfLogicalCPU = this->NumberOfPhysicalCPU; if(this->NumberOfPhysicalCPU!=0) @@ -2905,7 +2916,7 @@ bool SystemInformationImplementation::QuerySolarisInfo() this->NumberOfLogicalCPU /= this->NumberOfPhysicalCPU; } - this->CPUSpeedInMHz = atoi(this->ParseValueFromKStat("-s clock_MHz").c_str()); + this->CPUSpeedInMHz = static_cast(atoi(this->ParseValueFromKStat("-s clock_MHz").c_str())); // Chip family this->ChipID.Family = 0; @@ -2937,6 +2948,75 @@ bool SystemInformationImplementation::QuerySolarisInfo() return true; } +/** Querying for system information from Haiku OS */ +bool SystemInformationImplementation::QueryHaikuInfo() +{ +#if defined(__HAIKU__) + + system_info info; + get_system_info(&info); + + this->NumberOfPhysicalCPU = info.cpu_count; + this->CPUSpeedInMHz = info.cpu_clock_speed / 1000000.0F; + + // Physical Memory + this->TotalPhysicalMemory = (info.max_pages * B_PAGE_SIZE) / (1024 * 1024) ; + this->AvailablePhysicalMemory = this->TotalPhysicalMemory - + ((info.used_pages * B_PAGE_SIZE) / (1024 * 1024)); + + + // NOTE: get_system_info_etc is currently a private call so just set to 0 + // until it becomes public + this->TotalVirtualMemory = 0; + this->AvailableVirtualMemory = 0; + + // Retrieve cpuid_info union for cpu 0 + cpuid_info cpu_info; + get_cpuid(&cpu_info, 0, 0); + + // Chip Vendor + // Use a temporary buffer so that we can add NULL termination to the string + char vbuf[13]; + strncpy(vbuf, cpu_info.eax_0.vendor_id, 12); + vbuf[12] = '\0'; + strcpy(this->ChipID.Vendor,vbuf); + + this->FindManufacturer(); + + // Retrieve cpuid_info union for cpu 0 this time using a register value of 1 + get_cpuid(&cpu_info, 1, 0); + + this->NumberOfLogicalCPU = cpu_info.eax_1.logical_cpus; + + // Chip type + this->ChipID.Type = cpu_info.eax_1.type; + + // Chip family + this->ChipID.Family = cpu_info.eax_1.family; + + // Chip Model + this->ChipID.Model = cpu_info.eax_1.model; + + // Chip Revision + this->ChipID.Revision = cpu_info.eax_1.stepping; + + // Chip Extended Family + this->ChipID.ExtendedFamily = cpu_info.eax_1.extended_family; + + // Chip Extended Model + this->ChipID.ExtendedModel = cpu_info.eax_1.extended_model; + + // Get ChipID.ProcessorName from other information already gathered + this->RetrieveClassicalCPUIdentity(); + + // Cache size + this->Features.L1CacheSize = 0; + this->Features.L2CacheSize = 0; + +#endif + return true; +} + /** Query the operating system information */ bool SystemInformationImplementation::QueryOSInformation() { diff --git a/GCC_XML/KWSys/SystemTools.cxx b/GCC_XML/KWSys/SystemTools.cxx index e443d26..f8311fc 100644 --- a/GCC_XML/KWSys/SystemTools.cxx +++ b/GCC_XML/KWSys/SystemTools.cxx @@ -205,6 +205,10 @@ inline void Realpath(const char *path, kwsys_stl::string & resolved_path) resolved_path = fullpath; KWSYS_NAMESPACE::SystemTools::ConvertToUnixSlashes(resolved_path); } + else + { + resolved_path = path; + } } #else #include @@ -237,8 +241,16 @@ inline void Realpath(const char *path, kwsys_stl::string & resolved_path) { char resolved_name[KWSYS_SYSTEMTOOLS_MAXPATH]; - realpath(path, resolved_name); - resolved_path = resolved_name; + char *ret = realpath(path, resolved_name); + if(ret) + { + resolved_path = ret; + } + else + { + // if path resolution fails, return what was passed in + resolved_path = path; + } } #endif @@ -1611,7 +1623,8 @@ kwsys_stl::string SystemTools::ConvertToWindowsOutputPath(const char* path) } bool SystemTools::CopyFileIfDifferent(const char* source, - const char* destination) + const char* destination, + bool copyPermissions) { // special check for a destination that is a directory // FilesDiffer does not handle file to directory compare @@ -1624,7 +1637,8 @@ bool SystemTools::CopyFileIfDifferent(const char* source, new_destination += SystemTools::GetFilenameName(source_name); if(SystemTools::FilesDiffer(source, new_destination.c_str())) { - return SystemTools::CopyFileAlways(source, destination); + return SystemTools::CopyFileAlways(source, destination, + copyPermissions); } else { @@ -1637,7 +1651,7 @@ bool SystemTools::CopyFileIfDifferent(const char* source, // are different if(SystemTools::FilesDiffer(source, destination)) { - return SystemTools::CopyFileAlways(source, destination); + return SystemTools::CopyFileAlways(source, destination, copyPermissions); } // at this point the files must be the same so return true return true; @@ -1718,10 +1732,12 @@ bool SystemTools::FilesDiffer(const char* source, } +//---------------------------------------------------------------------------- /** * Copy a file named by "source" to the file named by "destination". */ -bool SystemTools::CopyFileAlways(const char* source, const char* destination) +bool SystemTools::CopyFileAlways(const char* source, const char* destination, + bool copyPermissions) { // If files are the same do not copy if ( SystemTools::SameFile(source, destination) ) @@ -1824,7 +1840,7 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination) { return false; } - if ( perms ) + if ( copyPermissions && perms ) { if ( !SystemTools::SetPermissions(destination, perm) ) { @@ -1836,15 +1852,15 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination) //---------------------------------------------------------------------------- bool SystemTools::CopyAFile(const char* source, const char* destination, - bool always) + bool always, bool copyPermissions) { if(always) { - return SystemTools::CopyFileAlways(source, destination); + return SystemTools::CopyFileAlways(source, destination, copyPermissions); } else { - return SystemTools::CopyFileIfDifferent(source, destination); + return SystemTools::CopyFileIfDifferent(source, destination, copyPermissions); } } @@ -1853,7 +1869,7 @@ bool SystemTools::CopyAFile(const char* source, const char* destination, * "destination". */ bool SystemTools::CopyADirectory(const char* source, const char* destination, - bool always) + bool always, bool copyPermissions) { Directory dir; dir.Load(source); @@ -1877,14 +1893,16 @@ bool SystemTools::CopyADirectory(const char* source, const char* destination, fullDestPath += dir.GetFile(static_cast(fileNum)); if (!SystemTools::CopyADirectory(fullPath.c_str(), fullDestPath.c_str(), - always)) + always, + copyPermissions)) { return false; } } else { - if(!SystemTools::CopyAFile(fullPath.c_str(), destination, always)) + if(!SystemTools::CopyAFile(fullPath.c_str(), destination, always, + copyPermissions)) { return false; } @@ -3040,6 +3058,11 @@ kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p) { return p; } + // Use original path if conversion back to a long path failed. + if(longPath == shortPath) + { + longPath = p; + } // make sure drive letter is always upper case if(longPath.size() > 1 && longPath[1] == ':') { diff --git a/GCC_XML/KWSys/SystemTools.hxx.in b/GCC_XML/KWSys/SystemTools.hxx.in index 825c272..585e488 100644 --- a/GCC_XML/KWSys/SystemTools.hxx.in +++ b/GCC_XML/KWSys/SystemTools.hxx.in @@ -351,7 +351,9 @@ public: const char* in_base); /** - * Get the real path for a given path, removing all symlinks. + * Get the real path for a given path, removing all symlinks. In + * the event of an error (non-existent path, permissions issue, + * etc.) the original path is returned. */ static kwsys_stl::string GetRealPath(const char* path); @@ -490,33 +492,42 @@ public: /** * Copy the source file to the destination file only - * if the two files differ. + * if the two files differ. If the "copyPermissions" + * argument is true, the permissions of the copy are + * set to be the same as the permissions of the + * original. */ static bool CopyFileIfDifferent(const char* source, - const char* destination); - + const char* destination, + bool copyPermissions = true); + /** * Compare the contents of two files. Return true if different */ static bool FilesDiffer(const char* source, const char* destination); - + /** * Return true if the two files are the same file */ static bool SameFile(const char* file1, const char* file2); /** - * Copy a file + * Copy a file. If the "copyPermissions" argument is true, the + * permissions of the copy are set to be the same as the permissions + * of the original. */ - static bool CopyFileAlways(const char* source, const char* destination); + static bool CopyFileAlways(const char* source, const char* destination, + bool copyPermissions = true); /** * Copy a file. If the "always" argument is true the file is always * copied. If it is false, the file is copied only if it is new or - * has changed. + * has changed. If the "copyPermissions" argument is true, the + * permissions of the copy are set to be the same as the permissions + * of the original. */ static bool CopyAFile(const char* source, const char* destination, - bool always = true); + bool always = true, bool copyPermissions = true); /** * Copy content directory to another directory with all files and @@ -525,7 +536,7 @@ public: * are new are copied. */ static bool CopyADirectory(const char* source, const char* destination, - bool always = true); + bool always = true, bool copyPermissions = true); /** * Remove a file diff --git a/GCC_XML/KWSys/kwsysDateStamp.cmake b/GCC_XML/KWSys/kwsysDateStamp.cmake index 985ffd9..6feb9f8 100644 --- a/GCC_XML/KWSys/kwsysDateStamp.cmake +++ b/GCC_XML/KWSys/kwsysDateStamp.cmake @@ -1,10 +1,10 @@ # Do not edit! Generated by kwsysDateStamp.py # KWSys version date year component. Format is CCYY. -SET(KWSYS_DATE_STAMP_YEAR 2008) +SET(KWSYS_DATE_STAMP_YEAR 2009) # KWSys version date month component. Format is MM. -SET(KWSYS_DATE_STAMP_MONTH 10) +SET(KWSYS_DATE_STAMP_MONTH 02) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 17) +SET(KWSYS_DATE_STAMP_DAY 27) diff --git a/GCC_XML/KWSys/testProcess.c b/GCC_XML/KWSys/testProcess.c index cde03e3..4ab0a09 100644 --- a/GCC_XML/KWSys/testProcess.c +++ b/GCC_XML/KWSys/testProcess.c @@ -457,7 +457,7 @@ int main(int argc, const char* argv[]) int values[8] = {0, 123, 1, 1, 0, 0, 0, 0}; int outputs[8] = {1, 1, 1, 1, 1, 0, 1, 1}; int delays[8] = {0, 0, 0, 0, 0, 1, 0, 0}; - double timeouts[8] = {10, 10, 10, 10, 30, 10, -1, 10}; + double timeouts[8] = {10, 10, 10, 30, 30, 10, -1, 10}; int polls[8] = {0, 0, 0, 0, 0, 0, 1, 0}; int repeat[8] = {2, 1, 1, 1, 1, 1, 1, 1}; int r; diff --git a/GCC_XML/Support/CMakeLists.txt b/GCC_XML/Support/CMakeLists.txt index cd0e962..0608d71 100644 --- a/GCC_XML/Support/CMakeLists.txt +++ b/GCC_XML/Support/CMakeLists.txt @@ -1,5 +1,5 @@ # Install UNIX compiler support files. -INSTALL(PROGRAMS gccxml_find_flags +INSTALL(FILES gccxml_identify_compiler.cc DESTINATION ${GCCXML_INSTALL_ROOT}${GCCXML_DATA_DIR} ${GCCXML_INSTALL_COMPONENT_RUNTIME_LIBRARY}) diff --git a/GCC_XML/Support/GCC/4.3/gccxml_builtins.h b/GCC_XML/Support/GCC/4.3/gccxml_builtins.h index 13659f9..dd297eb 100644 --- a/GCC_XML/Support/GCC/4.3/gccxml_builtins.h +++ b/GCC_XML/Support/GCC/4.3/gccxml_builtins.h @@ -130,6 +130,19 @@ float __complex__ __builtin_cpowf(float __complex__, float __complex__); double __complex__ __builtin_cpow(double __complex__, double __complex__); long double __complex__ __builtin_cpowl(long double __complex__, long double __complex__); +/* The GCC 4.3 parser hard-codes handling of these, so they do not + have real signatures. */ +bool __builtin_isfinite(...); +bool __builtin_isinf(...); +bool __builtin_isnan(...); +bool __builtin_isnormal(...); +bool __builtin_isgreater(...); +bool __builtin_isgreaterequal(...); +bool __builtin_isless(...); +bool __builtin_islessequal(...); +bool __builtin_islessgreater(...); +bool __builtin_isunordered(...); + /* GCC 4.3 has the following additional builtin compile-time constant diff --git a/GCC_XML/Support/GCC/find_flags b/GCC_XML/Support/GCC/find_flags deleted file mode 100755 index 4df93d5..0000000 --- a/GCC_XML/Support/GCC/find_flags +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/sh -#============================================================================= -# -# Program: GCC-XML -# Module: find_flags -# Language: C++ -# Date: $Date$ -# Version: $Revision$ -# -# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. -# See Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even -# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the above copyright notices for more information. -# -#============================================================================= - -# Find the GCC executable name. -if test "x$1" = "x" ; then - if test "x${CXX}" = "x" ; then - CXX=gcc - fi -else - CXX="$1" - shift - CXXFLAGS="$@" -fi - -# Find the macro definition options. -MACROS=`echo "" | ${CXX} -x c++ -E -dM ${CXXFLAGS} - 2>/dev/null | - sed -n ' -/^#define / {s/#define \([A-Za-z_][A-Za-z0-9_()]*\) \(.*\)/-D\1='\''\2'\''/;p;} -' | - awk ' -BEGIN { first=1 } -/./ { if(first) { printf("%s", $0); first=0 } else { printf(" %s", $0) } } -'` - -# Find the include path options. -INCLUDES=` - echo "" | ${CXX} -v -x c++ -E ${CXXFLAGS} - 2>&1 | - awk '/^[^ \/].*$/ { if (f) { printf("\n"); exit } } - /^[ ]*(\/[^ ]*)( \(.*\))?$/ { - if (f) { - if (match($1,"/Frameworks")) { - printf("-F%s ",$1) - } else { - printf("-isystem%s ",$1) - } - } - } - /\#include <\.\.\..*$/ {f=1} ' - -` - -# The support headers are located where this script is. -SELFPATH=`echo $0 | sed -n '/\//{s/\/find_flags//;p;}'` -if test "x$SELFPATH" = "x" ; then SELFPATH="." ; fi -SELFPATH=`cd "$SELFPATH" ; pwd` - -# Determine the major version number. -MAJOR_VERSION=` -echo "__GNUC__" | ${CXX} -v -x c++ -E ${CXXFLAGS} - 2>/dev/null | - sed -n '/^[0-9]/{s/[^0-9]//g;p;}'` - -MINOR_VERSION=` -echo "__GNUC_MINOR__" | ${CXX} -v -x c++ -E ${CXXFLAGS} - 2>/dev/null | - sed -n '/^[0-9]/{s/[^0-9]//g;p;}'` - -# hack to handle bad gcc 4.0 on RedHat -if [ "$MAJOR_VERSION" = 4 ]; then - if echo "$INCLUDES" | grep "c++/3\.4" > /dev/null 2>&1; then - MAJOR_VERSION=3 - MINOR_VERSION=4 - fi -fi - -# For GCC versions before 3, some special options are needed. -if [ "$MAJOR_VERSION" -lt 3 ]; then - INCLUDES="-iwrapper\"$SELFPATH/2.95\" $INCLUDES" - if [ "$MINOR_VERSION" = 96 ]; then - INCLUDES="-iwrapper\"$SELFPATH/2.96\" $INCLUDES" - fi -elif [ "$MAJOR_VERSION" = 4 -a "$MINOR_VERSION" -ge 3 ]; then - INCLUDES="-iwrapper\"$SELFPATH/4.3\" $INCLUDES" - SPECIAL="-include \"gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 4 -a "$MINOR_VERSION" -ge 2 ]; then - INCLUDES="-iwrapper\"$SELFPATH/4.2\" $INCLUDES" - SPECIAL="-include \"gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 4 -a "$MINOR_VERSION" -ge 1 ]; then - INCLUDES="-iwrapper\"$SELFPATH/4.1\" $INCLUDES" - SPECIAL="-include \"gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 4 -a "$MINOR_VERSION" -ge 0 ]; then - INCLUDES="-iwrapper\"$SELFPATH/4.0\" $INCLUDES" - SPECIAL="-include \"gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" -ge 4 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.4\" $INCLUDES" - SPECIAL="-include \"gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 3 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.3\" $INCLUDES" - SPECIAL="-include \"gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 2 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.2\" $INCLUDES" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 1 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.1\" $INCLUDES" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 0 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.0\" $INCLUDES" -fi - -# Format and print out the options. -OPTIONS="$MACROS $INCLUDES $SPECIAL" -echo $OPTIONS diff --git a/GCC_XML/Support/gccxml_find_flags b/GCC_XML/Support/gccxml_find_flags deleted file mode 100755 index 414971d..0000000 --- a/GCC_XML/Support/gccxml_find_flags +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -#============================================================================= -# -# Program: GCC-XML -# Module: gccxml_find_flags -# Language: C++ -# Date: $Date$ -# Version: $Revision$ -# -# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. -# See Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even -# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the above copyright notices for more information. -# -#============================================================================= - -# Find the compiler executable name. -if test "x$1" = "x" ; then - if test "x$GCCXML_COMPILER" = "x"; then - if test "x${CXX}" != "x" ; then - GCCXML_COMPILER="${CXX}" - else - echo "Need to specify compiler name or set GCCXML_COMPILER or CXX." - exit 1 - fi - fi - if test "x$GCCXML_CXXFLAGS" = "x"; then - if test "x${CXXFLAGS}" != "x" ; then - GCCXML_CXXFLAGS="${CXXFLAGS}" - fi - fi -else - GCCXML_COMPILER="$1" - shift - GCCXML_CXXFLAGS="$@" -fi - -# Use the compiler's preprocessor to identify the compiler. -GCCXML_PID="$$" -cat > "/tmp/gccxml_identify_compiler$GCCXML_PID.cc" <= 700) -GCCXML_SUPPORT="Intel" -#elif defined(__SUNPRO_CC) -GCCXML_SUPPORT="Sun" -#else -GCCXML_SUPPORT="" -#endif -! - -# Run the compiler's preprocessor on the above code to identify it. -# (workaround for CC whitespace:) -if (${GCCXML_COMPILER} ${GCCXML_CXXFLAGS} \ - -E "/tmp/gccxml_identify_compiler$GCCXML_PID.cc" \ - | sed -e 's/[ ^]//g' \ - > "/tmp/gccxml_identify_compiler$GCCXML_PID.pp"; - rm -f "/tmp/gccxml_identify_compiler$GCCXML_PID.cc" -) ; then : ; else - echo "Error running \"${GCCXML_COMPILER} -E\"" - exit 1 -fi - -# Source the result to get the settings found. -. "/tmp/gccxml_identify_compiler$GCCXML_PID.pp" -rm -f "/tmp/gccxml_identify_compiler$GCCXML_PID.pp" - -# Check if a supported compiler was identified. -if test "x$GCCXML_SUPPORT" = "x" ; then - echo "Compiler \"${GCCXML_COMPILER}\" is not supported by GCC-XML." - exit 1 -fi - -# The support directories are located near this script. -SELFPATH=`cd "\`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'\`";pwd` - -# Find the compiler-specific support directory. -if test -d "${SELFPATH}/${GCCXML_SUPPORT}" ; then - GCCXML_SUPPORT_DIR="${SELFPATH}/${GCCXML_SUPPORT}" -else - echo "Cannot find GCC_XML compiler support directory ${GCCXML_SUPPORT}." - exit 1 -fi - -# Run the compiler-specific flag finding script. -GCCXML_FLAGS=`"${GCCXML_SUPPORT_DIR}/find_flags" ${GCCXML_COMPILER} ${GCCXML_CXXFLAGS}` - -# Display the output. -echo ${GCCXML_FLAGS} diff --git a/GCC_XML/Support/gccxml_identify_compiler.cc b/GCC_XML/Support/gccxml_identify_compiler.cc new file mode 100644 index 0000000..c51cc42 --- /dev/null +++ b/GCC_XML/Support/gccxml_identify_compiler.cc @@ -0,0 +1,11 @@ +#if defined(__GNUC__) +GCCXML_SUPPORT="GCC" +#elif defined(__sgi) && defined(_COMPILER_VERSION) +GCCXML_SUPPORT="MIPSpro" +#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 700) +GCCXML_SUPPORT="Intel" +#elif defined(__SUNPRO_CC) +GCCXML_SUPPORT="Sun" +#else +GCCXML_SUPPORT="" +#endif diff --git a/GCC_XML/VcInstall/CMakeLists.txt b/GCC_XML/VcInstall/CMakeLists.txt index d40de88..dd77a3d 100644 --- a/GCC_XML/VcInstall/CMakeLists.txt +++ b/GCC_XML/VcInstall/CMakeLists.txt @@ -38,6 +38,7 @@ ADD_CUSTOM_COMMAND( ${GCCXML_SOURCE_DIR}/VcInstall/vc8sp1ExpressInclude.patch ${GCCXML_SOURCE_DIR}/VcInstall/vc9Include.patch ${GCCXML_SOURCE_DIR}/VcInstall/vc9PlatformSDK.patch + ${GCCXML_SOURCE_DIR}/VcInstall/vc9sp1Include.patch ) ADD_CUSTOM_TARGET(vcInstallPatch DEPENDS ${GCCXML_BINARY_DIR}/vcInstall_stamp.c) diff --git a/GCC_XML/VcInstall/vc6Include.patch b/GCC_XML/VcInstall/vc6Include.patch index a343116..fdd0839 100644 --- a/GCC_XML/VcInstall/vc6Include.patch +++ b/GCC_XML/VcInstall/vc6Include.patch @@ -3883,6 +3883,27 @@ diff -c -3 -p -r1.1.1.1 -r1.2 explicit stack(const allocator_type& _Al = allocator_type()) : c(_Al) {} allocator_type get_allocator() const +Index: stddef.h +=================================================================== +RCS file: /cvsroot/GxInclude/VcInclude/stddef.h,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1.1.1 -r1.2 +*** stddef.h 13 Jun 2001 19:31:56 -0000 1.1.1.1 +--- stddef.h 9 Jan 2009 13:47:14 -0000 1.2 +*************** extern "C" { +*** 68,74 **** +--- 68,77 ---- + #endif + + ++ #define offsetof(s,m) ((size_t)__builtin_offsetof(s,m)) ++ #if 0 /* replaced for gccxml */ + #define offsetof(s,m) (size_t)&(((s *)0)->m) ++ #endif /* 0 */ + + + /* Declare reference to errno */ Index: streambuf =================================================================== RCS file: /cvsroot/GxInclude/VcInclude/streambuf,v diff --git a/GCC_XML/VcInstall/vc71Include.patch b/GCC_XML/VcInstall/vc71Include.patch index 383189e..8657515 100644 --- a/GCC_XML/VcInstall/vc71Include.patch +++ b/GCC_XML/VcInstall/vc71Include.patch @@ -626,6 +626,31 @@ diff -c -3 -p -r1.1 -r1.2 _CRTIMP int __cdecl raise(int); +Index: stddef.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc71/Include/stddef.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** stddef.h 10 Jun 2003 16:12:29 -0000 1.1 +--- stddef.h 9 Jan 2009 13:47:14 -0000 1.2 +*************** typedef unsigned short wchar_t; +*** 122,132 **** +--- 122,135 ---- + + /* Define offsetof macro */ + ++ #define offsetof(s,m) ((size_t)__builtin_offsetof(s,m)) ++ #if 0 /* replaced for gccxml */ + #ifdef _WIN64 + #define offsetof(s,m) (size_t)( (ptrdiff_t)&(((s *)0)->m) ) + #else + #define offsetof(s,m) (size_t)&(((s *)0)->m) + #endif ++ #endif /* 0 */ + + + #ifdef _MT Index: typeinfo.h =================================================================== RCS file: /cvsroot/GxInclude/Vc71/Include/typeinfo.h,v diff --git a/GCC_XML/VcInstall/vc7Include.patch b/GCC_XML/VcInstall/vc7Include.patch index 9e065e5..17f4866 100644 --- a/GCC_XML/VcInstall/vc7Include.patch +++ b/GCC_XML/VcInstall/vc7Include.patch @@ -25,9 +25,10 @@ Index: deque =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/deque,v retrieving revision 1.1 -diff -c -3 -p -r1.1 deque +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** deque 1 Nov 2002 14:00:28 -0000 1.1 ---- deque 21 Oct 2007 19:25:26 -0000 +--- deque 21 Oct 2007 19:58:47 -0000 1.2 *************** public: *** 245,253 **** size_type _Block = _Myoff / _DEQUESIZ; @@ -127,9 +128,10 @@ Index: functional =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/functional,v retrieving revision 1.1 -diff -c -3 -p -r1.1 functional +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** functional 1 Nov 2002 14:00:28 -0000 1.1 ---- functional 21 Oct 2007 19:25:26 -0000 +--- functional 21 Oct 2007 19:58:47 -0000 1.2 *************** public: *** 343,349 **** } @@ -170,9 +172,10 @@ Index: istream =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/istream,v retrieving revision 1.1 -diff -c -3 -p -r1.1 istream +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** istream 1 Nov 2002 14:00:28 -0000 1.1 ---- istream 21 Oct 2007 19:25:26 -0000 +--- istream 21 Oct 2007 19:58:47 -0000 1.2 *************** public: *** 70,76 **** explicit sentry(_Myt& _Istr, bool _Noskip = false) @@ -194,9 +197,10 @@ Index: limits =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/limits,v retrieving revision 1.1 -diff -c -3 -p -r1.1 limits +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** limits 1 Nov 2002 14:00:28 -0000 1.1 ---- limits 21 Oct 2007 19:25:26 -0000 +--- limits 21 Oct 2007 19:58:47 -0000 1.2 *************** struct _CRTIMP2 _Num_base *** 66,83 **** _STCONS(int, radix, 0); @@ -673,9 +677,10 @@ Index: list =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/list,v retrieving revision 1.1 -diff -c -3 -p -r1.1 list +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** list 1 Nov 2002 14:00:28 -0000 1.1 ---- list 21 Oct 2007 19:25:26 -0000 +--- list 21 Oct 2007 19:58:47 -0000 1.2 *************** public: *** 233,239 **** @@ -731,9 +736,10 @@ Index: ostream =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/ostream,v retrieving revision 1.1 -diff -c -3 -p -r1.1 ostream +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** ostream 1 Nov 2002 14:00:28 -0000 1.1 ---- ostream 21 Oct 2007 19:25:26 -0000 +--- ostream 21 Oct 2007 19:58:47 -0000 1.2 *************** public: *** 93,102 **** { // destroy the object @@ -809,6 +815,31 @@ diff -c -3 -p -r1.1 -r1.2 _CRTIMP int __cdecl raise(int); +Index: stddef.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc7/Include/stddef.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** stddef.h 1 Nov 2002 14:00:28 -0000 1.1 +--- stddef.h 9 Jan 2009 13:47:14 -0000 1.2 +*************** typedef unsigned short wchar_t; +*** 122,132 **** +--- 122,135 ---- + + /* Define offsetof macro */ + ++ #define offsetof(s,m) ((size_t)__builtin_offsetof(s,m)) ++ #if 0 /* replaced for gccxml */ + #ifdef _WIN64 + #define offsetof(s,m) (size_t)( (ptrdiff_t)&(((s *)0)->m) ) + #else + #define offsetof(s,m) (size_t)&(((s *)0)->m) + #endif ++ #endif /* 0 */ + + + #ifdef _MT Index: typeinfo.h =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/typeinfo.h,v @@ -849,9 +880,10 @@ Index: valarray =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/valarray,v retrieving revision 1.1 -diff -c -3 -p -r1.1 valarray +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** valarray 1 Nov 2002 14:00:28 -0000 1.1 ---- valarray 21 Oct 2007 19:25:26 -0000 +--- valarray 21 Oct 2007 19:58:47 -0000 1.2 *************** *** 5,10 **** --- 5,12 ---- @@ -901,9 +933,10 @@ Index: xdebug =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/xdebug,v retrieving revision 1.1 -diff -c -3 -p -r1.1 xdebug +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** xdebug 1 Nov 2002 14:00:28 -0000 1.1 ---- xdebug 21 Oct 2007 19:25:26 -0000 +--- xdebug 21 Oct 2007 19:58:47 -0000 1.2 *************** template *** 53,59 **** --- 53,61 ---- @@ -993,9 +1026,10 @@ Index: xstring =================================================================== RCS file: /cvsroot/GxInclude/Vc7/Include/xstring,v retrieving revision 1.1 -diff -c -3 -p -r1.1 xstring +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 *** xstring 1 Nov 2002 14:00:28 -0000 1.1 ---- xstring 21 Oct 2007 19:25:26 -0000 +--- xstring 21 Oct 2007 19:58:47 -0000 1.2 *************** private: *** 1281,1289 **** template= 1300 && !defined(_CRT_PORTABLE) ++ void __debugbreak(); + #define _CrtDbgBreak() __debugbreak() + #elif defined(_M_IX86) && !defined(_CRT_PORTABLE) + #define _CrtDbgBreak() __asm { int 3 } Index: crtdefs.h =================================================================== RCS file: /cvsroot/GxInclude/Vc9/Include/crtdefs.h,v @@ -1138,6 +1156,35 @@ diff -c -3 -p -r1.1 -r1.2 } #else _CRTIMP __declspec(noreturn) void __cdecl longjmp(_In_ jmp_buf _Buf, _In_ int _Value); +Index: stddef.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9/Include/stddef.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** stddef.h 29 Jan 2008 21:05:21 -0000 1.1 +--- stddef.h 9 Jan 2009 13:47:14 -0000 1.2 +*************** errno_t __cdecl _get_errno(_Out_ int * _ +*** 46,51 **** +--- 46,53 ---- + #endif + + /* Define offsetof macro */ ++ #define offsetof(s,m) ((size_t)__builtin_offsetof(s,m)) ++ #if 0 /* replaced for gccxml */ + #ifdef __cplusplus + + #ifdef _WIN64 +*************** errno_t __cdecl _get_errno(_Out_ int * _ +*** 63,68 **** +--- 65,71 ---- + #endif + + #endif /* __cplusplus */ ++ #endif /* 0 */ + + #ifdef _MT + _CRTIMP extern unsigned long __cdecl __threadid(void); Index: typeinfo =================================================================== RCS file: /cvsroot/GxInclude/Vc9/Include/typeinfo,v @@ -1759,10 +1806,10 @@ 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 +retrieving revision 1.5 +diff -c -3 -p -r1.1 -r1.5 *** yvals.h 29 Jan 2008 21:05:21 -0000 1.1 ---- yvals.h 21 Apr 2008 15:38:15 -0000 1.4 +--- yvals.h 15 Dec 2008 20:36:52 -0000 1.5 *************** *** 116,122 **** #define _STR2WSTR(str) __STR2WSTR(str) @@ -1772,17 +1819,18 @@ diff -c -3 -p -r1.1 -r1.4 /* _SECURE_SCL switches: default values */ ---- 116,122 ---- +--- 116,123 ---- #define _STR2WSTR(str) __STR2WSTR(str) #define __FILEW__ _STR2WSTR(__FILE__) ! #define __FUNCTIONW__ L"" +! #define L__FUNCTION__ L"" /* _SECURE_SCL switches: default values */ *************** *** 181,186 **** ---- 181,206 ---- +--- 182,207 ---- #endif @@ -1819,7 +1867,7 @@ diff -c -3 -p -r1.1 -r1.4 /* INTEGER PROPERTIES */ #define _C2 1 /* 0 if not 2's complement */ ---- 549,556 ---- +--- 550,557 ---- /* VC++ COMPILER PARAMETERS */ #define _LONGLONG __int64 #define _ULONGLONG unsigned __int64 diff --git a/GCC_XML/VcInstall/vc9sp1Include.patch b/GCC_XML/VcInstall/vc9sp1Include.patch new file mode 100644 index 0000000..641dfa6 --- /dev/null +++ b/GCC_XML/VcInstall/vc9sp1Include.patch @@ -0,0 +1,2510 @@ +Index: algorithm +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/algorithm,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** algorithm 6 Jan 2009 21:18:02 -0000 1.1 +--- algorithm 6 Jan 2009 21:21:23 -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: crtdbg.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/crtdbg.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** crtdbg.h 6 Jan 2009 21:18:02 -0000 1.1 +--- crtdbg.h 6 Jan 2009 21:21:23 -0000 1.2 +*************** should not have done so since it was not +*** 588,593 **** +--- 588,594 ---- + _RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2, arg3, arg4, arg5)) + + #if _MSC_VER >= 1300 && !defined(_CRT_PORTABLE) ++ void __debugbreak(); + #define _CrtDbgBreak() __debugbreak() + #elif defined(_M_IX86) && !defined(_CRT_PORTABLE) + #define _CrtDbgBreak() __asm { int 3 } +Index: crtdefs.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/crtdefs.h,v +retrieving revision 1.1 +diff -c -3 -p -r1.1 crtdefs.h +*** crtdefs.h 6 Jan 2009 21:18:02 -0000 1.1 +--- crtdefs.h 9 Jan 2009 13:53:55 -0000 +*************** typedef __time64_t time_t; /* time +*** 666,764 **** + #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); \ + } \ + } + +--- 666,764 ---- + #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 +*** 767,779 **** + { \ + __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)); \ + } +--- 767,779 ---- + { \ + __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 +*** 783,795 **** + { \ + __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)); \ + } +--- 783,795 ---- + { \ + __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 +*** 926,936 **** + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size), _Dst); \ + } \ + template <> \ + inline \ +--- 926,936 ---- + { \ + 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 +*** 971,982 **** + { \ + 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); \ + } \ +--- 971,982 ---- + { \ + 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 +*** 1026,1036 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +--- 1026,1036 ---- + { \ + 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 +*** 1071,1081 **** + { \ + 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 \ +--- 1071,1081 ---- + { \ + 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 +*** 1116,1126 **** + { \ + 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 \ +--- 1116,1126 ---- + { \ + 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 +*** 1161,1171 **** + { \ + 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 \ +--- 1161,1171 ---- + { \ + 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 +*** 1206,1216 **** + { \ + 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 \ +--- 1206,1216 ---- + { \ + 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 +*** 1251,1261 **** + { \ + 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 \ +--- 1251,1261 ---- + { \ + 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 +*** 1312,1324 **** + \ + __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)); \ + \ +--- 1312,1324 ---- + \ + __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 +*** 1356,1366 **** + { \ + 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 \ +--- 1356,1366 ---- + { \ + 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 +*** 1417,1429 **** + \ + __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)); \ + \ +--- 1417,1429 ---- + \ + __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 +*** 1461,1471 **** + { \ + 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 \ +--- 1461,1471 ---- + { \ + 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 +*** 1506,1517 **** + { \ + 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 <> \ +--- 1506,1517 ---- + { \ + 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 +*** 1555,1566 **** + { \ + 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 <> \ +--- 1555,1566 ---- + { \ + 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 +*** 1602,1612 **** + { \ + return __insecure_##_FuncName(_Dst); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size]) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size), _Dst); \ + } \ + template <> \ + inline \ +--- 1602,1612 ---- + { \ + 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 +*** 1645,1655 **** + { \ + return __insecure_##_FuncName(_Dst, _TArg1); \ + } \ +! template \ + inline \ +! _ReturnType __CRTDECL _FuncName(_SecureDstType (&_Dst)[_Size], _TType1 _TArg1) \ + { \ +! _ReturnPolicy(_SecureFuncName(_Dst, _Size, _TArg1), _Dst); \ + } \ + template <> \ + inline \ +--- 1645,1655 ---- + { \ + 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 +*** 1688,1698 **** + { \ + 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 \ +--- 1688,1698 ---- + { \ + 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 +*** 1731,1741 **** + { \ + 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 \ +--- 1731,1741 ---- + { \ + 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/Vc9sp1/Include/deque,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** deque 6 Jan 2009 21:18:02 -0000 1.1 +--- deque 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/eh.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** eh.h 6 Jan 2009 21:18:02 -0000 1.1 +--- eh.h 6 Jan 2009 21:21:23 -0000 1.2 +*************** +*** 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/Vc9sp1/Include/iosfwd,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** iosfwd 6 Jan 2009 21:18:02 -0000 1.1 +--- iosfwd 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/iterator,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** iterator 6 Jan 2009 21:18:02 -0000 1.1 +--- iterator 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/limits,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** limits 6 Jan 2009 21:18:02 -0000 1.1 +--- limits 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/list,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** list 6 Jan 2009 21:18:02 -0000 1.1 +--- list 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/locale,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** locale 6 Jan 2009 21:18:02 -0000 1.1 +--- locale 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/memory,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** memory 6 Jan 2009 21:18:02 -0000 1.1 +--- memory 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/sal.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** sal.h 6 Jan 2009 21:18:02 -0000 1.1 +--- sal.h 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/setjmp.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** setjmp.h 6 Jan 2009 21:18:02 -0000 1.1 +--- setjmp.h 6 Jan 2009 21:21: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: stddef.h +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/stddef.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** stddef.h 6 Jan 2009 21:18:02 -0000 1.1 +--- stddef.h 9 Jan 2009 13:47:14 -0000 1.2 +*************** errno_t __cdecl _get_errno(_Out_ int * _ +*** 46,51 **** +--- 46,53 ---- + #endif + + /* Define offsetof macro */ ++ #define offsetof(s,m) ((size_t)__builtin_offsetof(s,m)) ++ #if 0 /* replaced for gccxml */ + #ifdef __cplusplus + + #ifdef _WIN64 +*************** errno_t __cdecl _get_errno(_Out_ int * _ +*** 63,68 **** +--- 65,71 ---- + #endif + + #endif /* __cplusplus */ ++ #endif /* 0 */ + + #ifdef _MT + _CRTIMP extern unsigned long __cdecl __threadid(void); +Index: typeinfo +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/typeinfo,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** typeinfo 6 Jan 2009 21:19:55 -0000 1.1 +--- typeinfo 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/vector,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** vector 6 Jan 2009 21:19:55 -0000 1.1 +--- vector 6 Jan 2009 21:21:23 -0000 1.2 +*************** public: +*** 2246,2252 **** + + void flip() + { // toggle all elements +! for (_Vbtype::iterator _Next = _Myvec.begin(); + _Next != _Myvec.end(); ++_Next) + *_Next = (_Vbase)~*_Next; + _Trim(_Mysize); +--- 2246,2252 ---- + + 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/Vc9sp1/Include/xhash,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xhash 6 Jan 2009 21:19:25 -0000 1.1 +--- xhash 6 Jan 2009 21:21:23 -0000 1.2 +*************** public: +*** 303,309 **** + } + + protected: +! typename _Mylist::_Iterator<0> _Mypos; + }; + + typedef _List_position _Myvec_value_type; +--- 303,309 ---- + } + + protected: +! typename _Mylist::template _Iterator<0> _Mypos; + }; + + typedef _List_position _Myvec_value_type; +Index: xlocale +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/xlocale,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xlocale 6 Jan 2009 21:19:25 -0000 1.1 +--- xlocale 6 Jan 2009 21:21:23 -0000 1.2 +*************** 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/Vc9sp1/Include/xlocmes,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xlocmes 6 Jan 2009 21:19:25 -0000 1.1 +--- xlocmes 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/xlocmon,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xlocmon 6 Jan 2009 21:19:25 -0000 1.1 +--- xlocmon 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/xlocnum,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xlocnum 6 Jan 2009 21:19:25 -0000 1.1 +--- xlocnum 6 Jan 2009 21:21:23 -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: +*** 236,243 **** + 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); + } + +--- 238,247 ---- + 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: +*** 1029,1036 **** + 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); + } + +--- 1033,1042 ---- + 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/Vc9sp1/Include/xloctime,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xloctime 6 Jan 2009 21:19:25 -0000 1.1 +--- xloctime 6 Jan 2009 21:21:23 -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/Vc9sp1/Include/xstddef,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xstddef 6 Jan 2009 21:19:25 -0000 1.1 +--- xstddef 6 Jan 2009 21:21: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/Vc9sp1/Include/xutility,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xutility 6 Jan 2009 21:19:25 -0000 1.1 +--- xutility 6 Jan 2009 21:21:23 -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: +*** 2162,2168 **** + + _Checked_iterator_base_type _Checked_iterator_base() const + { +! typename _Checked_iterator_base_type _Base(_CHECKED_BASE(this->current)); + return _Base; + } + +--- 2191,2197 ---- + + _Checked_iterator_base_type _Checked_iterator_base() const + { +! _Checked_iterator_base_type _Base(_CHECKED_BASE(this->current)); + return _Base; + } + +Index: xxmem_fn +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/xxmem_fn,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xxmem_fn 6 Jan 2009 21:19:25 -0000 1.1 +--- xxmem_fn 6 Jan 2009 21:37:23 -0000 1.2 +*************** public: +*** 29,41 **** + // TEMPLATE FUNCTION mem_fn, pointer to member function + template +! _NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2), _ARG0_ARG1> +! mem_fn(_Rx(__thiscall _Arg0::*_Pm)(_ARG1_ARG2)) + { // bind to pointer to member function +! return (_NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2), + _ARG0_ARG1>(_Pm)); + } + + #ifdef _M_IX86 + template +--- 29,42 ---- + // TEMPLATE FUNCTION mem_fn, pointer to member function + template +! _NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2), _ARG0_ARG1> +! mem_fn(_Rx(_Arg0::*_Pm)(_ARG1_ARG2)) + { // bind to pointer to member function +! return (_NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2), + _ARG0_ARG1>(_Pm)); + } + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +*************** template(_Pm)); + } + #endif /* _M_CEE */ + + // TEMPLATE FUNCTION mem_fn, pointer to const member function + template +! _NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2) const, + const _ARG0_ARG1> +! mem_fn(_Rx(__thiscall _Arg0::*_Pm)(_ARG1_ARG2) const) + { // bind to pointer to const member function +! return (_NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2) const, + const _ARG0_ARG1>(_Pm)); + } + + #ifdef _M_IX86 + template +--- 79,98 ---- + _ARG0_ARG1>(_Pm)); + } + #endif /* _M_CEE */ ++ #endif // Disabled for gccxml + + // TEMPLATE FUNCTION mem_fn, pointer to const member function + template +! _NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2) const, + const _ARG0_ARG1> +! mem_fn(_Rx(_Arg0::*_Pm)(_ARG1_ARG2) const) + { // bind to pointer to const member function +! return (_NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2) const, + const _ARG0_ARG1>(_Pm)); + } + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +*************** template(_Pm)); + } + #endif /* _M_CEE */ + + // TEMPLATE FUNCTION mem_fn, pointer to volatile member function + template +! _NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2) volatile, + volatile _ARG0_ARG1> +! mem_fn(_Rx(__thiscall _Arg0::*_Pm)(_ARG1_ARG2) volatile) + { // bind to pointer to volatile member function +! return (_NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2) volatile, + volatile _ARG0_ARG1>(_Pm)); + } + + #ifdef _M_IX86 + template +--- 139,158 ---- + const _ARG0_ARG1>(_Pm)); + } + #endif /* _M_CEE */ ++ #endif // Disabled for gccxml + + // TEMPLATE FUNCTION mem_fn, pointer to volatile member function + template +! _NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2) volatile, + volatile _ARG0_ARG1> +! mem_fn(_Rx(_Arg0::*_Pm)(_ARG1_ARG2) volatile) + { // bind to pointer to volatile member function +! return (_NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2) volatile, + volatile _ARG0_ARG1>(_Pm)); + } + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +*************** template(_Pm)); + } + #endif /* _M_CEE */ + + // TEMPLATE FUNCTION mem_fn, pointer to const volatile member function + template +! _NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2) const volatile, + const volatile _ARG0_ARG1> +! mem_fn(_Rx(__thiscall _Arg0::*_Pm)(_ARG1_ARG2) const volatile) + { // bind to pointer to const volatile member function +! return (_NAME<_Rx, _Rx(__thiscall _Arg0::*)(_ARG1_ARG2) const volatile, + const volatile _ARG0_ARG1>(_Pm)); + } + + #ifdef _M_IX86 + template +--- 199,218 ---- + volatile _ARG0_ARG1>(_Pm)); + } + #endif /* _M_CEE */ ++ #endif // Disabled for gccxml + + // TEMPLATE FUNCTION mem_fn, pointer to const volatile member function + template +! _NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2) const volatile, + const volatile _ARG0_ARG1> +! mem_fn(_Rx(_Arg0::*_Pm)(_ARG1_ARG2) const volatile) + { // bind to pointer to const volatile member function +! return (_NAME<_Rx, _Rx(_Arg0::*)(_ARG1_ARG2) const volatile, + const volatile _ARG0_ARG1>(_Pm)); + } + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +*************** template(_Pm)); + } + #endif /* _M_CEE */ ++ #endif // Disabled for gccxml + + #undef _NAME + +Index: xxresult +=================================================================== +RCS file: /cvsroot/GxInclude/Vc9sp1/Include/xxresult,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** xxresult 6 Jan 2009 21:19:25 -0000 1.1 +--- xxresult 6 Jan 2009 21:37:23 -0000 1.2 +*************** template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*)(_ARG1_ARG2), + _Farg0& _C_FARG1_FARG2> + { // pointer to member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*)(_ARG1_ARG2), + _Farg0& _C_FARG1_FARG2> + { // pointer to member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*)(_ARG1_ARG2) const, + _Farg0& _C_FARG1_FARG2> + { // pointer to const member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*)(_ARG1_ARG2) const, + _Farg0& _C_FARG1_FARG2> + { // pointer to const member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*)(_ARG1_ARG2) volatile, + _Farg0& _C_FARG1_FARG2> + { // pointer to volatile member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*)(_ARG1_ARG2) volatile, + _Farg0& _C_FARG1_FARG2> + { // pointer to volatile member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*)(_ARG1_ARG2) const volatile, + _Farg0& _C_FARG1_FARG2> + { // pointer to const volatile member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*)(_ARG1_ARG2) const volatile, + _Farg0& _C_FARG1_FARG2> + { // pointer to const volatile member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*const)(_ARG1_ARG2), + _Farg0& _C_FARG1_FARG2> + { // const pointer to member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*const)(_ARG1_ARG2), + _Farg0& _C_FARG1_FARG2> + { // const pointer to member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*const)(_ARG1_ARG2) const, + _Farg0& _C_FARG1_FARG2> + { // const pointer to const member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*const)(_ARG1_ARG2) const, + _Farg0& _C_FARG1_FARG2> + { // const pointer to const member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*const)(_ARG1_ARG2) volatile, + _Farg0& _C_FARG1_FARG2> + { // const pointer to volatile member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*const)(_ARG1_ARG2) volatile, + _Farg0& _C_FARG1_FARG2> + { // const pointer to volatile member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (__thiscall _Arg0::*const)(_ARG1_ARG2) const volatile, + _Farg0& _C_FARG1_FARG2> + { // const pointer to const volatile member fn + typedef _Rx _Type; + }; + + #ifdef _M_IX86 + template +! struct _RESULT_OF<_Rx (_Arg0::*const)(_ARG1_ARG2) const volatile, + _Farg0& _C_FARG1_FARG2> + { // const pointer to const volatile member fn + typedef _Rx _Type; + }; + ++ #if 0 // Disabled for gccxml + #ifdef _M_IX86 + template" +! #define L__FUNCTION__ L"" + + /* _SECURE_SCL switches: default values */ + +*************** +*** 185,190 **** +--- 205,230 ---- + + #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 +*** 533,540 **** + /* 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 */ +--- 573,580 ---- + /* 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/Vc9sp1/Include/CodeAnalysis/sourceannotations.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -c -3 -p -r1.1 -r1.2 +*** CodeAnalysis/sourceannotations.h 6 Jan 2009 21:19:11 -0000 1.1 +--- CodeAnalysis/sourceannotations.h 6 Jan 2009 21:21:23 -0000 1.2 +*************** 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/vcInstall.cxx b/GCC_XML/VcInstall/vcInstall.cxx index 0060865..47c07a7 100644 --- a/GCC_XML/VcInstall/vcInstall.cxx +++ b/GCC_XML/VcInstall/vcInstall.cxx @@ -88,6 +88,12 @@ int main(int argc, char* argv[]) 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* vc9sp1Registry[] = + { + // English SP1 + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\InstalledProducts\\KB948484;", + 0 + }; const char* vc9exRegistry = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir"; //"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\9.0;InstallDir"; // _WIN64 ? @@ -383,6 +389,16 @@ int main(int argc, char* argv[]) msvc9i = gxSystemTools::CollapseDirectory(msvc9i.c_str()); std::string patchIname = "vc9Include.patch"; std::string destPathI = gccxmlRoot+"/Vc9/Include"; + std::string msvc9sp1; + bool vc9sp1 = false; + for(const char** reg = vc9sp1Registry; !vc9sp1 && *reg; ++reg) + { + vc9sp1 = vc9sp1 || gxSystemTools::ReadRegistryValue(*reg, msvc9sp1); + } + if(vc9sp1) + { + patchIname = "vc9sp1Include.patch"; + } std::string patchI = patchDir + "/" + patchIname; if(gxSystemTools::FileExists(patchI.c_str())) {