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

------------------------------------------------------------------------------
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