configure: Detect native NetBSD curses(3)
PATCH 1/1 configure: Detect native NetBSD curses(3)
NetBSD ships with traditional BSD curses with compatibility with ncurses. qemu works nicely with the basesystem version of curses(3) from NetBSD.
The only mismatch between curses(3) and ncurses is the lack of curses_version() in the NetBSD version. This function is used solely in the configure script, therefore eliminate it from the curses(3) detection.
With this change applied, configure detects correctly curses frontend.
--- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
configure +1 -2
@@ -3034,14 +3034,13 @@ if test "$curses" != "no" ; then #include <curses.h> #include <wchar.h> int main(void) { - const char *s = curses_version(); wchar_t wch = L'w'; setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - return s != 0; + return 0; } EOF IFS=:
Signature · 1 line
2.12.2
x1 ping
Quoted 35 lines · Kamil Rytarowski
NetBSD ships with traditional BSD curses with compatibility with ncurses. qemu works nicely with the basesystem version of curses(3) from NetBSD.
The only mismatch between curses(3) and ncurses is the lack of
curses_version()in the NetBSD version. This function is used solely in the configure script, therefore eliminate it from the curses(3) detection.With this change applied, configure detects correctly curses frontend.
Signed-off-by Kamil Rytarowski <[email protected]>--- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)configure +1
-2@@ -3034,14 +3034,13 @@ if test "$curses" != "no" ; then #include <curses.h> #include <wchar.h> int main(void) { - const char *s = curses_version(); wchar_t wch = L'w'; setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - return s != 0; + return 0; } EOF IFS=:
Quoted 10 lines · Kamil Rytarowski
NetBSD ships with traditional BSD curses with compatibility with ncurses. qemu works nicely with the basesystem version of curses(3) from NetBSD.
The only mismatch between curses(3) and ncurses is the lack of
curses_version()in the NetBSD version. This function is used solely in the configure script, therefore eliminate it from the curses(3) detection.With this change applied, configure detects correctly curses frontend.
Signed-off-by Kamil Rytarowski <[email protected]>
Quoted 14 lines
--- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)configure +0
-1@@ -3034,14 +3034,13 @@ if test "$curses" != "no" ; then #include <curses.h> #include <wchar.h> int main(void) { - const char *s = curses_version(); wchar_t wch = L'w';
configure if test "$curses" != "no" ; then · line 3046
Quoted 10 lines
configure +1
-1setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - return s != 0; + return 0; } EOF IFS=:
--
Alex Bennée
Ping? Could someone please put it on the pull-request?
Adding qemu-trivial@.
Quoted 45 lines · Alex Bennée
Quoted 10 lines · Kamil Rytarowski
NetBSD ships with traditional BSD curses with compatibility with ncurses. qemu works nicely with the basesystem version of curses(3) from NetBSD.
The only mismatch between curses(3) and ncurses is the lack of
curses_version()in the NetBSD version. This function is used solely in the configure script, therefore eliminate it from the curses(3) detection.With this change applied, configure detects correctly curses frontend.
Signed-off-by Kamil Rytarowski <[email protected]>Reviewed-by Alex Bennée <[email protected]>Quoted 14 lines
--- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)configure +0
-1@@ -3034,14 +3034,13 @@ if test "$curses" != "no" ; then #include <curses.h> #include <wchar.h> int main(void) { - const char *s = curses_version(); wchar_t wch = L'w';configure if test "$curses" != "no" ; then · line 3046
Quoted 10 lines
configure +1
-1setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - return s != 0; + return 0; } EOF IFS=:--
Alex Bennée
Hi Kamil,
Quoted 19 lines · Kamil Rytarowski
NetBSD ships with traditional BSD curses with compatibility with ncurses. qemu works nicely with the basesystem version of curses(3) from NetBSD.
The only mismatch between curses(3) and ncurses is the lack of
curses_version()in the NetBSD version. This function is used solely in the configure script, therefore eliminate it from the curses(3) detection.With this change applied, configure detects correctly curses frontend.
Signed-off-by Kamil Rytarowski <[email protected]>--- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)configure +0
-0
configure if test "$curses" != "no" ; then · line 3034
Quoted 1 line
configure +0
-0@@ -3034,14 +3034,13 @@ if test "$curses" != "no" ; then #include <curses.h>
This checks if the <curses.h> include in present,
configure if test "$curses" != "no" ; then · line 3037
Quoted 3 lines
configure +0
-1#include <wchar.h> int main(void) { - const char *s = curses_version();
This however checks if the library is present, trying to link it.
configure if test "$curses" != "no" ; then · line 3042
Quoted 6 lines
configure +0
-0wchar_t wch = L'w'; setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE);
Those 3 functions also belong to the libcurse, so the link is still checked, and this patch looks good to me.
Quoted 6 lines
configure +1
-1- return s != 0; + return 0; } EOF IFS=:
Michael Tokarev
AppliedQuoted 8 lines · Kamil Rytarowski
NetBSD ships with traditional BSD curses with compatibility with ncurses. qemu works nicely with the basesystem version of curses(3) from NetBSD.
The only mismatch between curses(3) and ncurses is the lack of
curses_version()in the NetBSD version. This function is used solely in the configure script, therefore eliminate it from the curses(3) detection.With this change applied, configure detects correctly curses frontend.
Applied to -trivial, thanks!
/mjt