32 lines
546 B
C++
32 lines
546 B
C++
#include "dlfcn.h"
|
|
|
|
#include <cstring>
|
|
|
|
// LinuxCNC source basis: src/emc/rs274ngc/interp_base.cc uses dlopen(),
|
|
// dlsym(), dlerror(), RTLD_GLOBAL, and RTLD_NOW for native interpreter loading.
|
|
namespace {
|
|
|
|
thread_local char last_error[128] = "dynamic loading is unavailable in wasm-safe probe";
|
|
|
|
} // namespace
|
|
|
|
extern "C" {
|
|
|
|
void *dlopen(const char *, int) {
|
|
return nullptr;
|
|
}
|
|
|
|
void *dlsym(void *, const char *) {
|
|
return nullptr;
|
|
}
|
|
|
|
char *dlerror(void) {
|
|
return last_error;
|
|
}
|
|
|
|
int dlclose(void *) {
|
|
return 0;
|
|
}
|
|
|
|
} // extern "C"
|