Paul Eggert wrote:
> How about adding a "verify (sizeof (mbstate_t) >= 4);" so that this
> assumption is checked by the compiler?

I'm adding this verification also to mbrtowc:

2008-12-19  Bruno Haible  <br...@clisp.org>

        * lib/mbrtowc.c: Include verify.h. Verify an assumption.
        * modules/mbrtowc (Depends-on): Add verify.
        Suggested by Paul Eggert.

*** lib/mbrtowc.c.orig  2008-12-19 12:51:41.000000000 +0100
--- lib/mbrtowc.c       2008-12-19 12:50:28.000000000 +0100
***************
*** 25,32 ****
--- 25,35 ----
  
  #include "localcharset.h"
  #include "streq.h"
+ #include "verify.h"
  
  
+ verify (sizeof (mbstate_t) >= 4);
+ 
  static char internal_state[4];
  
  size_t
*** modules/mbrtowc.orig        2008-12-19 12:51:41.000000000 +0100
--- modules/mbrtowc     2008-12-19 12:51:03.000000000 +0100
***************
*** 10,15 ****
--- 10,16 ----
  wchar
  localcharset
  streq
+ verify
  
  configure.ac:
  gl_FUNC_MBRTOWC


Reply via email to