<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2820: Mutt doesn't build with --without-wc-funcs



On 2007-03-04 12:31:36 +0100, Vincent Lefevre wrote:
> When I configure Mutt using --without-wc-funcs (this should be
> better under Mac OS X as its wcwidth function is buggy), I get the
> following error when running make:
> 
> gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../intl -I../intl  -Wall -pedantic -g 
> -O2 -MT auth.o -MD -MP -MF .deps/auth.Tpo -c -o auth.o auth.c
> In file included from ../protos.h:24,
>                  from ../mutt.h:956,
>                  from auth.c:27:
> ../mbyte.h:16: error: parse error before '(' token
> ../mbyte.h:17: error: parse error before '(' token
> ../mbyte.h:18: error: parse error before '(' token

I could fix the build problem by adding #undef's in mbyte.h:

Index: mbyte.h
===================================================================
RCS file: /home/roessler/cvs/mutt/mbyte.h,v
retrieving revision 3.1
diff -d -u -r3.1 mbyte.h
--- mbyte.h     5 Feb 2005 14:11:36 -0000       3.1
+++ mbyte.h     4 Mar 2007 12:09:38 -0000
@@ -11,13 +11,21 @@
 # endif
 
 # ifndef HAVE_WC_FUNCS
+#  undef wcrtomb
 size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
+#  undef mbrtowc
 size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
+#  undef iswprint
 int iswprint (wint_t wc);
+#  undef iswspace
 int iswspace (wint_t wc);
+#  undef iswalnum
 int iswalnum (wint_t wc);
+#  undef towupper
 wint_t towupper (wint_t wc);
+#  undef towlower
 wint_t towlower (wint_t wc);
+#  undef wcwidth
 int wcwidth (wchar_t wc);
 # endif /* !HAVE_WC_FUNCS */
 
but combining characters aren't displayed correctly. I get:

e\01.1 e\01.2 e\01.3 e\01.4 e\01.5 e\01.6 e\01.7 e\01.8 e\01.9+e\01.10 e\01.11 e
\01.12 e\01.13 e\01.14 e\01.15 e\01.16 e\01.17+e\01.18 e\01.19 e\01.20

for the attached mail message.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
>From vincent@xxxxxxxxxx Sun Mar  4 11:58:35 2007
Date: Sun, 4 Mar 2007 11:58:31 +0100
From: Vincent Lefevre <vincent@xxxxxxxxxx>
To: Vincent Lefevre <vincent@xxxxxxxxxx>
Subject: test of combining-character width
Message-ID: <20070304105831.GC5012@xxxxxxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Status: RO
Content-Length: 131
Lines: 1

é.1 é.2 é.3 é.4 é.5 é.6 é.7 é.8 é.9 é.10 é.11 é.12 é.13 é.14 
é.15 é.16 é.17 é.18 é.19 é.20