On Jan 4, 2005, at 5:00 AM, Thomas Heller wrote:

I'm working on refactoring Python/import.c, currently the case_ok()
function.

I was wondering about these lines:
/* new-fangled macintosh (macosx) */
#elif defined(__MACH__) && defined(__APPLE__) && defined(HAVE_DIRENT_H)


Is this for Mac OSX? Does the Mac have a case insensitive file system
(my experiments on the SF compile farm say no)?

Yes, this tests positive for Mac OS X (and probably other variants of Darwin).
Yes, Mac OS X uses a case preserving but insensitive file system by default (HFS+), but has case sensitive file systems (UFS, and a case sensitive version of HFS+, NFS, etc.). The SF compile farm may use one of these alternative file systems, probably NFS if anything.


And finally: Is there any other way to find the true spelling of a file
except than a linear search with opendir()/readdir()/closedir() ?

Yes, definitely. I'm positive you can do this with CoreServices, but I'm not sure it's portable to Darwin (not Mac OS X). I'm sure there is some Darwin-compatible way of doing it, but I don't know it off the top of my head. I'll try to remember to look into it if nobody else finds it first.


-bob

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to