| 795 | |
| 796 | #if defined(_WIN32) |
| 797 | static std::string llama_format_win_err(DWORD err) { |
| 798 | LPSTR buf; |
| 799 | size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, |
| 800 | NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buf, 0, NULL); |
| 801 | if (!size) { |
| 802 | return "FormatMessageA failed"; |
| 803 | } |
| 804 | std::string ret(buf, size); |
| 805 | LocalFree(buf); |
| 806 | return ret; |
| 807 | } |
| 808 | #endif |
| 809 | |
| 810 | struct llama_buffer { |
no outgoing calls
no test coverage detected