This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

read(), write() and ftell(), feof()


> 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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]