MCPcopy Create free account
hub / github.com/apple/foundationdb / isLibraryLoaded

Function isLibraryLoaded

flow/Platform.actor.cpp:3443–3457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3441#endif
3442
3443bool isLibraryLoaded(const char* lib_path) {
3444#if !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__FreeBSD__)
3445#error Port me!
3446#endif
3447
3448 void* dlobj = nullptr;
3449
3450#if defined(__unixish__)
3451 dlobj = dlopen(lib_path, RTLD_NOLOAD | RTLD_LAZY);
3452#else
3453 dlobj = GetModuleHandle(lib_path);
3454#endif
3455
3456 return dlobj != nullptr;
3457}
3458
3459void* loadLibrary(const char* lib_path) {
3460#if !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__FreeBSD__)

Callers 1

initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected