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
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
------------------------------------------------------------------------------
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