robweir     99/12/23 22:42:50

  Modified:    c/src/XercesPlatformSupport TextFileOutputStream.cpp
  Log:
  Add runtime check of Win32 platform so we can fallback correctly
  on Win95/98 where wide-character paths are not supported.
  
  Revision  Changes    Path
  1.2       +8 -7      
xml-xalan/c/src/XercesPlatformSupport/TextFileOutputStream.cpp
  
  Index: TextFileOutputStream.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XercesPlatformSupport/TextFileOutputStream.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TextFileOutputStream.cpp  1999/12/18 19:48:15     1.1
  +++ TextFileOutputStream.cpp  1999/12/24 06:42:50     1.2
  @@ -80,12 +80,6 @@
   
   
   
  -namespace
  -{
  -     const bool                      gOnNT = true;
  -};
  -
  -
   
   
   const TextFileOutputStream::BufferType::size_type    
TextFileOutputStream::s_bufferSize = 8192;
  @@ -105,7 +99,14 @@
        m_buffer.reserve(s_bufferSize + 1);
   
   #if defined(_MSC_VER)
  -    if (gOnNT)
  +
  +     // check the version.  Only NT allows  
  +     // wide character file paths
  +     OSVERSIONINFO verInfo;
  +     verInfo.dwOSVersionInfoSize=sizeof(verInfo);
  +     ::GetVersionEx(&verInfo);
  +
  +    if (verInfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
       {
           m_handle = ::CreateFileW(toCharArray(theFileName),
                                                                 GENERIC_WRITE,
  
  
  

Reply via email to