From e27e6728f653b70f5d41b5a3c332e9be4b3c434c Mon Sep 17 00:00:00 2001 From: John Marino Date: Tue, 7 Aug 2012 13:35:26 +0200 Subject: [PATCH] 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. --- lib/libncurses/include/curses.head | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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 -- 1.7.7.2