[Patches] [ python-Patches-410154 ] Patch for import case-check on macintosh
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 20 Mar 2001 18:30:19 -0800
Patches item #410154, was updated on 2001-03-20 13:15
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=410154&group_id=5470
Category: core (C code)
Group: None
Status: Open
Priority: 8
Submitted By: Jack Jansen (jackjansen)
Assigned to: Jack Jansen (jackjansen)
Summary: Patch for import case-check on macintosh
Initial Comment:
This patch gets filesystem case-checking working again for the Macintosh.
I'm submitting it here in stead of checking it in myself because I don't currently have
any way to check that this patch doesn't break anything on Unix or Windows.
RCS file: /cvsroot/python/python/dist/src/Python/import.c,v
retrieving revision 2.173
diff -c -r2.173 import.c
*** import.c 2001/03/06 06:31:15 2.173
--- import.c 2001/03/20 20:59:30
***************
*** 979,991 ****
#endif
#ifdef macintosh
fdp = PyMac_FindModuleExtension(buf, &len, name);
! if (fdp)
! fp = fopen(buf, fdp->mode);
#else
for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
strcpy(buf+len, fdp->suffix);
if (Py_VerboseFlag > 1)
PySys_WriteStderr("# trying %s\n", buf);
fp = fopen(buf, fdp->mode);
if (fp != NULL) {
if (case_ok(buf, len, namelen, name))
--- 979,991 ----
#endif
#ifdef macintosh
fdp = PyMac_FindModuleExtension(buf, &len, name);
! if (fdp) {
#else
for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
strcpy(buf+len, fdp->suffix);
if (Py_VerboseFlag > 1)
PySys_WriteStderr("# trying %s\n", buf);
+ #endif /* !macintosh */
fp = fopen(buf, fdp->mode);
if (fp != NULL) {
if (case_ok(buf, len, namelen, name))
***************
*** 996,1002 ****
}
}
}
- #endif /* !macintosh */
if (fp != NULL)
break;
}
--- 996,1001 ----
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-03-20 18:30
Message:
Logged In: YES
user_id=31435
Jack, it looks to me like you checked in this in. In that
case you should change the Status to Closed.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-03-20 14:54
Message:
Logged In: YES
user_id=6380
Jack, this compiles and builds fine on Linux. So please go
ahead!
(Please next time use the SourceForge file upload feature --
SF doesn't treat whitespace properly!)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=410154&group_id=5470