factor/vm/os-netbsd.cpp

17 lines
225 B
C++
Raw Normal View History

2009-05-02 05:04:19 -04:00
#include "master.hpp"
2009-05-04 02:46:13 -04:00
namespace factor
{
2009-05-04 07:43:20 -04:00
extern "C" int main();
2009-05-02 05:04:19 -04:00
2009-05-05 12:33:35 -04:00
const char *vm_executable_path()
2009-05-02 05:04:19 -04:00
{
static Dl_info info = {0};
if (!info.dli_fname)
2009-05-04 07:43:20 -04:00
dladdr((void *)main, &info);
return safe_strdup(info.dli_fname);
2009-05-02 05:04:19 -04:00
}
2009-05-04 02:46:13 -04:00
}