Hi all,

I have observed that ncurses does not compile here when the option
[*] Enable support for the UTF-8 locale
is enabled in menuconfig.

The ncurses configure checks for the type "wint_t" to be defined in some 
system's gcc's includes. Since we have a cross compiling environment, ncurses 
*should* check for *both* systems. This is needed, because the ncurses package 
also compiles stuff that is executed on the build machine at compile time 
(collect some database, etc...).
I couldn't make any progress in changing the configure.in script, so here is a 
fix for the appropriate header file. It checks if the _WINT_T macro is defined 
(this should be the case when the type wint_t is declared) and if not, it just 
pulls in wchar.h (which defines wint_t).
Since the configure checks the cross-gcc, there is only need to patch the 
header 
file for the build-system's includes.

I would be glad, if someone could test the patch on a system that does not need 
to include wchar.h. To find out if that is the case with your system, pull 
ncurses sources and do the configure and check for a line like:
checking if we must include wchar.h to declare wint_t... yes
If this is "yes" your system is like mine, if there is "no", you could test the 
attached patch (if the patch breaks ncurses when the option mentioned above is 
either enabled or disabled, we should think about a better solution).


Attached, the patch and a script to check if your system is wanted! ;-)

Clemens

# check for wchar.h:
mkdir tmp_ncurses
cd tmp_ncurses
wget ftp://ftp.cs.tu-berlin.de/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar -xvzf ncurses-5.6.tar.gz
cd ncurses-5.6
./configure  --without-cxx \
                        --without-cxx-binding \
                        --without-ada \
                        --with-progs \
                        --with-shared \
                        --with-normal \
                        --without-debug \
                        --without-profile \
                        --without-gpm \
                        --enable-overwrite \
                        --with-terminfo-dirs=/usr/share/terminfo \
                        --with-default-terminfo-dir=/usr/share/terminfo \
                        --disable-big-core \
                        --disable-home-terminfo \
                        --without-rcs-ids \
                        --enable-const \
                        --enable-echo \
                        --enable-widec \
                        --enable-ext-colors | grep wint_t


Index: package/ncurses/patches/patch-ncurses_curses_priv_h
===================================================================
--- package/ncurses/patches/patch-ncurses_curses_priv_h (Revision 0)
+++ package/ncurses/patches/patch-ncurses_curses_priv_h (Revision 0)
@@ -0,0 +1,14 @@
+$FreeWRT$
+--- ncurses-5.6.orig/ncurses/curses.priv.h     2006-12-10 01:55:14.000000000 
+0100
++++ ncurses-5.6/ncurses/curses.priv.h  2008-02-11 13:12:04.000000000 +0100
+@@ -253,6 +253,10 @@ color_t;
+ #include <term_entry.h>
+ #include <nc_tparm.h>
+
++#ifndef _WINT_T
++#include <wchar.h>
++#endif
++
+ #if NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT
+ #define if_EXT_COLORS(stmt)   stmt
+ #define NetPair(value,p)      (value).ext_color = (p), \


_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to