Subject: Re: Bash as the interactive shell in Emacs 19.34.6 for NT not working
From: [email-masked]

19 Nov 1997 08:22:19 -0800
Message-ID: <[email-masked]>
To: [email-masked]

> don't "text mounts" blindly treat *every* file as text? if so, they *can't* be
> the only "mount style" in use. a combination is necessary.
> 
> but this doesn't make sense - what does gcc do when writing it's output to a
> "text mount"? stop at the first ^Z byte? i wouldn't think so. anyone?
> 
> 
> raf

Using stdio, a program can open a file two ways, as text or as binary.  Text
is indicated as fopen(file, "r") and binary is fopen(file, "rb").  For
open() calls, I think that open() is supposed to open the file in text mode
and a subsequent setmode() can place the file descriptor into binary mode.
Thus, if a program is unaware of text/binary issues, it will always open
files in text mode.  Note that POSIX does not allow any way of differentiating
between a program that is aware of text/binary differences and wants text
mode and a program that is unaware of the issue.

Now, in cygwin32, if you set a mount point to text!=binary, you have the
default be to open a file in text mode and allow the program to specify a
binary open if desired.  You are counting on programs being aware of the
distinction or wanting text files.

If you mount with text=binary, though, you set the default to be opening
files in binary mode.  In this case, it is not possible to open a file in
text mode at all, so all the text files must be Unix style text files
since there is no translation provided by cygwin32.

marcus hall
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".