This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
read(), write() and ftell(), feof()
- To: gnu-win32 at cygnus dot com (gnuwin32)
- Subject: read(), write() and ftell(), feof()
- From: Todd "Waxahachiefortudinouslyexportitionismistically" Hartman <thartman at austin dot ibm dot com>
- Date: Thu, 9 Jul 1998 08:42:42 -0500 (CDT)
> 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@austin.ibm.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@cygnus.com" with one line of text: "help".