This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: stat file -- cygwin vs. Windows size?
- From: Brian Dessent <brian at dessent dot net>
- To: 'Cygwin List' <cygwin at cygwin dot com>
- Date: Fri, 24 Jun 2005 11:22:02 -0700
- Subject: Re: stat file -- cygwin vs. Windows size?
- References: <20206A8F2DE2@mail.learnquick.com>
- Reply-to: cygwin at cygwin dot com
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/