+ strerror(42);
+ write(0, 0, 0);
+ RtlUnwind(0, 0, 0, 0);
+ #ifndef LISP_FEATURE_SB_UNICODE
+ CreateDirectoryA(0,0);
+ GetComputerNameA(0, 0);
+ GetCurrentDirectoryA(0,0);
+ GetEnvironmentVariableA(0, 0, 0);
+ GetVersionExA(0);
+ MoveFileA(0,0);
+ SHGetFolderPathA(0, 0, 0, 0, 0);
+ SetCurrentDirectoryA(0);
+ SetEnvironmentVariableA(0, 0);
+ #else
+ CreateDirectoryW(0,0);
+ FormatMessageW(0, 0, 0, 0, 0, 0, 0);
+ GetComputerNameW(0, 0);
+ GetCurrentDirectoryW(0,0);
+ GetEnvironmentVariableW(0, 0, 0);
+ GetVersionExW(0);
+ MoveFileW(0,0);
+ SHGetFolderPathW(0, 0, 0, 0, 0);
+ SetCurrentDirectoryW(0);
+ SetEnvironmentVariableW(0, 0);
+ #endif
+}
+
+char *
+os_get_runtime_executable_path()
+{
+ char path[MAX_PATH + 1];
+ DWORD bufsize = sizeof(path);
+ DWORD size;
+
+ if ((size = GetModuleFileNameA(NULL, path, bufsize)) == 0)
+ return NULL;
+ else if (size == bufsize && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+ return NULL;
+
+ return copied_string(path);