[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'mbsinit'
From: |
Bruno Haible |
Subject: |
Re: new module 'mbsinit' |
Date: |
Fri, 19 Dec 2008 12:54:24 +0100 |
User-agent: |
KMail/1.9.9 |
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 <address@hidden>
* 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