changeset 10909:796f25c7bd1a

Verify an assumption.
author Bruno Haible <bruno@clisp.org>
date Fri, 19 Dec 2008 12:54:07 +0100
parents bcd9ca0eda6e
children e79b85bd0a7d
files ChangeLog lib/mbrtowc.c modules/mbrtowc
diffstat 3 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-19  Bruno Haible  <bruno@clisp.org>
+
+	* lib/mbrtowc.c: Include verify.h. Verify an assumption.
+	* modules/mbrtowc (Depends-on): Add verify.
+	Suggested by Paul Eggert.
+
 2008-12-18  Bruno Haible  <bruno@clisp.org>
 
 	* modules/mbsinit-tests: New file.
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -25,8 +25,11 @@
 
 #include "localcharset.h"
 #include "streq.h"
+#include "verify.h"
 
 
+verify (sizeof (mbstate_t) >= 4);
+
 static char internal_state[4];
 
 size_t
--- a/modules/mbrtowc
+++ b/modules/mbrtowc
@@ -10,6 +10,7 @@
 wchar
 localcharset
 streq
+verify
 
 configure.ac:
 gl_FUNC_MBRTOWC