This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ASCII and BINARY files. Why?


Eliot W Dudley, you wrote:
> 
> Certain programs need to have \r\n to work right, e.g. 'type'.  Deprecate
> them, srew 'em, shun them, or fix them if they're worth it, but I don't
> think so. 

The problem is that you can't fix them, because (a) they're not broken,
they just don't happen to do what you want, and (b) you probably don't
have source anyway.

> Text mode was a bad dream, wake up, be happy.

It would be really nice if text mode *was* just a bad dream, but
I don't think the problem is going to go away just because you
want it to.

> Certain programs don't care, e.g. gcc, MSVC++, Borland BC5, elvis.  Good
> for them, let's have more of the same.

gcc and elvis are *NOT* programs that don't care!

Both of these programs, indeed I think *MOST UNIX PROGRAMS*, do care.
Patching these programs so that they don't care would be *VERY HARD*, IMHO.
In fact, I can't think of *any* way of patching elvis to not care about
the distinction between \r\n and \n that would preserve backwards
compatibility.  I think fixing it would require changing the format of
`.exrc' files, which would of course be a *really* bad idea.

The fact that people who want binary mode to be the default think
that programs like `gcc' and `elvis' don't care suggests to me that
they have no idea of the scale of the problem.

> Certain programs need not to have \r\n to work right, e.g. certain versions
> of make.  Now if I allow a Win95/NT box the privilege of SMB mounting a
> Unix filesystem because now after all these years they've joined the club,
> and then some miscreant newbie utility decides to stick \r\n into a make
> file, and breaks it such that I can't compile over on the MassComp what
> should I do?

If you allow your Windows box to SMB mount such filesystems, then you
should use the `-b' option of gnu-win32 mount for that filesystem, to
avoid that problem.

However, I suspect that most people are more likely to want their
gnu-win32 files to interoperate with Windows utilites than with MassComp
utilities.  Those people don't won't `mount -b', because it causes
problems with gcc, elvis, etc., etc.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]