From 1db0da3a40a4f05e57e6839cc46332c2fd5cef2d Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 26 Nov 2004 12:30:10 +0000 Subject: [PATCH] Porting on CCRT: --- src/Container/Component_i.cxx | 13 ++++++++++--- src/Container/Container_i.cxx | 2 +- src/Container/Makefile.in | 2 +- src/Container/SALOME_Component_i.hxx | 4 ++-- src/Container/SALOME_Container_i.hxx | 2 +- src/ModuleGenerator/testIDLparser.in | 9 ++++++--- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index a03faf92b..0e28bd47d 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -193,7 +193,14 @@ void Engines_Component_i::beginService(const char *serviceName) { const char* value; (*it).second >>= value; - int ret = setenv(cle.c_str(), value, overwrite); + //CCRT porting : setenv not defined in stdlib.h + std::string s(cle); + s+='='; + s+=value; + //char* cast because 1st arg of linux putenv function is not a const char* !!! + int ret=putenv((char *)s.c_str()); + //End of CCRT porting + //int ret = setenv(cle.c_str(), value, overwrite); MESSAGE("--- setenv: "< 0 ) { diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index b753a6707..ca47f23d9 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -448,7 +448,7 @@ void SigIntHandler(int what , siginfo_t * siginfo , // Get the PID of the Container -long Engines_Container_i::getPID() { +CORBA::Long Engines_Container_i::getPID() { return (long)getpid(); } diff --git a/src/Container/Makefile.in b/src/Container/Makefile.in index 6d68f0fd7..308814390 100644 --- a/src/Container/Makefile.in +++ b/src/Container/Makefile.in @@ -56,6 +56,6 @@ CXXFLAGS+=$(OCC_CXXFLAGS) LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace -LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) $(MPI_LIBS) -lCASCatch +LIBS += @LDEXPDYNFLAGS@ $(PYTHON_LIBS) $(MPI_LIBS) -lCASCatch @CONCLUDE@ diff --git a/src/Container/SALOME_Component_i.hxx b/src/Container/SALOME_Component_i.hxx index 16a135dc2..2911434da 100644 --- a/src/Container/SALOME_Component_i.hxx +++ b/src/Container/SALOME_Component_i.hxx @@ -83,14 +83,14 @@ public: void Names( const char * graphName , const char * nodeName ) ; char * graphName() ; char * nodeName() ; - bool Killer( int ThreadId , int signum ); + bool Killer( pthread_t ThreadId , int signum ); bool Kill_impl(); bool Stop_impl(); bool Suspend_impl(); bool Resume_impl(); void SetCurCpu() ; long CpuUsed() ; - long CpuUsed_impl() ; + CORBA::Long CpuUsed_impl() ; protected: std::string _instanceName ; diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index 6a65dcb3c..6f309c50c 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -76,7 +76,7 @@ public: bool Kill_impl() ; char* getHostName(); - long getPID(); + CORBA::Long getPID(); protected: diff --git a/src/ModuleGenerator/testIDLparser.in b/src/ModuleGenerator/testIDLparser.in index 5daf6da85..94eccf70c 100755 --- a/src/ModuleGenerator/testIDLparser.in +++ b/src/ModuleGenerator/testIDLparser.in @@ -1,7 +1,10 @@ #!/bin/bash -export ROOT_SRCDIR=@ROOT_SRCDIR@ -export ROOT_BUILDDIR=@ROOT_BUILDDIR@ -export SRCDIR=${ROOT_SRCDIR}/SALOME/src/ModuleGenerator +ROOT_SRCDIR=@ROOT_SRCDIR@ +export ROOT_SRCDIR +ROOT_BUILDDIR=@ROOT_BUILDDIR@ +export ROOT_BUILDDIR +SRCDIR=${ROOT_SRCDIR}/SALOME/src/ModuleGenerator +export SRCDIR ${SRCDIR}/tests/test$1.sh -- 2.39.2