mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[SDK:WINE] Improve wine/unicode.h (v)sprintfW defines, regarding the (v)swprintf functions (#6823)
These defines assumed that the (v)swprintf functions were the non-conformant ones (that don't take a 'count' 2nd parameter). Because of that, use instead the _(v)swprintf functions. However, those exist only in NT6+. Therefore, redefine these locally using the _(v)snprintf functions. NOTE: wine/unicode.h has been removed in wine commit 348eebae872e90a735041a153635d00b01178cfa from July 13, 2022
This commit is contained in:
parent
a69532ec4a
commit
30226f834d
1 changed files with 8 additions and 2 deletions
|
@ -24,6 +24,12 @@
|
|||
#define WINE_UNICODE_INLINE static inline
|
||||
#endif
|
||||
|
||||
#if (_WIN32_WINNT < _WIN32_WINNT_VISTA) || (DLL_EXPORT_VERSION < _WIN32_WINNT_VISTA)
|
||||
/* msvcrt versions incompatibilities */
|
||||
#define _swprintf(s,f,...) _snwprintf((s),MAXLONG,(f),##__VA_ARGS__)
|
||||
#define _vswprintf(s,f,v) _vsnwprintf((s),MAXLONG,(f),(v))
|
||||
#endif
|
||||
|
||||
#define memicmpW(s1,s2,n) _wcsnicmp((s1),(s2),(n))
|
||||
#define strlenW(s) wcslen((s))
|
||||
#define strcpyW(d,s) wcscpy((d),(s))
|
||||
|
@ -55,8 +61,8 @@
|
|||
#define atolW(s) _wtol((s))
|
||||
#define strlwrW(s) _wcslwr((s))
|
||||
#define struprW(s) _wcsupr((s))
|
||||
#define sprintfW swprintf
|
||||
#define vsprintfW vswprintf
|
||||
#define sprintfW _swprintf
|
||||
#define vsprintfW _vswprintf
|
||||
#define snprintfW _snwprintf
|
||||
#define vsnprintfW _vsnwprintf
|
||||
#define isprintW iswprint
|
||||
|
|
Loading…
Reference in a new issue