From 63e97ad4eaa1f5249cf08ad9de307300ac9fc47f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 1 Jul 2000 01:06:56 +0000 Subject: Jack Jansen, Mac patch: Include stat.h if needed; different Mac filename compare --- Python/import.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Python/import.c b/Python/import.c index a34d6c3..7e74f2b 100644 --- a/Python/import.c +++ b/Python/import.c @@ -39,6 +39,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. #endif #ifndef DONT_HAVE_SYS_STAT_H #include +#elif defined(HAVE_STAT_H) +#include #endif #if defined(PYCC_VACPP) @@ -1129,8 +1131,7 @@ check_case(char *buf, int len, int namelen, char *name) name, buf); return 0; } - p2cstr(fss.name); - if ( strncmp(name, (char *)fss.name, namelen) != 0 ) { + if ( namelen > fss.name[0] || strncmp(name, (char *)fss.name+1, namelen) != 0 ) { PyErr_Format(PyExc_NameError, "Case mismatch for module name %.100s\n(filename %.300s)", name, fss.name); -- cgit v0.12