delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/06/13:53:44

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <378241EA.AFFB345E@geekspace.com>
Date: Tue, 06 Jul 1999 13:50:34 -0400
From: Joshua Rosen <rozzin AT geekspace DOT com>
Organization: GEEKS
X-Mailer: Mozilla 4.06 [en] (X11; I; Linux 2.2.10 i586)
MIME-Version: 1.0
To: "cygwin AT sourceware DOT cygnus DOT com" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Upper case filenames
References: <19990706163342 DOT 4801 DOT rocketmail AT web122 DOT yahoomail DOT com>

Earnie Boyd wrote:
> 
> --- Joshua Rosen <rozzin AT geekspace DOT com> wrote:
> > Ron House wrote:
> >
> > Actually, doesn't DOS write and present file-names as uppercase?
> > Wouldn't that make the Linux module's file-name-mapping `incorrect',
> > and Cygwin's `correct'?
> >
> 
> That may be true of DOS but the DOS console window would present them in the
> case they were created.  However, the original poster was asking about the 8.3
> filename!!  How is it that you get the 8.3 DOS filename with cygwin?

I brought up DOS exactly because he said `8.3';)
	
> As far as I remember the cygwin product is case SENSITIVE.  For instance a file
> prog1.c would be interpreted by gcc to be a C program while PROG1.C would be a
> C++ program.  Try doing `find -name proc1.c' when the filename is actually
> PROG1.C.  The FAT filesystem and the default for the NTFS filesystem is case
> insensitive but case preserving for the long filenames but store the DOS 8.3
> names in UPPERCASE

Yes, quite so....
The Windows console window presents file-names in whatever case they're created
is true, but, in addition to that it doesn't present the 8.3 names;)...:
	+DOS and win16 applications always create uppercase file-names
	+when a Windows file has a `long' file-name, the accompanying 8.3 file-name
that's created for it is uppercase


>, so your point that Linux is incorrect would be correct if
> Linux is showing the 8.3 DOS filename in lowercase but I'm not that familiar
> with FAT emulation on Linux.

If you mount as type=msdos, all files are mapped to lower-case names.
If you mount as VFAT, all -mixed-case- names have their Windows cases preserved
(ie: `foObAr' is mapped to `foObAr'); all-caps and all-lower-case names are
mapped to all-lowercase (ie: `FOOBAR' is mapped to `foobar')--I'm guessing that
the reasoning behind this is the same as that behind the default behaviour of
downcasing of all-caps file-names in Windows' Explorer (I turned that off a long
time ago with TweakUI...): the system assumes that it is uppercase because it
was created by, an old DOS/win16 app, not because the user wanted it that way.

While GCC is case-sensitive, Cygwin doesn't appear to be inherently
case-sensitive (try opening/viewing two files whos names differ only in case,
like `ls foo FOO').

I don't believe that Cygwin should `make it look like linux'--it should use the
file-names returned by the system that it's running on.

Hrm....

I don't recall if TweakUI changes the `downcase everything' behaviour in
Windows, or just in Explorer--I'll look at it next time I reboot (though I
imagine that anyone interested can look for themselves, sooner;)).

Maybe the problems with case could be solved, locally, by running all of the
file-names through `tr [:uppercase:] [:lowercase:]'--I'd favour that over
munging the case information in the base system, because the latter approach
-completely- disables it, while the former would allow you to use whichever
mapping scheme you want.

			-Rozzin.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019