Mercurial > ~mikael > mcabber > hg
diff mcabber/src/utf8.h @ 1089:a61c3311a5bb
Hopefully fix unicode detection on BSD systems
The ncurses library's unicode support wasn't correctly detected on some
systems (FreeBSD for example).
This patch adds a HAVE_UNICODE define with autoconf.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 07 Dec 2006 21:18:48 +0100 |
parents | a09bf67d1dfb |
children | 334ae9f498f1 |
line wrap: on
line diff
--- a/mcabber/src/utf8.h Wed Dec 06 23:18:36 2006 +0100 +++ b/mcabber/src/utf8.h Thu Dec 07 21:18:48 2006 +0100 @@ -3,9 +3,12 @@ #include <config.h> +#if defined HAVE_UNICODE && defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H +# define UNICODE +#endif + #ifdef HAVE_WCHAR_H # include <wchar.h> -# define UNICODE # define get_char_width(c) (utf8_mode ? wcwidth(get_char(c)) : 1) #else # define wcwidth(c) 1 @@ -18,11 +21,6 @@ # define iswblank(c) (c == ' ') # define iswalnum(c) isalnum(c) # define iswprint(c) isprint(c) -# undef UNICODE -#endif - -#ifndef HAVE_NCURSESW_NCURSES_H -# undef UNICODE #endif extern int utf8_mode;