From: scottk@utig.ig.utexas.edu (Scott Kempf)
Subject: case insensitive inode number patch, is this better?
10 Jan 1997 15:54:09 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199701101644.KAA29829.cygnus.gnu-win32@utig.ig.utexas.edu>
Original-To: gnu-win32@cygnus.com
Original-Sender: owner-gnu-win32@cygnus.com

Here is a questionable patch.  Win95 doesn't have any inode numbers,
so they are faked using a hash of the file's name.  This is very
creative, but not the best idea.  I don't have a better solution,
but it seems to me that the hash should not be case sensitive,
since the file system isn't.  This patch makes the inodes case
insensitive.  I'm not aware of any problem it fixes, but it does
create one:  "mv x X" now fails with "mv: `x' and `X' are the same file".
Since they are the same file, the error is somewhat reasonable.
Any ideas?

				Scott

*** cdksrc/src/winsup/syscalls.cc.orig	Mon Dec 30 17:45:27 1996
--- cdksrc/src/winsup/syscalls.cc	Tue Dec 31 14:59:29 1996
***************
*** 21,26 ****
--- 21,27 ----
  #include <fcntl.h>
  #include <pwd.h>
  #include <unistd.h>
+ #include <ctype.h>
  
  #include "winsup.h"
  
***************
*** 613,619 ****
    
    while (*name != '\0') 
      {
!       hash += *name + (*name <<17);
        hash ^= hash >> 2;
        name++;
      }
--- 614,620 ----
    
    while (*name != '\0') 
      {
!       hash += tolower (*name) + (tolower (*name) <<17);
        hash ^= hash >> 2;
        name++;
      }
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
