mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:53:06 +00:00
19 lines
291 B
C
19 lines
291 B
C
#include <crtdll/wchar.h>
|
|
#include <crtdll/errno.h>
|
|
#include <crtdll/internal/file.h>
|
|
|
|
|
|
wchar_t *_wcsdup(const wchar_t *ptr)
|
|
{
|
|
wchar_t *dup;
|
|
dup = malloc((wcslen(ptr) + 1)*sizeof(wchar_t));
|
|
if( dup == NULL ) {
|
|
__set_errno(ENOMEM);
|
|
return NULL;
|
|
}
|
|
wcscpy(dup,ptr);
|
|
return dup;
|
|
}
|
|
|
|
|
|
|