[haiku-bugs] Re: [Haiku] #12515: can't build Haiku within haiku.

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Mon, 21 Dec 2015 10:40:38 -0000

#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:
Has a Patch: 1 | Platform: x86
-------------------------+----------------------------

Comment (by pulkomandy):

According to POSIX specs for mbrlen
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrlen.html):
{{{
If ps is a null pointer, the mbrlen() function shall use its own internal
mbstate_t object, which is initialized at program start-up to the initial
conversion state.
}}}

Our implementation seems to do this properly (the state is declared
static, so it will be cleared to 0 at program start, then each call to
mbrlen reuses the state from previous calls).

It's strange that this can fail on plain ASCII text, however. In that case
there are no multi-byte characters so the state shouldn't be
desynchronized.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12515#comment:12>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: