This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: stat file -- cygwin vs. Windows size?


Herb Martin wrote:

> Is there a standard Cygwin 'idiom' or function for
> dealing with this mismatch, or should I just re-invent
> the wheel.

Sure.  Don't use text mode.  Open the file in binary mode (O_BINARY with
open(), "b" with fopen()), or call setmode(fd, O_BINARY) once open, or
link against binmode.o.  Or just don't use text mode mounts.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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