Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Andrew DeFaria <ADeFaria@Salira.com>
Subject: Re: File reading problem with -mno-cygwin
Date: Wed, 04 Sep 2002 12:40:46 -0700
Lines: 21
Message-ID: <3D7661BE.3000903@Salira.com>
References: <200209041400.g84E0T2H015234@im1.sec.tds.net> <3D7625E2.8040109@DeFaria.com>
Reply-To: cygwin@cygwin.com
NNTP-Posting-Host: 206.184.204.2
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: main.gmane.org 1031168357 21823 206.184.204.2 (4 Sep 2002 19:39:17 GMT)
X-Complaints-To: usenet@main.gmane.org
NNTP-Posting-Date: Wed, 4 Sep 2002 19:39:17 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en, ru, zh

Andrew DeFaria wrote:

> jdhagen@chorus.net wrote:
>
>> As Corinna mentioned, opening the file in binary mode would eliminate 
>> the problem.
>>
>> The data file "sf" actually contains a byte 0x1A that is interpreted 
>> in text mode on DOS / Windows
>> systems as end-of-file.
>>
>> In binary mode, this won't be interpreted as end-of-file.
>
> Thanks. Actually I figured this out about 1 - 2 hours after I posted. 
> I still have some other problems in my process but this one that I 
> isolated has been resolved.

One question remains however and that is why would it work in Cygwin but 
not in -mno-cygwin? My theory is that opening a file with "r" under 
Cygwin is equivalent to "rb".




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

