| 1197 | |
| 1198 | |
| 1199 | void* Foam::dlOpen(const fileName& lib, const bool check) |
| 1200 | { |
| 1201 | if (POSIX::debug) |
| 1202 | { |
| 1203 | std::cout<< "dlOpen(const fileName&)" |
| 1204 | << " : dlopen of " << lib << std::endl; |
| 1205 | } |
| 1206 | void* handle = ::dlopen(lib.c_str(), RTLD_LAZY|RTLD_GLOBAL); |
| 1207 | |
| 1208 | if (!handle && check) |
| 1209 | { |
| 1210 | WarningInFunction |
| 1211 | << "dlopen error : " << ::dlerror() |
| 1212 | << endl; |
| 1213 | } |
| 1214 | |
| 1215 | if (POSIX::debug) |
| 1216 | { |
| 1217 | std::cout |
| 1218 | << "dlOpen(const fileName&)" |
| 1219 | << " : dlopen of " << lib |
| 1220 | << " handle " << handle << std::endl; |
| 1221 | } |
| 1222 | |
| 1223 | return handle; |
| 1224 | } |
| 1225 | |
| 1226 | |
| 1227 | bool Foam::dlClose(void* handle) |
no outgoing calls
no test coverage detected