(file) Return to FileSystem.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/FileSystem.cpp between version 1.77 and 1.77.4.3

version 1.77, 2008/06/18 18:12:00 version 1.77.4.3, 2008/12/03 18:28:28
Line 478 
Line 478 
 #endif #endif
 } }
  
 Boolean GetLine(PEGASUS_STD(istream)& is, String& line)  Boolean GetLine(PEGASUS_STD(istream)& is, Buffer& line)
 { {
       const Uint32 buffersize = 1024;
       Uint32 gcount = 0;
   
     line.clear();     line.clear();
  
     Boolean gotChar = false;      // Read the input line in chunks.  A non-full buffer indicates the end of
 #ifdef PEGASUS_PLATFORM_ZOS_ZSERIES_IBM      // the line has been reached.
     char input[1000];      do
     is.getline(input,1000);      {
     line.assign(input);          char input[buffersize];
  
     gotChar = !(is.rdstate() & PEGASUS_STD(istream)::failbit);          // This reads up to buffersize-1 char, but stops before consuming
 #else          // a newline character ('\n').
     char c;          is.get(input, buffersize);
  
     while (is.get(c))          gcount = (Uint32)is.gcount();
     {          line.append(input, gcount);
         gotChar = true;  
  
         if (c == '\n')          if (is.rdstate() & PEGASUS_STD(istream)::failbit)
           {
               // It is okay if we encounter the newline character without reading
               // data.
               is.clear();
             break;             break;
           }
       } while (gcount == buffersize-1);
  
         line.append(c);      if (!is.eof())
       {
           // we need to consume the '\n', because get() doesn't
           char c = 0;
           is.get(c);
     }     }
 #endif  
  
     return gotChar;      return !!is;
 } }
  
 // //
Line 522 
Line 533 
     PEG_METHOD_ENTER(TRC_AUTHENTICATION, "FileSystem::changeFileOwner()");     PEG_METHOD_ENTER(TRC_AUTHENTICATION, "FileSystem::changeFileOwner()");
  
     struct passwd* userPasswd;     struct passwd* userPasswd;
 #if defined(PEGASUS_PLATFORM_SOLARIS_SPARC_CC) || \  #if defined(PEGASUS_OS_SOLARIS) || \
     defined(PEGASUS_OS_HPUX) || \     defined(PEGASUS_OS_HPUX) || \
     defined(PEGASUS_OS_LINUX) || \     defined(PEGASUS_OS_LINUX) || \
     defined (PEGASUS_OS_VMS)      defined (PEGASUS_OS_VMS) || \
       defined (PEGASUS_OS_AIX)
  
     const unsigned int PWD_BUFF_SIZE = 1024;     const unsigned int PWD_BUFF_SIZE = 1024;
     struct passwd pwd;     struct passwd pwd;


Legend:
Removed from v.1.77  
changed lines
  Added in v.1.77.4.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2