added vsprintf.cpp of Windows platform.

This commit is contained in:
2021-08-21 17:33:52 +08:00
parent 374968414b
commit 9901f8ccc2
2 changed files with 16 additions and 1 deletions

View File

@@ -73,7 +73,8 @@ IF(WIN32)
Win/EnumVolume.cpp
Win/ProgramPath.cpp)
SET(PLATFORM_CODEPAGE_SOURCE Win/CodePage.cpp)
SET(PLATFORM_CODEPAGE_SOURCE Win/CodePage.cpp
Win/vsprintf.cpp)
SET(PLATFORM_SYSTEM_INFO_SOURCE Win/SystemInfo.cpp)

14
src/Win/vsprintf.cpp Normal file
View File

@@ -0,0 +1,14 @@
#include<hgl/platform/os/vsprintf.h>
#include<stdio.h>
namespace hgl
{
template<> int vsprintf<char>(char *buffer,const size_t buf_max,const char *format,va_list va)
{
return vsprintf_s(buffer,buf_max,format,va);
}
template<> int vsprintf<wchar_t>(wchar_t *buffer,const size_t buf_max,const wchar_t *format,va_list va)
{
return vswprintf_s(buffer,buf_max,format,va);
}
}//namespace hgl