Skip to content

Commit

Permalink
gccxml 2009-06-25 (e998d127)
Browse files Browse the repository at this point in the history
  • Loading branch information
GCC-XML committed Jun 25, 2009
1 parent 96509cc commit 11708a3
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 26 deletions.
11 changes: 4 additions & 7 deletions GCC/gcc/cp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions GCC/gcc/cp/gccxml_prefix.h.in
Original file line number Diff line number Diff line change
@@ -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
9 changes: 5 additions & 4 deletions GCC/gcc/prefix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <gccxml_prefix.h>
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 *);
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions GCC_XML/KWSys/Configure.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
15 changes: 7 additions & 8 deletions GCC_XML/KWSys/ProcessUNIX.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2309,6 +2313,7 @@ static void kwsysProcessExit(void)
}

/*--------------------------------------------------------------------------*/
#if !defined(__VMS)
static pid_t kwsysProcessFork(kwsysProcess* cp,
kwsysProcessCreateInformation* si)
{
Expand Down Expand Up @@ -2363,6 +2368,7 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
return fork();
}
}
#endif

/*--------------------------------------------------------------------------*/
/* We try to obtain process information by invoking the ps command.
Expand Down Expand Up @@ -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)
{
Expand All @@ -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

/*--------------------------------------------------------------------------*/
Expand Down
10 changes: 5 additions & 5 deletions GCC_XML/KWSys/ProcessWin32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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 =
Expand Down
1 change: 0 additions & 1 deletion GCC_XML/KWSys/SystemTools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<long>(length);
}

// Return the results.
Expand Down
2 changes: 1 addition & 1 deletion GCC_XML/KWSys/kwsysDateStamp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions GCC_XML/Support/GCC/4.3/gccxml_builtins.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ bool __builtin_isless(...);
bool __builtin_islessequal(...);
bool __builtin_islessgreater(...);
bool __builtin_isunordered(...);
bool __builtin_va_arg_pack(...);

/*
Expand Down

0 comments on commit 11708a3

Please sign in to comment.