delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/14/17:10:38

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <5.0.2.1.0.20010214165225.00a95e40@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Wed, 14 Feb 2001 16:57:39 -0500
To: Jean Delvare <delvare AT ensicaen DOT ismra DOT fr>
From: "Larry Hall (RFK Partners Inc)" <lhall AT rfk DOT com>
Subject: Re: file descriptors opened as text files
Cc: cygwin AT sources DOT redhat DOT com
In-Reply-To: <Pine.SO4.4.05.10102142220300.22033-100000@e3000.ensicaen.i
smra.fr>
References: <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20010214161933 DOT 00a7b440 AT pop DOT ma DOT ultranet DOT com>
Mime-Version: 1.0

At 04:37 PM 2/14/01, Jean Delvare wrote:

>> The output of cygcheck -s -r -v would undoubtedly point to the difference.
>> My guess is that you are either opening the file in a mounted file system
>> or the default mode for opening unmounted files is different on the two 
>> systems.  This has nothing to do with Windows.
>
>It must. Let me tell you more.


Fine but it still has nothing to do with Windows.


>I'm writing my program using cygwin on my Windows 98. It works from
>Cygwin's bash on my partition, all binary mounted. It works from Windows
>itself, run from Dos Command Prompt using cygwin1.dll version 1.1.8.

Type "mount" on your system.  What does it show?  Is the file in question
being written under any of these mount points?  Any of them binary?


>I send the executable and the dll to a friend running Windows 98 SE. The
>program fails. Analysing what's wrong. I could see the files were
>considered as text files.


Bingo.  Cygwin treats files as text by default, unless you specify a 
different default.  If you want your program to treat the file as binary,
add the appropriate flags on the appropriate calls.  Whamo!  Your problem
is solved.


>So, the comparison is between binary+dll on Windows 98 and binary+dll on
>Windows 98 SE. Is there somewhere (registry?) where cygwin looks to know
>if a given extension is text or binary ? I just can't figure out why I
>obtain a different behavior depending on Windows' version.


Because you don't.


>By the way, why doesn't Cygwin consider files as binary by default ? It
>would help a lot, isn't it ?


That's an old argument.  If you're interested in it, check the mail 
archives.  Its been argued back and forth there plenty!



Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX
                                        


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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