|
|
|
@ -32,10 +32,14 @@ static int get_exec_path (char *exec_path, const size_t exec_path_sz)
|
|
|
|
|
|
|
|
|
|
const ssize_t len = readlink (tmp, exec_path, exec_path_sz - 1);
|
|
|
|
|
|
|
|
|
|
if (len == -1) return -1;
|
|
|
|
|
|
|
|
|
|
#elif defined (_WIN)
|
|
|
|
|
|
|
|
|
|
const DWORD len = GetModuleFileName (NULL, exec_path, exec_path_sz - 1);
|
|
|
|
|
|
|
|
|
|
if (len == 0) return -1;
|
|
|
|
|
|
|
|
|
|
#elif defined (__APPLE__)
|
|
|
|
|
|
|
|
|
|
u32 size = (u32) exec_path_sz;
|
|
|
|
@ -61,6 +65,8 @@ static int get_exec_path (char *exec_path, const size_t exec_path_sz)
|
|
|
|
|
|
|
|
|
|
const ssize_t len = readlink (tmp, exec_path, exec_path_sz - 1);
|
|
|
|
|
|
|
|
|
|
if (len == -1) return -1;
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
#error Your Operating System is not supported or detected
|
|
|
|
|
#endif
|
|
|
|
|