From: John Marino Date: Tue, 7 Aug 2012 11:35:26 +0000 (+0200) Subject: ncurses: Fix pkgsrc check and use of ncurses X-Git-Tag: v3.2.0~453 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/e27e6728f653b70f5d41b5a3c332e9be4b3c434c ncurses: Fix pkgsrc check and use of ncurses Without the macro SET_NEED_WCHAR_H defined, the ncurses header will not include wchar.h which is where the wint_t type is defined. This breaks any program loading ncurses.h without defining this macro because several functions use the wint_t type. Define wint_t as int if wchar.h isn't included. This fixes the ncurses check on several pkgsrc configuration checks and allows the package to build with the system ncurses. --- diff --git a/lib/libncurses/include/curses.head b/lib/libncurses/include/curses.head index 6801b35..151f5ea0 100644 --- a/lib/libncurses/include/curses.head +++ b/lib/libncurses/include/curses.head @@ -353,6 +353,8 @@ typedef chtype attr_t; /* ...must be at least as wide as chtype */ #if SET_NEED_WCHAR_H #include /* ...to get mbstate_t, etc. */ +#else +typedef int wint_t; #endif #if 0