You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2001/10/24 01:11:33 UTC

cvs commit: xml-xerces/c/src/util/Platforms/OS400 OS400PlatformUtils.cpp

peiyongz    01/10/23 16:11:33

  Modified:    c/src/util/Platforms/OS400 OS400PlatformUtils.cpp
  Log:
  [Bug#880] patch to PlatformUtils:init()/term() and related. from Mark Weaver
  
  Revision  Changes    Path
  1.7       +16 -5     xml-xerces/c/src/util/Platforms/OS400/OS400PlatformUtils.cpp
  
  Index: OS400PlatformUtils.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/OS400/OS400PlatformUtils.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OS400PlatformUtils.cpp	2001/06/19 19:30:59	1.6
  +++ OS400PlatformUtils.cpp	2001/10/23 23:11:33	1.7
  @@ -55,7 +55,7 @@
    */
   
   /**
  - * $Id: OS400PlatformUtils.cpp,v 1.6 2001/06/19 19:30:59 tng Exp $
  + * $Id: OS400PlatformUtils.cpp,v 1.7 2001/10/23 23:11:33 peiyongz Exp $
    */
   
   // ---------------------------------------------------------------------------
  @@ -82,10 +82,11 @@
   
   #if defined (XML_USE_ICONV400_TRANSCODER)
       #include <util/Transcoders/Iconv400/Iconv400TransService.hpp>
  +	extern "C" void cleanupDefaultConverter();
   #elif defined (XML_USE_ICU_TRANSCODER)
       #include <util/Transcoders/ICU/ICUTransService.hpp>
   #else
  - Transcoder not Specified - FOr OS/400 must be either ICU or Iconv400
  + Transcoder not Specified - For OS/400 must be either ICU or Iconv400 
   #endif
   
   #if defined(XML_USE_MSGFILE_MESSAGELOADER)
  @@ -159,8 +160,12 @@
   
       gAtomicOpMutex = new pthread_mutex_t;	
   
  -    if (pthread_mutex_init(gAtomicOpMutex, NULL))
  +    if (pthread_mutex_init(gAtomicOpMutex, NULL)) {
  +		delete gAtomicOpMutex;
  +		gAtomicOpMutex = 0;
  +
           panic( XMLPlatformUtils::Panic_SystemInit );
  +	}
   }
   //
   //  This method is called very early in the bootstrapping process. This guy
  @@ -756,6 +761,7 @@
       return tmp;
   }
   
  +
   #else // #if !defined (APP_NO_THREADS)
   
   void XMLPlatformUtils::closeMutex(void* const mtxHandle)
  @@ -816,6 +822,11 @@
   
   void XMLPlatformUtils::platformTerm()
   {
  -    // We don't have any termination requirements at this time
  -}
  +	pthread_mutex_destroy(gAtomicOpMutex);
  +    delete gAtomicOpMutex;
  +	gAtomicOpMutex = 0;
   
  +#if defined (XML_USE_ICONV400_TRANSCODER)
  +	cleanupDefaultConverter();
  +#endif
  +}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org