delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/05/17:11:12

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Andrew DeFaria <ADeFaria AT Salira DOT 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 DOT g84E0T2H015234 AT im1 DOT sec DOT tds DOT net> <3D7625E2 DOT 8040109 AT DeFaria DOT com>
Reply-To: cygwin AT cygwin DOT com
NNTP-Posting-Host: 206.184.204.2
Mime-Version: 1.0
X-Trace: main.gmane.org 1031168357 21823 206.184.204.2 (4 Sep 2002 19:39:17 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT 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 AT chorus DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019