From: Hans-Bernhard B. <br...@ph...> - 2005-02-12 10:52:19
|
Hardy Griech wrote: > Unfortunately there is no "auto" option for cygwins mount. There's on in their libc, but apparently it's *still* not been exported to the mount options.... > What I've understood so far is, that it is safer to mount with text. For correctly ported programs: yes. Standard C and POSIX only know two kinds of opening files: "binary" and "default". If a program expects files to keep all their bits, it's supposed to say so by activating binary mode. Failure to do so is, at least technically, a bug. > What will happen if actually binary files are opened for > reading? If the program explicitly used binary mode, they'll be opened as binary, regardless of the mount option. > Will a \r\n sequence cut down to \n or how is the mode then > detected? It's not supposed to be necessary to "detect" the mode --- the program opening the file is supposed to know what it's doing, and tell the OS. In other words: programs can fail to work in a text-mode mounted system --- but if they do, that's clearly the programs' fault. Binary mode mounts are essentially a way to deliberately break the OS to make it compatible with broken programs. |