
27 Aug
2001
27 Aug
'01
1:29 p.m.
Frank,
This is the code I had to compile out for ms compiler/environment.
--
- Yigal
file: f:/yigal/dmh-libsmi/libsmi-0.2.17/lib/data.c:3570 loadModule()
....................
if (!path && smiHandle->cache && smiHandle->cacheProg) {
/* Not found in the path; now try to fetch & cache the module. */
path = smiMalloc(strlen(smiHandle->cache) + strlen(modulename) + 2);
sprintf(path, "%s%c%s", smiHandle->cache, DIR_SEPARATOR, modulename);
if (access(path, R_OK)) {
cmd = smiMalloc(strlen(smiHandle->cacheProg) + strlen(modulename) + 2);
sprintf(cmd, "%s %s", smiHandle->cacheProg, modulename);
#if !defined(_MSC_VER)
pid = fork();
if (pid != -1) {
if (!pid) {
argv[0] = "sh"; argv[1] = "-c"; argv[2] = cmd; argv[3] = 0;
execv("/bin/sh", argv);
exit(127);
}
waitpid(pid, &status, 0);
}
#endif /* _MSC_VER */
smiFree(cmd);
if (access(path, R_OK)) {
smiFree(path);
path = NULL;
}
}
}
....................
--
!! This message is brought to you via the `libsmi' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de.
!! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.