On Mon, Sep 6, 2010 at 3:22 PM, Kai Tietz <[email protected]> wrote:
> 2010/9/6 Ozkan Sezer <[email protected]>:
>> On Mon, Sep 6, 2010 at 3:11 PM, Kai Tietz <[email protected]> wrote:
>>> 2010/9/6 Bidski <[email protected]>:
>>>> Is there a reason why strnlen has been excluded thusly?
>>>>
>>>> Regards
>>>> Bidski
>>>>
>>>>
>>>
>>> Hmm, not sure. I think it was due an issue in building bootstrap, but
>>> I can't recall it.
>>>
>>> Kai
>>
>> strnlen doesn't exist in msvcrt.dll from x86-winxp
>>
>> we can implement it roughly like:
>>
>> size_t __cdecl strnlen (const char *s, size_t maxlen)
>> {
>>  size_t siz = __builtin_strlen(s);
>>  if (siz > maxlen) siz = maxlen;
>>  return siz;
>> }
>>
>> ... either as an inline or as a macro and/or in libmingwex.a
>>
>
> Yeah, this would be a good work-a-round for it. We should add it to
> our libmingwex library. Then we can remove this #if 0 ... #endif for
> it. Patch is pre-approved for it.
>
> Kai
>

See v1.0 bra...@3512 and tr...@3513. Notify me of any problems with it.

--
O.S.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to