bug-gplusplus
[Top][All Lists]
Advanced

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

using sockets by the fstream interface


From: Tkachuck Andrey
Subject: using sockets by the fstream interface
Date: Tue, 14 Nov 2000 21:15:53 +0200 (EET)

Dear gurus, at first I want to ask you forgiveness for my english, because i'm
just an ukrainian...

So, when i developed the client/server progect, I wanted my server to be on C++
and use sockets.
I prefere to work with c++ standart iostream library and wanted to work with
sockets by fstream interface. But... it didn't work.
I've tried to work with sockets by standart C FILE interface: all was fine but
with C++'s fstream not. It didn't work only when program was alredy builded: on
the stage of compiling and linking all was fine. So, after the long period of
seeking bug it seems to me that i've found it. This was year ago and because of
this i can't explain why it works: the long period, and i have not time to
parse it again for explanation maby you as developers will understand this
little change. The contents of patch file is this:


--- libio/fileops.c     Wed Mar  1 15:51:02 2000
+++ fileops.c   Wed Mar  1 15:54:31 2000
@@ -258,7 +258,7 @@
        Instead, just indicate that offset (before and after) is
        unpredictable. */
     fp->_offset = _IO_pos_BAD;
-  else if (fp->_IO_read_end != fp->_IO_write_base)
+  else if (fp->_IO_read_end != fp->_IO_write_base && fp->_offset != 
_IO_pos_BAD)
     {
       _IO_pos_t new_pos
        = _IO_SYSSEEK (fp, fp->_IO_write_base - fp->_IO_read_end, 1);


That's all! My only goal is to improve your soft for my soft will work by
compiling on other mashines with your new perfect gcc :)

Thank you very mutch for attention.
My best regards.
PS: If you please, reply me with results of inspection of this problem.
  Andrey Tkachuk
  ICQ: 77275730
--
15 ноя  Niagara Falls power plant startup, 1896




reply via email to

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