bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug #3315] problems with ftp code in Borland C++ Builder


From: nobody
Subject: [Bug #3315] problems with ftp code in Borland C++ Builder
Date: Sat, 17 May 2003 15:06:09 -0400


=================== BUG #3315: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3315&group_id=89

Changes by: Federico Montesino Pouzols <address@hidden>
Date: Sat 05/17/2003 at 21:06 (Europe/Madrid)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | Later                     | Fixed
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Yes, it seems the best solution for now. It is in CVS.



=================== BUG #3315: FULL BUG SNAPSHOT ===================


Submitted by: awagger                 Project: commonc++                    
Submitted on: Thu 04/24/2003 at 00:36
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  Fixed                    
Assigned to:  fedemp                  Status:  Closed                       

Summary:  problems with ftp code in Borland C++ Builder

Original Submission:  I found (and fixed) two problems with the ftp code in 
libcommonc++2-1.0.9 when using the Borland C++ Builder (version 5).

1) I had to comment out line ftp.cpp:647 in method 
FTPSocket::DirEntry::parse(string li):

    str.get();  // skip space

since the mentioned space seemed to be included in the variable "junk", filled 
in the line bevore (ftp.cpp:646):

    str >> access >> junk >> user >> group >> size >> junk >> junk >> junk;


I don't know if it is an istream operator implementation problem or a unix <-> 
windows problem.


2) I had to change line ftp.cpp:482:

    ofstream f( lfilename.c_str() );

by explicitly specifying binary output mode like this:

    ofstream f( lfilename.c_str(),
        std::ios::out|std::ios::trunc|std::ios::binary );

otherwise the char '\n' got written as two bytes (as usual in windows in 
text-mode). So this is clearly a unix <-> windows porting problem. But I think, 
it should be perfectly ok, to use the same code for unix, since the result 
should be the same.



Follow-up Comments
*******************

-------------------------------------------------------
Date: Sat 05/17/2003 at 21:06       By: fedemp
Yes, it seems the best solution for now. It is in CVS.

-------------------------------------------------------
Date: Fri 05/16/2003 at 13:05       By: awagger
I still don't know where exactly the problem number 1) comes from, but a fix 
that does not break the lib on any other platform but still fixes the issue 
with the BCB is of course:

#ifndef __BORLANDC__
    str.get(); // skip space
#endif /* __BORLANDC__ */

-------------------------------------------------------
Date: Sun 05/11/2003 at 15:02       By: fedemp

 The second issue is fixed in CVS. As for the first one, I
suspect that your proposed change will break the library on
other platforms. Does anyone know if this happens because of
the istream implementation of Borland c++?.



CC List
*******

CC Address                          | Comment
------------------------------------+-----------------------------
address@hidden               | 



No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3315&group_id=89




reply via email to

[Prev in Thread] Current Thread [Next in Thread]