include: Add [_w]getenv_s.

This commit is contained in:
Daniel Lehman 2023-08-21 22:32:06 -07:00 committed by Alexandre Julliard
parent 73695eff14
commit 8fb70648d1
2 changed files with 22 additions and 0 deletions

View file

@ -24,6 +24,7 @@ _ACRTIMP wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
_ACRTIMP errno_t __cdecl _ultow_s(__msvcrt_ulong, wchar_t*, size_t, int);
_ACRTIMP wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
_ACRTIMP wchar_t* __cdecl _wgetenv(const wchar_t*);
_ACRTIMP errno_t __cdecl _wgetenv_s(size_t *,wchar_t *,size_t,const wchar_t *);
_ACRTIMP void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
_ACRTIMP int __cdecl _wmakepath_s(wchar_t*,size_t,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
_ACRTIMP void __cdecl _wperror(const wchar_t*);
@ -63,6 +64,16 @@ _ACRTIMP unsigned __int64 __cdecl wcstoull(const wchar_t*,wchar_t**,int);
_ACRTIMP unsigned __int64 __cdecl _wcstoull_l(const wchar_t*,wchar_t**,int,_locale_t);
#ifdef __cplusplus
extern "C++" {
template <size_t size>
inline errno_t _wgetenv_s(size_t *ret, wchar_t (&buf)[size], const wchar_t *var)
{
return _wgetenv_s(ret, buf, size, var);
}
} /* extern "C++" */
}
#endif

View file

@ -216,6 +216,7 @@ _ACRTIMP ldiv_t __cdecl ldiv(__msvcrt_long,__msvcrt_long);
_ACRTIMP lldiv_t __cdecl lldiv(__int64,__int64);
_ACRTIMP DECLSPEC_NORETURN void __cdecl exit(int);
_ACRTIMP char* __cdecl getenv(const char*);
_ACRTIMP errno_t __cdecl getenv_s(size_t*,char*,size_t,const char*);
_ACRTIMP __msvcrt_long __cdecl labs(__msvcrt_long);
_ACRTIMP __int64 __cdecl llabs(__int64);
_ACRTIMP int __cdecl mblen(const char*,size_t);
@ -255,6 +256,16 @@ static inline long double strtold(const char *string, char **endptr) { return _s
#endif /* _UCRT */
#ifdef __cplusplus
extern "C++" {
template <size_t size>
inline errno_t getenv_s(size_t *ret, char (&buf)[size], const char *var)
{
return getenv_s(ret, buf, size, var);
}
} /* extern "C++" */
}
#endif