0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.3208: dynamic library load error does not mention why it failed

Problem:    Dynamic library load error does not mention why it failed.
Solution:   Add the error message. (Martin Tournoij, closes #8621)
This commit is contained in:
Martin Tournoij
2021-07-24 13:57:29 +02:00
committed by Bram Moolenaar
parent 5a234eb18e
commit 1a3e5747b7
14 changed files with 45 additions and 30 deletions

View File

@@ -1329,24 +1329,6 @@ clear_csinfo(int i)
#endif
}
#ifndef UNIX
static char *
GetWin32Error(void)
{
char *msg = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), 0, (LPSTR)&msg, 0, NULL);
if (msg != NULL)
{
// remove trailing \r\n
char *pcrlf = strstr(msg, "\r\n");
if (pcrlf != NULL)
*pcrlf = '\0';
}
return msg;
}
#endif
/*
* Insert a new cscope database filename into the filelist.
*/