summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-07-01 01:06:56 (GMT)
committerGuido van Rossum <guido@python.org>2000-07-01 01:06:56 (GMT)
commit63e97ad4eaa1f5249cf08ad9de307300ac9fc47f (patch)
tree95d9ecd4dadb9ba59cdd45a5d4c9feb71563f996 /Python
parent4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe (diff)
downloadcpython-63e97ad4eaa1f5249cf08ad9de307300ac9fc47f.zip
cpython-63e97ad4eaa1f5249cf08ad9de307300ac9fc47f.tar.gz
cpython-63e97ad4eaa1f5249cf08ad9de307300ac9fc47f.tar.bz2
Jack Jansen, Mac patch:
Include stat.h if needed; different Mac filename compare
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c5
1 files 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 <sys/stat.h>
+#elif defined(HAVE_STAT_H)
+#include <stat.h>
#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);