mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 18:20:17 +00:00
include: Add [_w]getenv_s.
This commit is contained in:
parent
73695eff14
commit
8fb70648d1
|
@ -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 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 _wfullpath(wchar_t*,const wchar_t*,size_t);
|
||||||
_ACRTIMP wchar_t* __cdecl _wgetenv(const wchar_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 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 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*);
|
_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);
|
_ACRTIMP unsigned __int64 __cdecl _wcstoull_l(const wchar_t*,wchar_t**,int,_locale_t);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -216,6 +216,7 @@ _ACRTIMP ldiv_t __cdecl ldiv(__msvcrt_long,__msvcrt_long);
|
||||||
_ACRTIMP lldiv_t __cdecl lldiv(__int64,__int64);
|
_ACRTIMP lldiv_t __cdecl lldiv(__int64,__int64);
|
||||||
_ACRTIMP DECLSPEC_NORETURN void __cdecl exit(int);
|
_ACRTIMP DECLSPEC_NORETURN void __cdecl exit(int);
|
||||||
_ACRTIMP char* __cdecl getenv(const char*);
|
_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 __msvcrt_long __cdecl labs(__msvcrt_long);
|
||||||
_ACRTIMP __int64 __cdecl llabs(__int64);
|
_ACRTIMP __int64 __cdecl llabs(__int64);
|
||||||
_ACRTIMP int __cdecl mblen(const char*,size_t);
|
_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 */
|
#endif /* _UCRT */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue