Changeset 10 for python/trunk/Python/import.c
- Timestamp:
- Sep 3, 2010, 5:33:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk/Python/import.c
r2 r10 1564 1564 #include <dirent.h> 1565 1565 1566 #elif defined(__KLIBC__) 1567 #include <stdlib.h> 1568 1566 1569 #elif defined(PYOS_OS2) 1567 1570 #define INCL_DOS … … 1683 1686 1684 1687 /* OS/2 */ 1688 #elif defined(__KLIBC__) 1689 char canon[MAXPATHLEN+1]; 1690 size_t canonlen; 1691 char *p, *p2; 1692 1693 if (Py_GETENV("PYTHONCASEOK") != NULL) 1694 return 1; 1695 1696 /* This resolves case differences and return and native OS/2 1697 path. Unfortunately, it'll also resolve symbolic links 1698 while of course will screw up a bit... */ 1699 if (!_realrealpath(buf, canon, sizeof(canon))) 1700 return 0; 1701 canonlen = strlen(canon); 1702 if (canonlen < namelen) 1703 return 0; 1704 p = strrchr(canon, SEP); 1705 p2 = strrchr(p ? p : canon, ALTSEP); 1706 if (p2) 1707 p = p2; 1708 1709 return strncmp(p ? p + 1 : canon, name, namelen) == 0; 1710 1685 1711 #elif defined(PYOS_OS2) 1686 1712 HDIR hdir = 1;
Note:
See TracChangeset
for help on using the changeset viewer.