Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- include/msvcrt/mbstring.h | 2 ++ include/msvcrt/stdlib.h | 8 ++++++++ include/msvcrt/string.h | 4 ++++ include/msvcrt/wchar.h | 11 +++++++++++ 4 files changed, 25 insertions(+)
diff --git a/include/msvcrt/mbstring.h b/include/msvcrt/mbstring.h index 7a40f7b4cb..f9b106b753 100644 --- a/include/msvcrt/mbstring.h +++ b/include/msvcrt/mbstring.h @@ -75,6 +75,7 @@ int __cdecl _mbsicoll(const unsigned char*,const unsigned char*); unsigned char* __cdecl _mbsinc(const unsigned char*); size_t __cdecl _mbslen(const unsigned char*); unsigned char* __cdecl _mbslwr(unsigned char*); +errno_t __cdecl _mbslwr_s(unsigned char*, size_t); unsigned char* __cdecl _mbsnbcat(unsigned char*,const unsigned char*,size_t); errno_t __cdecl _mbsnbcat_s(unsigned char*,size_t,const unsigned char*,size_t); int __cdecl _mbsnbcmp(const unsigned char*,const unsigned char*,size_t); @@ -104,6 +105,7 @@ unsigned char* __cdecl _mbsstr(const unsigned char*,const unsigned char*); unsigned char* __cdecl _mbstok(unsigned char*,const unsigned char*); unsigned char* __cdecl _mbstok_l(unsigned char*,const unsigned char*,_locale_t); unsigned char* __cdecl _mbsupr(unsigned char*); +errno_t __cdecl _mbsupr_s(unsigned char*, size_t);
#ifndef _MBLEADTRAIL_DEFINED #define _MBLEADTRAIL_DEFINED diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 3454b17c93..47a50bc0af 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -159,10 +159,13 @@ char* __cdecl _ecvt(double,int,int*,int*); char* __cdecl _fcvt(double,int,int*,int*); char* __cdecl _fullpath(char*,const char*,size_t); char* __cdecl _gcvt(double,int,char*); +errno_t __cdecl _gcvt_s(char*, size_t, double, int); char* __cdecl _i64toa(__int64,char*,int); +errno_t __cdecl _i64toa_s(__int64, char*, size_t, int); char* __cdecl _itoa(int,char*,int); errno_t __cdecl _itoa_s(int,char*,size_t,int); char* __cdecl _ltoa(__msvcrt_long,char*,int); +errno_t __cdecl _ltoa_s(__msvcrt_long, char*, size_t, int); __msvcrt_ulong __cdecl _lrotl(__msvcrt_ulong,int); __msvcrt_ulong __cdecl _lrotr(__msvcrt_ulong,int); void __cdecl _makepath(char*,const char*,const char*,const char*,const char*); @@ -232,10 +235,15 @@ void __cdecl qsort(void*,size_t,size_t,int (__cdecl *)(const void*,cons #ifndef _WSTDLIB_DEFINED #define _WSTDLIB_DEFINED wchar_t* __cdecl _itow(int,wchar_t*,int); +errno_t __cdecl _itow_s(int,wchar_t*,int, int); wchar_t* __cdecl _i64tow(__int64,wchar_t*,int); +errno_t __cdecl _i64tow_s(__int64, wchar_t*, size_t, int); wchar_t* __cdecl _ltow(__msvcrt_long,wchar_t*,int); +errno_t __cdecl _ltow_s(__msvcrt_long,wchar_t*,int,int); wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int); +errno_t __cdecl _ui64tow_s(unsigned __int64, wchar_t*, size_t, int); wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int); +errno_t __cdecl _ultow_s(__msvcrt_ulong, wchar_t*, size_t, int); wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl _wgetenv(const wchar_t*); void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*); diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index 39a0296204..85ba38a58e 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h @@ -95,16 +95,19 @@ int __cdecl _wcsicmp(const wchar_t*,const wchar_t*); int __cdecl _wcsicoll(const wchar_t*,const wchar_t*); int __cdecl _wcsicoll_l(const wchar_t*, const wchar_t*, _locale_t); wchar_t* __cdecl _wcslwr(wchar_t*); +errno_t __cdecl _wcslwr_s(wchar_t*, size_t); int __cdecl _wcscoll_l(const wchar_t*, const wchar_t*, _locale_t); int __cdecl _wcsncoll(const wchar_t*, const wchar_t*, size_t); int __cdecl _wcsncoll_l(const wchar_t*, const wchar_t*, size_t, _locale_t); int __cdecl _wcsnicmp(const wchar_t*,const wchar_t*,size_t); int __cdecl _wcsnicoll(const wchar_t*,const wchar_t*,size_t); int __cdecl _wcsnicoll_l(const wchar_t*, const wchar_t*, size_t, _locale_t); +size_t __cdecl _wcsnlen(const wchar_t*,size_t); wchar_t* __cdecl _wcsnset(wchar_t*,wchar_t,size_t); wchar_t* __cdecl _wcsrev(wchar_t*); wchar_t* __cdecl _wcsset(wchar_t*,wchar_t); wchar_t* __cdecl _wcsupr(wchar_t*); +errno_t __cdecl _wcsupr_s(wchar_t*, size_t);
wchar_t* __cdecl wcscat(wchar_t*,const wchar_t*); errno_t __cdecl wcscat_s(wchar_t*,size_t,const wchar_t*); @@ -119,6 +122,7 @@ wchar_t* __cdecl wcsncat(wchar_t*,const wchar_t*,size_t); int __cdecl wcsncmp(const wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl wcsncpy(wchar_t*,const wchar_t*,size_t); errno_t __cdecl wcsncpy_s(wchar_t*,size_t,const wchar_t*,size_t); +size_t __cdecl wcsnlen(const wchar_t*,size_t); wchar_t* __cdecl wcspbrk(const wchar_t*,const wchar_t*); wchar_t* __cdecl wcsrchr(const wchar_t*,wchar_t wcFor); size_t __cdecl wcsspn(const wchar_t*,const wchar_t*); diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 78df974f9a..b944cdeea9 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -392,13 +392,19 @@ static inline int WINAPIV swprintf(wchar_t *buffer, size_t size, const wchar_t * #ifndef _WSTDLIB_DEFINED #define _WSTDLIB_DEFINED wchar_t* __cdecl _itow(int,wchar_t*,int); +errno_t __cdecl _itow_s(int,wchar_t*,int, int); wchar_t* __cdecl _i64tow(__int64,wchar_t*,int); +errno_t __cdecl _i64tow_s(__int64, wchar_t*, size_t, int); wchar_t* __cdecl _ltow(__msvcrt_long,wchar_t*,int); +errno_t __cdecl _ltow_s(__msvcrt_long,wchar_t*,int,int); wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int); +errno_t __cdecl _ui64tow_s(unsigned __int64, wchar_t*, size_t, int); wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int); +errno_t __cdecl _ultow_s(__msvcrt_ulong, wchar_t*, size_t, int); wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl _wgetenv(const wchar_t*); void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*); +int __cdecl _wmakepath_s(wchar_t*,size_t,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*); void __cdecl _wperror(const wchar_t*); int __cdecl _wputenv(const wchar_t*); void __cdecl _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*); @@ -431,6 +437,7 @@ int __cdecl _wcsicmp(const wchar_t*,const wchar_t*); int __cdecl _wcsicoll(const wchar_t*,const wchar_t*); int __cdecl _wcsicoll_l(const wchar_t*,const wchar_t*,_locale_t); wchar_t* __cdecl _wcslwr(wchar_t*); +errno_t __cdecl _wcslwr_s(wchar_t*, size_t); int __cdecl _wcsncoll(const wchar_t*,const wchar_t*,size_t); int __cdecl _wcsncoll_l(const wchar_t*,const wchar_t*,size_t,_locale_t); int __cdecl _wcsnicmp(const wchar_t*,const wchar_t*,size_t); @@ -440,6 +447,7 @@ wchar_t* __cdecl _wcsnset(wchar_t*,wchar_t,size_t); wchar_t* __cdecl _wcsrev(wchar_t*); wchar_t* __cdecl _wcsset(wchar_t*,wchar_t); wchar_t* __cdecl _wcsupr(wchar_t*); +errno_t __cdecl _wcsupr_s(wchar_t*, size_t);
wchar_t* __cdecl wcscat(wchar_t*,const wchar_t*); errno_t __cdecl wcscat_s(wchar_t*,size_t,const wchar_t*); @@ -451,9 +459,11 @@ errno_t __cdecl wcscpy_s(wchar_t*,size_t,const wchar_t*); size_t __cdecl wcscspn(const wchar_t*,const wchar_t*); size_t __cdecl wcslen(const wchar_t*); wchar_t* __cdecl wcsncat(wchar_t*,const wchar_t*,size_t); +errno_t __cdecl wcsncat_s(wchar_t *, size_t, const wchar_t *, size_t); int __cdecl wcsncmp(const wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl wcsncpy(wchar_t*,const wchar_t*,size_t); errno_t __cdecl wcsncpy_s(wchar_t*,size_t,const wchar_t*,size_t); +size_t __cdecl wcsnlen(const size_t*,size_t); wchar_t* __cdecl wcspbrk(const wchar_t*,const wchar_t*); wchar_t* __cdecl wcsrchr(const wchar_t*,wchar_t wcFor); size_t __cdecl wcsspn(const wchar_t*,const wchar_t*); @@ -515,6 +525,7 @@ static inline wchar_t* __cdecl wmemcpy(wchar_t *dst, const wchar_t *src, size_t { return memcpy(dst, src, n * sizeof(wchar_t)); } +errno_t __cdecl wmemcpy_s(wchar_t *, size_t, const wchar_t *, size_t);
static inline wchar_t* __cdecl wmemmove(wchar_t *dst, const wchar_t *src, size_t n) {