Mercurial > hg > octave-shane > gnulib-hg
changeset 10990:7e8a454e9758
strftime: avoid compilation failure on Solaris 2.6
* modules/strftime (Depends-on): Add mbrlen and mbsinit.
* lib/strftime.c [DO_MULTIBYTE]: Include <wchar.h> unconditionally.
Don't #define mbrlen or mbsinit, since now they're guaranteed to
be available. Reported by Tom G. Christensen. Details in
<http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16180>.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Fri, 02 Jan 2009 09:58:09 +0100 |
parents | 8b11d1d206e0 |
children | 6a44f8868a74 |
files | ChangeLog lib/strftime.c modules/strftime |
diffstat | 3 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ +2009-01-02 Jim Meyering <meyering@redhat.com> + + strftime: avoid compilation failure on Solaris 2.6 + * modules/strftime (Depends-on): Add mbrlen and mbsinit. + * lib/strftime.c [DO_MULTIBYTE]: Include <wchar.h> unconditionally. + Don't #define mbrlen or mbsinit, since now they're guaranteed to + be available. Reported by Tom G. Christensen. Details in + <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16180>. + 2009-01-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> - Bruno Haible <bruno@clisp.org> + Bruno Haible <bruno@clisp.org> Speed up gnulib-tool by doing more string processing through shell built-ins.
--- a/lib/strftime.c +++ b/lib/strftime.c @@ -50,14 +50,7 @@ #define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_FORMAT_SAFE) #if DO_MULTIBYTE -# if HAVE_MBRLEN -# include <wchar.h> -# else - /* Simulate mbrlen with mblen as best we can. */ -# define mbstate_t int -# define mbrlen(s, n, ps) mblen (s, n) -# define mbsinit(ps) (*(ps) == 0) -# endif +# include <wchar.h> static const mbstate_t mbstate_zero; #endif