make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FW: Win32 File Name Compares and Normalization


From: Matthew Von-Maszewski
Subject: RE: FW: Win32 File Name Compares and Normalization
Date: Mon, 10 Sep 2001 12:57:10 -0400

... argh!  last line of the config.h, missed it.  I will recompile and
respond this afternoon ...

-----Original Message-----
From: Rob Tulloh [mailto:address@hidden
Sent: Monday, September 10, 2001 12:37 PM
To: Matthew Von-Maszewski
Cc: address@hidden
Subject: Re: FW: Win32 File Name Compares and Normalization



I thought GNU make already had a compile-time feature to
enable case insensitivity. Did you try this and find it didn't work
for you?

There are users on both sides of the fence so any
work to enable this should be put under a feature test macro
that can be turned on or off.

My $.02,

Rob

Matthew Von-Maszewski wrote:

> Per Paul Smith, I am forwarding this email to this group for comments ...
>
> -----Original Message-----
> From: Matthew Von-Maszewski [mailto:address@hidden
> Sent: Monday, September 10, 2001 12:05 PM
> To: address@hidden
> Subject: Win32 File Name Compares and Normalization
>
> Greetings,
>
> I have been doing extensive work with GNU make and Microsoft's compiler.
> This includes creating a dependency generator similar the gcc's .d files.
> It has become obvious that a couple of the make's functions need to become
> case insensitive when on a Win 32 platform.  Microsoft's file names are
> internally considered to be case insensitive for its file operations and
> matching.
>
> I have listed the changes below that I found sufficient to create
normalized
> filenames (all lowercase) and to remove case sensitive compares (this
needs
> a cleaner implementation).
>
> [My dependency generator depends upon a preprocessor dump from Microsoft's
> compiler.  Depending upon the command line options, sometimes the
> preprocessor normalizes all file names to lower case (e.g. /ZI option).
> Other times case is left as found in the file system.  Lovely.]
>
> All changes are against the version 3.79.1 download.
>
> Would you please consider this change request?
>
> Thank you,
> Matthew
>
> Index: glob/fnmatch.c
> ===================================================================
> RCS file: /home/cvsroot/gnumake/glob/fnmatch.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** glob/fnmatch.c      2001/09/10 15:33:48     1.1.1.1
> --- glob/fnmatch.c      2001/09/10 15:37:35     1.2
> ***************
> *** 168,174 ****
>   # ifdef _LIBC
>   #  define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
>   # else
> ! #  define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) :
> (c))
>   # endif
>
>     while ((c = *p++) != '\0')
> --- 168,176 ----
>   # ifdef _LIBC
>   #  define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
>   # else
> ! /*#  define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c)
:
> (c)
> )*/
> ! /* mev */
> ! #  define FOLD(c) ( ISUPPER (c) ? tolower (c) : (c))
>   # endif
>
> Index: w32/pathstuff.c
> ===================================================================
> RCS file: /home/cvsroot/gnumake/w32/pathstuff.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** w32/pathstuff.c     2001/09/10 15:33:48     1.1.1.1
> --- w32/pathstuff.c     2001/09/10 15:37:36     1.2
> ***************
> *** 80,85 ****
> --- 80,87 ----
>           if (*p == '\\')
>               *p = '/';
>
> + /* mev */
> +     strlwr(w32_path);
>       return w32_path;
>   }
>
> cvs server: Diffing w32/compat
> Index: w32/compat/dirent.c
> ===================================================================
> RCS file: /home/cvsroot/gnumake/w32/compat/dirent.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** w32/compat/dirent.c 2001/09/10 15:33:48     1.1.1.1
> --- w32/compat/dirent.c 2001/09/10 15:37:36     1.2
> ***************
> *** 116,122 ****
>         /* fill in struct dirent values */
>         pDir->dir_sdReturn.d_ino = -1;
>         strcpy(pDir->dir_sdReturn.d_name, wfdFindData.cFileName);
> !
>         return &pDir->dir_sdReturn;
>   }
>
> --- 116,123 ----
>         /* fill in struct dirent values */
>         pDir->dir_sdReturn.d_ino = -1;
>         strcpy(pDir->dir_sdReturn.d_name, wfdFindData.cFileName);
> ! /* mev */
> !         strlwr(pDir->dir_sdReturn.d_name);
>         return &pDir->dir_sdReturn;
>   }
>
> ======================
> Matthew Von-Maszewski
>  address@hidden
>  508-870-0118
>
> _______________________________________________
> Make-w32 mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/make-w32




reply via email to

[Prev in Thread] Current Thread [Next in Thread]