This is the mail archive of the
mailing list for the Cygwin project.
RE: New version of setup.exe with fixes for i686-pc-cygwin/* problem
- To: "'cygwin at sourceware dot cygnus dot com'" <cygwin at sourceware dot cygnus dot com>
- Subject: RE: New version of setup.exe with fixes for i686-pc-cygwin/* problem
- From: Bernard Dautrevaux <Dautrevaux at microprocess dot com>
- Date: Fri, 9 Jun 2000 18:07:25 +0200
> -----Original Message-----
> From: Chris Faylor [mailto:email@example.com]
> Sent: Thursday, June 08, 2000 10:11 PM
> To: firstname.lastname@example.org
> Subject: Re: New version of setup.exe with fixes for i686-pc-cygwin/*
> On Thu, Jun 08, 2000 at 09:03:22PM +0100, Jonathan Larmour wrote:
> >In article <email@example.com>
> you write:
> >>You need to decide, binmode or textmode. Operating in both
> is a major cause
> >>for a major headache.
> >Isn't the point that it depends on the data at that mount
> point? In the case
> >of Windows-y areas, text mode is exactly correct.
> >Plus textmode is still the default for mount.
> Yup. Good points.
> If you know what you're doing, there is no reason not to mix.
> I think that
> the default "root" mounts like /bin, /lib, and /usr should be
> binary. Everything
> else can be whatever makes sense.
> The problem is that many people use an "identity mount" where
> c:\ == /. The
> current version of setup.exe mounts root as binary, similarly
> to the Cygwin CD.
> This causes problems who have something like a 'c:\src'
> directory since it will
> automatically be considered to be binmode by default.
> DJ has suggested that a future version of cygwin should
> default to "read text,
> write binary". I think we'll probably be moving to that
> model sometime soon.
Here is how I've managed to avoid problems in my UNIX->Windows ports: I
wrapped all open's in a routine that (among other things) change all "read
only" opens to text if not specified, and all "read/write" or "write only"
opens to binary (still if not explicitely specified).
Thus providing an implicit default like this (perhaps for a drive mounted
"-a") should be quite good. Note that "read/write" in text mode is quite
difficult to implement and use correctly, especially if one seeks before
writing... :-), so the best default in this case is "binary".
Chris, do I understand correctly that above, when saying "read text, write
binary" you are speaking about the default mode for open's where neither
O_TEXT nor O_BINARY are specified? otherwise reading a file in text mode
then switching to binary when writing the same file will most probably give
quite weird results ;-(
Anyway thanks for the good job, 1.1.2 seems what I was waiting for.
> This will essentially provide a third mount option, like "-a".
> Want to unsubscribe from this list?
> Send a message to firstname.lastname@example.org
97 bis, rue de Colombes
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
Want to unsubscribe from this list?
Send a message to email@example.com