From 50ad42330bc3635768964dc2626ffe0823992016 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 2 Jan 2009 09:58:09 +0100 Subject: [PATCH] strftime: avoid compilation failure on Solaris 2.6 * modules/strftime (Depends-on): Add mbrlen and mbsinit. * lib/strftime.c [DO_MULTIBYTE]: Include unconditionally. Don't #define mbrlen or mbsinit, since now they're guaranteed to be available. Reported by Tom G. Christensen. Details in . --- ChangeLog | 11 ++++++++++- lib/strftime.c | 9 +-------- modules/strftime | 2 ++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f91c5b3eec..b9eb9bc348 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ +2009-01-02 Jim Meyering + + strftime: avoid compilation failure on Solaris 2.6 + * modules/strftime (Depends-on): Add mbrlen and mbsinit. + * lib/strftime.c [DO_MULTIBYTE]: Include unconditionally. + Don't #define mbrlen or mbsinit, since now they're guaranteed to + be available. Reported by Tom G. Christensen. Details in + . + 2009-01-01 Ralf Wildenhues - Bruno Haible + Bruno Haible Speed up gnulib-tool by doing more string processing through shell built-ins. diff --git a/lib/strftime.c b/lib/strftime.c index 897aab71e5..3ade8cf775 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -50,14 +50,7 @@ extern char *tzname[]; #define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_FORMAT_SAFE) #if DO_MULTIBYTE -# if HAVE_MBRLEN -# include -# 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 static const mbstate_t mbstate_zero; #endif diff --git a/modules/strftime b/modules/strftime index cc45452875..dc53916038 100644 --- a/modules/strftime +++ b/modules/strftime @@ -10,6 +10,8 @@ m4/strftime.m4 Depends-on: extensions +mbrlen +mbsinit stdbool time_r wchar -- 2.30.2