[Top][All Lists]

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

Re: [PATCH] file-name.c and MinGW paths.

From: Ben Pfaff
Subject: Re: [PATCH] file-name.c and MinGW paths.
Date: Sat, 17 Feb 2007 17:42:30 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

"John McCabe-Dansted" <address@hidden> writes:

> On 2/18/07, Ben Pfaff <address@hidden> wrote:
>> > however the GetFullPathName function would help:
>> >
>> > should be good enough for our purposes.
>> Seeing as GetFullPathName seems to do what we want, and
>> canonicalize_filename_mode doesn't, and we don't use
>> canonicalize_filename_mode anywhere else in PSPP, I suppose we
>> should just drop canonicalize_filename_mode entirely (and the
>> "canonicalize" gnulib module) and just use GetFullPathName
>> directly in fn_get_identity.
> Do we still need canonicalize under unix? 

No, because under Unix we use st_dev and st_ino from struct stat
in place of a canonical path.

> Should the gnulib canonicalize function itself be a wrapper
> around GetFullPathName in windows?

Oh, quite possibly, but it's a hassle trying to get changes into
gnulib, and I'd not want to try to find all the corner cases that
would be different--that's a job for a Windows expert, not for
me--and so I'm inclined to just fix this part in PSPP.

>> > We also probably also convert the pathname to upper-case in
>> > canonicalize as well, although that seems somehow ugly to me.
>> Or use strcasecmp in fn_compare_file_identities.
> Sounds nicer. OTOH, if we push this up into gnulib, then gnulib based
> software would have to be careful to use FN_STRCMP (where this macro
> is defined appropriately on mingw and posix platforms) to compare
> canonicalized filenames.

For now, let's just try to get it right in PSPP...
"I consider that the golden rule requires that if I like a program
 I must share it with other people who like it."
--Richard Stallman

reply via email to

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