Insert "./" in front of pathname when it contains no '/' (if USE_SHLIB)

This commit is contained in:
Guido van Rossum 1996-08-09 20:55:05 +00:00
parent 2878a69922
commit 0bbf253e97
1 changed files with 6 additions and 0 deletions

View File

@ -242,6 +242,12 @@ load_dynamic_module(name, pathname, fp)
void *handle;
} handles[128];
static int nhandles = 0;
char pathbuf[260];
if (strchr(pathname, '/') == NULL) {
/* Prefix bare filename with "./" */
sprintf(pathbuf, "./%-.255s", pathname);
pathname = pathbuf;
}
#endif
sprintf(funcname, FUNCNAME_PATTERN, name);
#ifdef USE_SHLIB