msvcrt: Bump MSVCRT_MB_LEN_MAX to 6 and use it in MSVCRT__wctomb_l for default buffer length
Orion Poplawski
orion at cora.nwra.com
Tue Jan 27 17:25:33 CST 2015
On 01/26/2015 06:10 AM, Piotr Caban wrote:
> On 01/23/15 18:38, Orion Poplawski wrote:
>> diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
>> index 41f31b9..401628a 100644
>> --- a/dlls/msvcrt/msvcrt.h
>> +++ b/dlls/msvcrt/msvcrt.h
>> @@ -47,7 +47,7 @@
>> #define MSVCRT_I64_MAX (((__int64)0x7fffffff << 32) | 0xffffffff)
>> #define MSVCRT_I64_MIN (-MSVCRT_I64_MAX-1)
>> #define MSVCRT_UI64_MAX (((unsigned __int64)0xffffffff << 32) | 0xffffffff)
>> -#define MSVCRT_MB_LEN_MAX 2
>> +#define MSVCRT_MB_LEN_MAX 6
> MB_LEN_MAX equals 5 on windows. It should probably be set to 5 here as well.
> Probably include/msvcrt/limits.h should also be changed.
>
> Thanks,
> Piotr
Looks like things are a bit version dependent - It appears that is is 2 for
Visual Studio .NET 2003, and 5 for later versions:
https://msdn.microsoft.com/en-us/library/296az74e%28v=vs.71%29.aspx
I have no idea how this intersects with wine's implementation though.
Not sure if I should be producing an updated patch, or if the wine devs can
take it from here.
Thanks,
Orion
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA, Boulder/CoRA Office FAX: 303-415-9702
3380 Mitchell Lane orion at nwra.com
Boulder, CO 80301 http://www.nwra.com
More information about the wine-devel
mailing list