Hi Bruno, I needed the following patch in order to build on a Solaris 10 system using gcc-4.2.3. Without it, I got errors like this:
mbsrtowcs-state.c:23: error: invalid initializer Ok to push? >From 461e9009025f50d47495365e74d3f05a74818a08 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Tue, 28 Apr 2009 15:27:58 +0200 Subject: [PATCH] mbsrtowcs-state.c, wcsrtombs-state.c: avoid compilation failure * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Initialize a variable of type mbstate_t using {0,}, not 0. This is required with some versions of gcc (at least 4.2.3). * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise. --- ChangeLog | 8 ++++++++ lib/mbsrtowcs-state.c | 2 +- lib/wcsrtombs-state.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6389ebe..7a69131 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-28 Jim Meyering <meyer...@redhat.com> + + mbsrtowcs-state.c, wcsrtombs-state.c: avoid compilation failure + * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Initialize + a variable of type mbstate_t using {0,}, not 0. This is required + with some versions of gcc (at least 4.2.3). + * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise. + 2009-04-27 Bruno Haible <br...@clisp.org> New module 'libunistring'. diff --git a/lib/mbsrtowcs-state.c b/lib/mbsrtowcs-state.c index 3b4db21..2143a51 100644 --- a/lib/mbsrtowcs-state.c +++ b/lib/mbsrtowcs-state.c @@ -20,4 +20,4 @@ #include <wchar.h> /* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */ -mbstate_t _gl_mbsrtowcs_state = 0; +mbstate_t _gl_mbsrtowcs_state = { 0, }; diff --git a/lib/wcsrtombs-state.c b/lib/wcsrtombs-state.c index cbdd250..2733804 100644 --- a/lib/wcsrtombs-state.c +++ b/lib/wcsrtombs-state.c @@ -20,4 +20,4 @@ #include <wchar.h> /* Internal state used by the functions wcsrtombs() and wcsnrtombs(). */ -mbstate_t _gl_wcsrtombs_state = 0; +mbstate_t _gl_wcsrtombs_state = { 0, }; -- 1.6.3.rc3.199.g24398