Commit 8fb70648 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

include: Add [_w]getenv_s.

parent 73695eff
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment