Mail Archives: cygwin/1998/07/10/01:29:44
From: | thartman AT austin DOT ibm DOT com (Todd Waxahachiefortudinouslyexportitionismistically Hartman)
|
Subject: | read(), write() and ftell(), feof()
|
10 Jul 1998 01:29:44 -0700
: | |
Message-ID: | <199807091342.IAA22836.cygnus.gnu-win32@fredthecat.austin.ibm.com>
|
Mime-Version: | 1.0
|
To: | gnu-win32 AT cygnus DOT com (gnuwin32)
|
> Under win32 (nad also linux) when reading/writing to a file using
> read()/write() does not update the file pointer information so that functions
> like ftell() and feof() do not work properly. These functions do update the
> file pointers properly under Solaris and Unixware. What gives?
>
> David Chazin
Is this behavior guaranteed under POSIX? Why are you using read()/write()?
I don't think you can mix buffered and unbuffered I/O and expect things
to function properly. If you don't want to use fread()/fwrite() with
streams, than you probably should forget about using the other functions
and macros that deal with the stream structure (FILE).
todd.
--
Todd Hartman thartman AT austin DOT ibm DOT com (512)838-8789
The opinions which may or may not be explicitly expressed or implied in this
document are completely my own and are not necessarily those of my employer.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -