[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mbstate_t



>>>>> Edmund GRIMLEY EVANS writes:

 > In glibc-2.1, mbstate_t is defined thus:
 > typedef struct
 > {
 >   int count;		/* Number of bytes needed for the current character. */
 >   wint_t value;		/* Value so far.  */
 > } mbstate_t;

 > Bruno is more thrifty in libutf8, defining it as:

 > typedef struct
 > {
 >   int dummy;    /* So that {0} is a valid constant initializer. */
 > } mbstate_t;

 > How is it defined in glibc-2.2?
Check it yourself;-)  The glibc CVS archive can be accessed via http
(check http://sourceware.cygnus.com/glibc).

The current version is:
/* Conversion state information.  */
typedef struct
{
  int count;            /* Number of bytes needed for the current character. */
  wint_t value;         /* Value so far.  */
} __mbstate_t;


 > If I define it in a private header file as follows, is there any
 > reason why my binary program shouldn't work with both libraries?

I don't see directly a problem - as long as you only use one library
add a time.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@xxxxxxx
   private aj@xxxxxxxxxxxxxxxxxxxxxx
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/