Salome HOME
PR: merge from tag BR_CCRT2_mergeto_V2_1_0b1
[modules/kernel.git] / src / Container / Component_i.cxx
index a03faf92b6a5de411229855585e45ddc4542a101..0e28bd47d681594b02c1b2674c8702db82cd086d 100644 (file)
@@ -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: "<<cle<<" = "<< value);
        }
     }
@@ -224,7 +231,7 @@ char* Engines_Component_i::nodeName() {
   return CORBA::string_dup( _nodeName.c_str() ) ;
 }
 
-bool Engines_Component_i::Killer( int ThreadId , int signum ) {
+bool Engines_Component_i::Killer( pthread_t ThreadId , int signum ) {
   if ( ThreadId ) {
     if ( signum == 0 ) {
       if ( pthread_cancel( ThreadId ) ) {
@@ -347,7 +354,7 @@ long Engines_Component_i::CpuUsed() {
   return cpu ;
 }
 
-long Engines_Component_i::CpuUsed_impl() {
+CORBA::Long Engines_Component_i::CpuUsed_impl() {
   long cpu = 0 ;
   if ( _ThreadId || _Executed ) {
     if ( _ThreadId > 0 ) {