Mail Archives: cygwin/1997/11/19/08:22:19
> 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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -