msvcrt: Implement _wperror.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-06-22 01:53:00 +00:00 committed by Alexandre Julliard
parent 6d21655ed9
commit 56eb4d3105
10 changed files with 34 additions and 9 deletions

View File

@ -1568,7 +1568,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l @ stub _wprintf_l

View File

@ -1925,7 +1925,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l @ stub _wprintf_l

View File

@ -1949,7 +1949,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l @ stub _wprintf_l

View File

@ -641,7 +641,7 @@
@ cdecl _wmkdir(wstr) MSVCRT__wmkdir @ cdecl _wmkdir(wstr) MSVCRT__wmkdir
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ cdecl _wputenv(wstr) @ cdecl _wputenv(wstr)

View File

@ -637,7 +637,7 @@
@ cdecl _wmkdir(wstr) MSVCRT__wmkdir @ cdecl _wmkdir(wstr) MSVCRT__wmkdir
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ cdecl _wputenv(wstr) @ cdecl _wputenv(wstr)

View File

@ -1250,7 +1250,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l @ stub _wprintf_l

View File

@ -1223,7 +1223,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l @ stub _wprintf_l

View File

@ -343,6 +343,31 @@ void CDECL MSVCRT_perror(const char* str)
MSVCRT__write( 2, "\n", 1 ); MSVCRT__write( 2, "\n", 1 );
} }
/*********************************************************************
* _wperror (MSVCRT.@)
*/
void CDECL MSVCRT__wperror(const MSVCRT_wchar_t* str)
{
MSVCRT_size_t size;
char *buffer = NULL;
if (str && *str)
{
size = MSVCRT_wcstombs(NULL, str, 0);
if (size == -1) return;
size++;
buffer = MSVCRT_malloc(size);
if (!buffer) return;
if (MSVCRT_wcstombs(buffer, str, size) == -1)
{
MSVCRT_free(buffer);
return;
}
}
MSVCRT_perror(buffer);
if (buffer) MSVCRT_free(buffer);
}
/********************************************************************* /*********************************************************************
* _wcserror_s (MSVCRT.@) * _wcserror_s (MSVCRT.@)
*/ */

View File

@ -1184,7 +1184,7 @@
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
# stub _woutput_s # stub _woutput_s
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr @ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen (wstr wstr) MSVCRT__wpopen @ cdecl _wpopen (wstr wstr) MSVCRT__wpopen
# stub _wprintf_l(wstr ptr) # stub _wprintf_l(wstr ptr)

View File

@ -2097,7 +2097,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp @ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen @ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr) @ cdecl _wperror(wstr) MSVCRT__wperror
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen @ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ cdecl _wputenv(wstr) @ cdecl _wputenv(wstr)
@ cdecl _wputenv_s(wstr wstr) @ cdecl _wputenv_s(wstr wstr)