-static inline bool IsLibrary(Path& path, const std::string& basename) {
- if (path.appendFile(std::string("lib") + basename)) {
- if (path.appendSuffix(Path::GetDLLSuffix()) && path.readable())
- return true;
- else if (path.elideSuffix() && path.appendSuffix("a") && path.readable())
- return true;
- else if (path.elideSuffix() && path.appendSuffix("o") && path.readable())
- return true;
- else if (path.elideSuffix() && path.appendSuffix("bc") && path.readable())
- return true;
- } else if (path.elideFile() && path.appendFile(basename)) {
- if (path.appendSuffix(Path::GetDLLSuffix()) && path.readable())
- return true;
- else if (path.elideSuffix() && path.appendSuffix("a") && path.readable())
- return true;
- else if (path.elideSuffix() && path.appendSuffix("o") && path.readable())
- return true;
- else if (path.elideSuffix() && path.appendSuffix("bc") && path.readable())
- return true;
+static void getPathList(const char*path, std::vector<sys::Path>& Paths) {
+ const char* at = path;
+ const char* delim = strchr(at, ':');
+ Path tmpPath;
+ while( delim != 0 ) {
+ std::string tmp(at, size_t(delim-at));
+ if (tmpPath.setDirectory(tmp))
+ if (tmpPath.readable())
+ Paths.push_back(tmpPath);
+ at = delim + 1;
+ delim = strchr(at, ':');