diff --git a/GCC/gcc/cp/CMakeLists.txt b/GCC/gcc/cp/CMakeLists.txt index 40c88b5..9d50560 100644 --- a/GCC/gcc/cp/CMakeLists.txt +++ b/GCC/gcc/cp/CMakeLists.txt @@ -16,18 +16,15 @@ ENDIF(CMAKE_SYSTEM MATCHES "HP-UX") #----------------------------------------------------------------------------- # Special flags for some source files. -IF(XCODE) - SET_SOURCE_FILES_PROPERTIES(../prefix.c - PROPERTIES COMPILE_FLAGS "-DPREFIX=\\\"${CMAKE_INSTALL_PREFIX}\\\"") -ELSE(XCODE) - SET_SOURCE_FILES_PROPERTIES(../prefix.c - PROPERTIES COMPILE_FLAGS "-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") -ENDIF(XCODE) IF(CYGWIN) SET_SOURCE_FILES_PROPERTIES(../cppdefault.c PROPERTIES COMPILE_FLAGS "-DTOOL_INCLUDE_DIR=/usr/include") ENDIF(CYGWIN) +INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +CONFIGURE_FILE(${GCC_SOURCE_DIR}/gcc/cp/gccxml_prefix.h.in + ${GCC_BINARY_DIR}/gcc/cp/gccxml_prefix.h @ONLY IMMEDIATE) + ADD_EXECUTABLE(gccxml_cc1plus cp-lang.c ../stub-objc.c call.c decl.c expr.c pt.c typeck2.c class.c decl2.c error.c lex.c parser.c ptree.c rtti.c typeck.c cvt.c except.c diff --git a/GCC/gcc/cp/gccxml_prefix.h.in b/GCC/gcc/cp/gccxml_prefix.h.in new file mode 100644 index 0000000..ca588f9 --- /dev/null +++ b/GCC/gcc/cp/gccxml_prefix.h.in @@ -0,0 +1,5 @@ +/* prefix.c includes this header to get its PREFIX definition. */ +#ifndef gccxml_prefix_h +#define gccxml_prefix_h +# define PREFIX "@CMAKE_INSTALL_PREFIX@" +#endif diff --git a/GCC/gcc/prefix.c b/GCC/gcc/prefix.c index 3c22c95..d34e85c 100644 --- a/GCC/gcc/prefix.c +++ b/GCC/gcc/prefix.c @@ -74,9 +74,10 @@ Boston, MA 02110-1301, USA. */ #endif #include "prefix.h" -/* BEGIN GCC-XML MODIFICATIONS (2007/10/31 15:07:10) */ +/* BEGIN GCC-XML MODIFICATIONS 2009-06-22 */ +#include static const char *std_prefix = GCC_TO_STRING(PREFIX); -/* END GCC-XML MODIFICATIONS (2007/10/31 15:07:10) */ +/* END GCC-XML MODIFICATIONS 2009-06-22 */ static const char *get_key_value (char *); static char *translate_name (char *); @@ -217,9 +218,9 @@ translate_name (char *name) prefix = getenv (key); if (prefix == 0) -/* BEGIN GCC-XML MODIFICATIONS (2007/10/31 15:07:10) */ +/* BEGIN GCC-XML MODIFICATIONS (2009/06/23 11:57:24) */ prefix = GCC_TO_STRING(PREFIX); -/* END GCC-XML MODIFICATIONS (2007/10/31 15:07:10) */ +/* END GCC-XML MODIFICATIONS (2009/06/23 11:57:24) */ /* We used to strip trailing DIR_SEPARATORs here, but that can sometimes yield a result with no separator when one was coded diff --git a/GCC_XML/KWSys/Configure.h.in b/GCC_XML/KWSys/Configure.h.in index 2cb5813..f83b7e4 100644 --- a/GCC_XML/KWSys/Configure.h.in +++ b/GCC_XML/KWSys/Configure.h.in @@ -22,6 +22,13 @@ # define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT #endif +/* Disable some warnings inside kwsys source files. */ +#if defined(KWSYS_NAMESPACE) +# if defined(__BORLANDC__) +# pragma warn -8027 /* function not inlined. */ +# endif +#endif + /* Whether kwsys namespace is "kwsys". */ #define @KWSYS_NAMESPACE@_NAME_IS_KWSYS @KWSYS_NAME_IS_KWSYS@ diff --git a/GCC_XML/KWSys/ProcessUNIX.c b/GCC_XML/KWSys/ProcessUNIX.c index 18bbad7..101af1e 100644 --- a/GCC_XML/KWSys/ProcessUNIX.c +++ b/GCC_XML/KWSys/ProcessUNIX.c @@ -176,7 +176,9 @@ static void kwsysProcessRestoreDefaultSignalHandlers(void); static pid_t kwsysProcessFork(kwsysProcess* cp, kwsysProcessCreateInformation* si); static void kwsysProcessKill(pid_t process_id); +#if defined(__VMS) static int kwsysProcessSetVMSFeature(const char* name, int value); +#endif static int kwsysProcessesAdd(kwsysProcess* cp); static void kwsysProcessesRemove(kwsysProcess* cp); #if KWSYSPE_USE_SIGINFO @@ -727,12 +729,14 @@ void kwsysProcess_Execute(kwsysProcess* cp) return; } +#if defined(__VMS) /* Make sure pipes behave like streams on VMS. */ if(!kwsysProcessSetVMSFeature("DECC$STREAM_PIPE", 1)) { kwsysProcessCleanup(cp, 1); return; } +#endif /* Save the real working directory of this process and change to the working directory for the child processes. This is needed @@ -2309,6 +2313,7 @@ static void kwsysProcessExit(void) } /*--------------------------------------------------------------------------*/ +#if !defined(__VMS) static pid_t kwsysProcessFork(kwsysProcess* cp, kwsysProcessCreateInformation* si) { @@ -2363,6 +2368,7 @@ static pid_t kwsysProcessFork(kwsysProcess* cp, return fork(); } } +#endif /*--------------------------------------------------------------------------*/ /* We try to obtain process information by invoking the ps command. @@ -2485,7 +2491,7 @@ static void kwsysProcessKill(pid_t process_id) /*--------------------------------------------------------------------------*/ #if defined(__VMS) -int decc$feature_get_index(char *name); +int decc$feature_get_index(const char* name); int decc$feature_set_value(int index, int mode, int value); static int kwsysProcessSetVMSFeature(const char* name, int value) { @@ -2494,13 +2500,6 @@ static int kwsysProcessSetVMSFeature(const char* name, int value) i = decc$feature_get_index(name); return i >= 0 && (decc$feature_set_value(i, 1, value) >= 0 || errno == 0); } -#else -static int kwsysProcessSetVMSFeature(const char* name, int value) -{ - (void)name; - (void)value; - return 1; -} #endif /*--------------------------------------------------------------------------*/ diff --git a/GCC_XML/KWSys/ProcessWin32.c b/GCC_XML/KWSys/ProcessWin32.c index 0e30dc1..97fa61e 100644 --- a/GCC_XML/KWSys/ProcessWin32.c +++ b/GCC_XML/KWSys/ProcessWin32.c @@ -806,7 +806,7 @@ int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe, const char* file) } if(file) { - *pfile = malloc(strlen(file)+1); + *pfile = (char*)malloc(strlen(file)+1); if(!*pfile) { return 0; @@ -1666,7 +1666,7 @@ int kwsysProcessInitialize(kwsysProcess* cp) cp->RealWorkingDirectoryLength = GetCurrentDirectory(0, 0); if(cp->RealWorkingDirectoryLength > 0) { - cp->RealWorkingDirectory = malloc(cp->RealWorkingDirectoryLength); + cp->RealWorkingDirectory = (char*)malloc(cp->RealWorkingDirectoryLength); if(!cp->RealWorkingDirectory) { return 0; @@ -1834,7 +1834,7 @@ int kwsysProcessCreate(kwsysProcess* cp, int index, /* The forwarding executable is given a handle to the error pipe and resume and kill events. */ - realCommand = malloc(strlen(cp->Win9x)+strlen(cp->Commands[index])+100); + realCommand = (char*)malloc(strlen(cp->Win9x)+strlen(cp->Commands[index])+100); if(!realCommand) { return 0; @@ -2672,7 +2672,7 @@ static int kwsysProcess_List__New_NT4(kwsysProcess_List* self) loaded in this program. This does not actually increment the reference count to the module so we do not need to close the handle. */ - HANDLE hNT = GetModuleHandle("ntdll.dll"); + HMODULE hNT = GetModuleHandle("ntdll.dll"); if(hNT) { /* Get pointers to the needed API functions. */ @@ -2776,7 +2776,7 @@ static int kwsysProcess_List__New_Snapshot(kwsysProcess_List* self) loaded in this program. This does not actually increment the reference count to the module so we do not need to close the handle. */ - HANDLE hKernel = GetModuleHandle("kernel32.dll"); + HMODULE hKernel = GetModuleHandle("kernel32.dll"); if(hKernel) { self->P_CreateToolhelp32Snapshot = diff --git a/GCC_XML/KWSys/SystemTools.cxx b/GCC_XML/KWSys/SystemTools.cxx index 3dbdf02..21cd59f 100644 --- a/GCC_XML/KWSys/SystemTools.cxx +++ b/GCC_XML/KWSys/SystemTools.cxx @@ -3963,7 +3963,6 @@ bool SystemTools::GetLineFromStream(kwsys_ios::istream& is, // Append the data read to the line. line.append(buffer); - sizeLimit = sizeLimit - static_cast(length); } // Return the results. diff --git a/GCC_XML/KWSys/kwsysDateStamp.cmake b/GCC_XML/KWSys/kwsysDateStamp.cmake index 9130a59..9ae14f8 100644 --- a/GCC_XML/KWSys/kwsysDateStamp.cmake +++ b/GCC_XML/KWSys/kwsysDateStamp.cmake @@ -7,4 +7,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2009) SET(KWSYS_DATE_STAMP_MONTH 06) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 12) +SET(KWSYS_DATE_STAMP_DAY 25) diff --git a/GCC_XML/Support/GCC/4.3/gccxml_builtins.h b/GCC_XML/Support/GCC/4.3/gccxml_builtins.h index dd297eb..aaef13e 100644 --- a/GCC_XML/Support/GCC/4.3/gccxml_builtins.h +++ b/GCC_XML/Support/GCC/4.3/gccxml_builtins.h @@ -142,6 +142,7 @@ bool __builtin_isless(...); bool __builtin_islessequal(...); bool __builtin_islessgreater(...); bool __builtin_isunordered(...); +bool __builtin_va_arg_pack(...); /*