[arm-gnu] "error: 'mbstate_t' undeclared" when compiling gettext-0.17
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[arm-gnu] "error: 'mbstate_t' undeclared" when compiling gettext-0.17



i was trying to compile the 
gettext-0.17 using arm-none-linux-gnueabi.
this is what i did:
gettext-0.17$ ./configure --host=arm-none-linux-gnueabi
gettext-0.17$ make

and this is what i get:
In file included from mbslen.c:26:
mbuiter.h:112: error: expected specifier-qualifier-list before 'mbstate_t'
...
mbuiter.h:194: error: 'mbstate_t' undeclared (first use in this function)

source look like this:
#include <stdio.h>
#include <time.h>
#include <wchar.h>

#include "mbchar.h"
#include "strnlen1.h"

struct mbuiter_multi
{
  bool in_shift;        /* true if next byte may not be interpreted as ASCII */
112:  mbstate_t state;      /* if in_shift: current shift state */
  bool next_done;       /* true if mbui_avail has already filled the following */
  struct mbchar cur;    /* the current character:
        const char *cur.ptr             pointer to current character
        The following are only valid after mbui_avail.
        size_t cur.bytes                number of bytes of current character
        bool cur.wc_valid               true if wc is a valid wide character
        wchar_t cur.wc                  if wc_valid: the current character
        */
};
...
194:    memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t));

so, what should i do now?

BR,
lvjj