diff options
author | Jim Meyering <meyering@redhat.com> | 2009-01-02 09:58:09 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-01-02 09:59:17 +0100 |
commit | 50ad42330bc3635768964dc2626ffe0823992016 (patch) | |
tree | 1f5c70590408408363010a1dd4113814c61dc9ee | |
parent | fd0d369d2cab8949e3627f0a2e6e43bcc896dccb (diff) | |
download | gnulib-50ad42330bc3635768964dc2626ffe0823992016.tar.gz |
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>.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | lib/strftime.c | 9 | ||||
-rw-r--r-- | modules/strftime | 2 |
3 files changed, 13 insertions, 9 deletions
@@ -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. 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 <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 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 |