Fix crash of AboutSystem on gcc4.
* Glibc declares and uses its own version of mbstate_t, which is incompatibly with our own. Mix our own fields into glibc's mbstate_t, such that the two structs are compatible.
This commit is contained in:
parent
4e9e029551
commit
2ba22cc36a
@ -63,15 +63,26 @@ typedef unsigned int wint_t;
|
|||||||
|
|
||||||
#ifndef __mbstate_t_defined
|
#ifndef __mbstate_t_defined
|
||||||
# define __mbstate_t_defined 1
|
# define __mbstate_t_defined 1
|
||||||
/* Conversion state information. */
|
/* Conversion state information - for now a mixture between glibc's own idea of
|
||||||
|
mbstate_t and our own. */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int __count;
|
void* converter;
|
||||||
|
char charset[64];
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
wint_t __wch;
|
unsigned int count;
|
||||||
char __wchb[4];
|
int __count;
|
||||||
} __value; /* Value so far. */
|
};
|
||||||
|
union
|
||||||
|
{
|
||||||
|
char data[1024 + 8]; // 1024 bytes for data, 8 for alignment space
|
||||||
|
union
|
||||||
|
{
|
||||||
|
wint_t __wch;
|
||||||
|
char __wchb[4];
|
||||||
|
} __value; /* Value so far. */
|
||||||
|
};
|
||||||
} __mbstate_t;
|
} __mbstate_t;
|
||||||
#endif
|
#endif
|
||||||
#undef __need_mbstate_t
|
#undef __need_mbstate_t
|
||||||
|
Loading…
Reference in New Issue
Block a user