#12515: can't build Haiku within haiku.
-------------------------+----------------------------
Reporter: khallebal | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: - General | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking: 13103
Has a Patch: 1 | Platform: x86
-------------------------+----------------------------
Comment (by korli):
FWIW
https://www.gnu.org/software/libc/manual/html_node/Converting-a-Character.html
also shows a use of a memcpy() with mbstate_t:
{{{
if (len < MB_CUR_LEN)
{
mbstate_t temp_state;
memcpy (&temp_state, &state, sizeof (state));
if (wcrtomb (NULL, *ws, &temp_state) > len)
{
/* We cannot guarantee that the next
character fits into the buffer, so
return an error. */
errno = E2BIG;
return NULL;
}
}
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/12515#comment:25>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.