
Hi!
Yigal> This is the code I had to compile out for ms compiler/environment.
Thanks. I'd prefer to wrap the whole block in #ifdef and other places where cache and cacheProg appear.
#if !defined(_MSC_VER) 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); 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); } smiFree(cmd); if (access(path, R_OK)) { smiFree(path); path = NULL; } } } #endif
-frank -- !! 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.