From 13c0fba4fb074e11a0b0ffa21f15a6c164e8bdf5 Mon Sep 17 00:00:00 2001 From: GCC-XML Date: Fri, 9 Apr 2010 12:15:06 -0400 Subject: [PATCH] gccxml 2010-04-09 (1ca45528) --- GCC_XML/GXFront/gxConfiguration.cxx | 28 +--- GCC_XML/KWSys/DynamicLoader.cxx | 2 +- GCC_XML/KWSys/ProcessUNIX.c | 3 +- GCC_XML/KWSys/SystemInformation.cxx | 12 +- GCC_XML/KWSys/SystemTools.cxx | 81 +++--------- GCC_XML/KWSys/kwsysDateStamp.cmake | 4 +- GCC_XML/KWSys/kwsysPlatformTests.cmake | 2 +- GCC_XML/Support/GCC/4.5/gccxml_builtins.h | 153 ++++++++++++++++++++++ GCC_XML/VcInstall/vcInstall.cxx | 2 + 9 files changed, 194 insertions(+), 93 deletions(-) create mode 100644 GCC_XML/Support/GCC/4.5/gccxml_builtins.h diff --git a/GCC_XML/GXFront/gxConfiguration.cxx b/GCC_XML/GXFront/gxConfiguration.cxx index 0fee700..8479369 100644 --- a/GCC_XML/GXFront/gxConfiguration.cxx +++ b/GCC_XML/GXFront/gxConfiguration.cxx @@ -1593,29 +1593,13 @@ bool gxConfiguration::FindFlagsGCC() INCLUDES = "-iwrapper\"" + supportPath + "/2.96\" " + INCLUDES; } } - else if(MAJOR_VERSION == 4 && MINOR_VERSION >= 4) + else if(MAJOR_VERSION >= 4) { - INCLUDES = "-iwrapper\"" + supportPath + "/4.4\" " + INCLUDES; - SPECIAL = "-include \"gccxml_builtins.h\""; - } - 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; - SPECIAL = "-include \"gccxml_builtins.h\""; - } - else if(MAJOR_VERSION == 4 && MINOR_VERSION >= 1) - { - INCLUDES = "-iwrapper\"" + supportPath + "/4.1\" " + INCLUDES; - SPECIAL = "-include \"gccxml_builtins.h\""; - } - else if(MAJOR_VERSION == 4 && MINOR_VERSION == 0) - { - INCLUDES = "-iwrapper\"" + supportPath + "/4.0\" " + INCLUDES; + gxsys_ios::ostringstream includes; + includes << "-iwrapper\"" << supportPath << "/" + << MAJOR_VERSION << "." << MINOR_VERSION << "\" " + << INCLUDES; + INCLUDES = includes.str(); SPECIAL = "-include \"gccxml_builtins.h\""; } else if(MAJOR_VERSION == 3 && MINOR_VERSION >= 4) diff --git a/GCC_XML/KWSys/DynamicLoader.cxx b/GCC_XML/KWSys/DynamicLoader.cxx index a337031..58e02c7 100644 --- a/GCC_XML/KWSys/DynamicLoader.cxx +++ b/GCC_XML/KWSys/DynamicLoader.cxx @@ -444,7 +444,7 @@ const char* DynamicLoader::LastError() // 5. Implementation for systems without dynamic libs // __gnu_blrts__ is IBM BlueGene/L // __LIBCATAMOUNT__ is defined on Catamount on Cray compute nodes -#if defined(__gnu_blrts__) || defined(__LIBCATAMOUNT__) +#if defined(__gnu_blrts__) || defined(__LIBCATAMOUNT__) || defined(__CRAYXT_COMPUTE_LINUX_TARGET) #include // for strerror() #define DYNAMICLOADER_DEFINED 1 diff --git a/GCC_XML/KWSys/ProcessUNIX.c b/GCC_XML/KWSys/ProcessUNIX.c index 373e906..57f7b16 100644 --- a/GCC_XML/KWSys/ProcessUNIX.c +++ b/GCC_XML/KWSys/ProcessUNIX.c @@ -2373,7 +2373,8 @@ static pid_t kwsysProcessFork(kwsysProcess* cp, Here we define the command to call on each platform and the corresponding parsing format string. The parsing format should have two integers to store: the pid and then the ppid. */ -#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__FreeBSD_kernel__) # define KWSYSPE_PS_COMMAND "ps axo pid,ppid" # define KWSYSPE_PS_FORMAT "%d %d\n" #elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \ diff --git a/GCC_XML/KWSys/SystemInformation.cxx b/GCC_XML/KWSys/SystemInformation.cxx index 7041d38..936c1f7 100644 --- a/GCC_XML/KWSys/SystemInformation.cxx +++ b/GCC_XML/KWSys/SystemInformation.cxx @@ -2395,11 +2395,13 @@ int SystemInformationImplementation::QueryMemory() #elif _WIN32 #if _MSC_VER < 1300 MEMORYSTATUS ms; + unsigned long tv, tp, av, ap; ms.dwLength = sizeof(ms); GlobalMemoryStatus(&ms); -#define MEM_VAL(value) dw##value + #define MEM_VAL(value) dw##value #else MEMORYSTATUSEX ms; + DWORDLONG tv, tp, av, ap; ms.dwLength = sizeof(ms); if (0 == GlobalMemoryStatusEx(&ms)) { @@ -2407,10 +2409,10 @@ int SystemInformationImplementation::QueryMemory() } #define MEM_VAL(value) ull##value #endif - unsigned long tv = ms.MEM_VAL(TotalVirtual); - unsigned long tp = ms.MEM_VAL(TotalPhys); - unsigned long av = ms.MEM_VAL(AvailVirtual); - unsigned long ap = ms.MEM_VAL(AvailPhys); + tv = ms.MEM_VAL(TotalVirtual); + tp = ms.MEM_VAL(TotalPhys); + av = ms.MEM_VAL(AvailVirtual); + ap = ms.MEM_VAL(AvailPhys); this->TotalVirtualMemory = tv>>10>>10; this->TotalPhysicalMemory = tp>>10>>10; this->AvailableVirtualMemory = av>>10>>10; diff --git a/GCC_XML/KWSys/SystemTools.cxx b/GCC_XML/KWSys/SystemTools.cxx index 1c00621..9ab0fdf 100644 --- a/GCC_XML/KWSys/SystemTools.cxx +++ b/GCC_XML/KWSys/SystemTools.cxx @@ -3065,38 +3065,35 @@ kwsys_stl::string SystemTools::RelativePath(const char* local, const char* remot return relativePath; } -// OK, some fun stuff to get the actual case of a given path. -// Basically, you just need to call ShortPath, then GetLongPathName, -// However, GetLongPathName is not implemented on windows NT and 95, -// so we have to simulate it on those versions #ifdef _WIN32 -int OldWindowsGetLongPath(kwsys_stl::string const& shortPath, - kwsys_stl::string& longPath ) +static int GetCasePathName(const kwsys_stl::string & pathIn, + kwsys_stl::string & casePath) { - kwsys_stl::string::size_type iFound = shortPath.rfind('/'); - if (iFound > 1 && iFound != shortPath.npos) + kwsys_stl::string::size_type iFound = pathIn.rfind('/'); + if (iFound > 1 && iFound != pathIn.npos) { // recurse to peel off components // - if (OldWindowsGetLongPath(shortPath.substr(0, iFound), longPath) > 0) + if (GetCasePathName(pathIn.substr(0, iFound), casePath) > 0) { - longPath += '/'; - if (shortPath[1] != '/') + casePath += '/'; + if (pathIn[1] != '/') { WIN32_FIND_DATA findData; // append the long component name to the path // - if (INVALID_HANDLE_VALUE != ::FindFirstFile - (shortPath.c_str(), &findData)) + HANDLE hFind = ::FindFirstFile(pathIn.c_str(), &findData); + if (INVALID_HANDLE_VALUE != hFind) { - longPath += findData.cFileName; + casePath += findData.cFileName; + ::FindClose(hFind); } else { // if FindFirstFile fails, return the error code // - longPath = ""; + casePath = ""; return 0; } } @@ -3104,37 +3101,9 @@ int OldWindowsGetLongPath(kwsys_stl::string const& shortPath, } else { - longPath = shortPath; + casePath = pathIn; } - return (int)longPath.size(); -} - - -int PortableGetLongPathName(const char* pathIn, - kwsys_stl::string & longPath) -{ - HMODULE lh = LoadLibrary("Kernel32.dll"); - if(lh) - { - FARPROC proc = GetProcAddress(lh, "GetLongPathNameA"); - if(proc) - { - typedef DWORD (WINAPI * GetLongFunctionPtr) (LPCSTR,LPSTR,DWORD); - GetLongFunctionPtr func = (GetLongFunctionPtr)proc; - char buffer[MAX_PATH+1]; - int len = (*func)(pathIn, buffer, MAX_PATH+1); - if(len == 0 || len > MAX_PATH+1) - { - FreeLibrary(lh); - return 0; - } - longPath = buffer; - FreeLibrary(lh); - return len; - } - FreeLibrary(lh); - } - return OldWindowsGetLongPath(pathIn, longPath); + return (int)casePath.size(); } #endif @@ -3153,29 +3122,19 @@ kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p) { return i->second; } - kwsys_stl::string shortPath; - if(!SystemTools::GetShortPath(p, shortPath)) - { - return p; - } - kwsys_stl::string longPath; - int len = PortableGetLongPathName(shortPath.c_str(), longPath); + kwsys_stl::string casePath; + int len = GetCasePathName(p, casePath); if(len == 0 || len > MAX_PATH+1) { 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] == ':') + if(casePath.size() > 1 && casePath[1] == ':') { - longPath[0] = toupper(longPath[0]); + casePath[0] = toupper(casePath[0]); } - (*SystemTools::LongPathMap)[p] = longPath; - return longPath; + (*SystemTools::LongPathMap)[p] = casePath; + return casePath; #endif } diff --git a/GCC_XML/KWSys/kwsysDateStamp.cmake b/GCC_XML/KWSys/kwsysDateStamp.cmake index c9cb963..f2f1c3b 100644 --- a/GCC_XML/KWSys/kwsysDateStamp.cmake +++ b/GCC_XML/KWSys/kwsysDateStamp.cmake @@ -15,7 +15,7 @@ SET(KWSYS_DATE_STAMP_YEAR 2010) # KWSys version date month component. Format is MM. -SET(KWSYS_DATE_STAMP_MONTH 01) +SET(KWSYS_DATE_STAMP_MONTH 04) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 30) +SET(KWSYS_DATE_STAMP_DAY 09) diff --git a/GCC_XML/KWSys/kwsysPlatformTests.cmake b/GCC_XML/KWSys/kwsysPlatformTests.cmake index 994b7e7..d042450 100644 --- a/GCC_XML/KWSys/kwsysPlatformTests.cmake +++ b/GCC_XML/KWSys/kwsysPlatformTests.cmake @@ -177,7 +177,7 @@ MACRO(KWSYS_PLATFORM_INFO_TEST lang var description) ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${var}.bin) # Compile the test binary. - IF(NOT DEFINED ${var}_COMPILED) + IF(NOT EXISTS ${KWSYS_PLATFORM_INFO_FILE}) MESSAGE(STATUS "${description}") TRY_COMPILE(${var}_COMPILED ${CMAKE_CURRENT_BINARY_DIR} diff --git a/GCC_XML/Support/GCC/4.5/gccxml_builtins.h b/GCC_XML/Support/GCC/4.5/gccxml_builtins.h new file mode 100644 index 0000000..20f40af --- /dev/null +++ b/GCC_XML/Support/GCC/4.5/gccxml_builtins.h @@ -0,0 +1,153 @@ +#define __builtin_apply(x,y,z) ((void*)0) +#define __builtin_nan(x) (0.0) +#define __builtin_nanf(x) (0.0f) +#define __builtin_nanl(x) (0.0l) +#define __builtin_huge_val(x) (0.0) +#define __builtin_huge_valf(x) (0.0f) +#define __builtin_huge_vall(x) (0.0l) +#define __builtin_apply_args(x) ((void*)0) +#define __builtin_types_compatible_p(x,y) 0 +#define __builtin_choose_expr(x,y,z) int +#define __builtin_constant_p(x) 0 +void* __builtin_memchr(void const*, int, unsigned int); +void __builtin_return (void *RESULT); +void * __builtin_return_address (unsigned int LEVEL); +void * __builtin_frame_address (unsigned int LEVEL); +long __builtin_expect (long EXP, long C); +void __builtin_prefetch (const void *ADDR, ...); +double __builtin_inf (void); +float __builtin_inff (void); +long double __builtin_infl (void); +double __builtin_nans (const char *str); +float __builtin_nansf (const char *str); +long double __builtin_nansl (const char *str); +double __builtin_acos(double); +float __builtin_acosf(float); +long double __builtin_acosl(long double); +double __builtin_asin(double); +float __builtin_asinf(float); +long double __builtin_asinl(long double); +double __builtin_atan(double); +double __builtin_atan2(double, double); +float __builtin_atan2f(float, float); +long double __builtin_atan2l(long double, long double); +float __builtin_atanf(float); +long double __builtin_atanl(long double); +double __builtin_ceil(double); +float __builtin_ceilf(float); +long double __builtin_ceill(long double); +double __builtin_cos(double); +float __builtin_cosf(float); +double __builtin_cosh(double); +float __builtin_coshf(float); +long double __builtin_coshl(long double); +long double __builtin_cosl(long double); +double __builtin_exp(double); +float __builtin_expf(float); +long double __builtin_expl(long double); +double __builtin_fabs(double); +float __builtin_fabsf(float); +long double __builtin_fabsl(long double); +double __builtin_floor(double); +float __builtin_floorf(float); +long double __builtin_floorl(long double); +float __builtin_fmodf(float, float); +long double __builtin_fmodl(long double, long double); +double __builtin_frexp(double, int*); +float __builtin_frexpf(float, int*); +long double __builtin_frexpl(long double, int*); +double __builtin_ldexp(double, int); +float __builtin_ldexpf(float, int); +long double __builtin_ldexpl(long double, int); +double __builtin_log(double); +double __builtin_log10(double); +float __builtin_log10f(float); +long double __builtin_log10l(long double); +float __builtin_logf(float); +long double __builtin_logl(long double); +float __builtin_modff(float, float*); +long double __builtin_modfl(long double, long double*); +float __builtin_powf(float, float); +long double __builtin_powl(long double, long double); +double __builtin_powi(double, int); +float __builtin_powif(float, int); +long double __builtin_powil(long double, int); +double __builtin_sin(double); +float __builtin_sinf(float); +double __builtin_sinh(double); +float __builtin_sinhf(float); +long double __builtin_sinhl(long double); +long double __builtin_sinl(long double); +double __builtin_sqrt(double); +float __builtin_sqrtf(float); +long double __builtin_sqrtl(long double); +double __builtin_tan(double); +float __builtin_tanf(float); +double __builtin_tanh(double); +float __builtin_tanhf(float); +long double __builtin_tanhl(long double); +long double __builtin_tanl(long double); +float __builtin_cabsf(float __complex__); +double __builtin_cabs(double __complex__); +long double __builtin_cabsl(long double __complex__); +float __builtin_cargf(float __complex__); +double __builtin_carg(double __complex__); +long double __builtin_cargl(long double __complex__); +int __builtin_ctz(int); +int __builtin_ctzl(long); +int __builtin_ctzll(long long); +int __builtin_popcount(int); +int __builtin_popcountl(long); +int __builtin_popcountll(long long); +float __complex__ __builtin_ccosf(float __complex__); +double __complex__ __builtin_ccos(double __complex__); +long double __complex__ __builtin_ccosl(long double __complex__); +float __complex__ __builtin_ccoshf(float __complex__); +double __complex__ __builtin_ccosh(double __complex__); +long double __complex__ __builtin_ccoshl(long double __complex__); +float __complex__ __builtin_cexpf(float __complex__); +double __complex__ __builtin_cexp(double __complex__); +long double __complex__ __builtin_cexpl(long double __complex__); +float __complex__ __builtin_clogf(float __complex__); +double __complex__ __builtin_clog(double __complex__); +long double __complex__ __builtin_clogl(long double __complex__); +float __complex__ __builtin_csinf(float __complex__); +double __complex__ __builtin_csin(double __complex__); +long double __complex__ __builtin_csinl(long double __complex__); +float __complex__ __builtin_csinhf(float __complex__); +double __complex__ __builtin_csinh(double __complex__); +long double __complex__ __builtin_csinhl(long double __complex__); +float __complex__ __builtin_csqrtf(float __complex__); +double __complex__ __builtin_csqrt(double __complex__); +long double __complex__ __builtin_csqrtl(long double __complex__); +float __complex__ __builtin_ctanf(float __complex__); +double __complex__ __builtin_ctan(double __complex__); +long double __complex__ __builtin_ctanl(long double __complex__); +float __complex__ __builtin_ctanhf(float __complex__); +double __complex__ __builtin_ctanh(double __complex__); +long double __complex__ __builtin_ctanhl(long double __complex__); +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.5 parser hard-codes handling of these, so they do not + have real signatures. */ +bool __builtin_fpclassify(...); +bool __builtin_isfinite(...); +bool __builtin_isgreater(...); +bool __builtin_isgreaterequal(...); +bool __builtin_isinf(...); +bool __builtin_isinf_sign(...); +bool __builtin_isless(...); +bool __builtin_islessequal(...); +bool __builtin_islessgreater(...); +bool __builtin_isnan(...); +bool __builtin_isnormal(...); +bool __builtin_isunordered(...); +bool __builtin_va_arg_pack(...); + +/* We fake some constant expressions from GCC 4.5 parser. */ +#define __is_pod(x) false +#define __is_empty(x) false +#define __has_trivial_destructor(x) false +#define __has_trivial_constructor(x) false diff --git a/GCC_XML/VcInstall/vcInstall.cxx b/GCC_XML/VcInstall/vcInstall.cxx index 2d65aea..f8608d2 100644 --- a/GCC_XML/VcInstall/vcInstall.cxx +++ b/GCC_XML/VcInstall/vcInstall.cxx @@ -91,6 +91,8 @@ int main(int argc, char* argv[]) { // English SP1 "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\InstalledProducts\\KB948484;", + // Team System English SP1 + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\InstalledProducts\\KB947888;", 0 }; const char* vc9exRegistry =