Magellan Linux

Annotation of /trunk/util-linux/patches/util-linux-2.18-ncursesw.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1078 - (hide annotations) (download)
Tue Aug 17 15:39:36 2010 UTC (13 years, 10 months ago) by niro
File size: 2163 byte(s)
patches for 2.18

1 niro 1078 From 01f6b78145dbb46ed9205613daf7d06956a5795f Mon Sep 17 00:00:00 2001
2     From: Mike Frysinger <vapier@gentoo.org>
3     Date: Thu, 1 Jul 2010 13:40:33 -0400
4     Subject: [PATCH] cfdisk: search for ncursesw/ncurses.h
5    
6     Some distros install the wide version of ncurses side by side with the
7     non-wide version and place the wide headers in an ncursesw/ subdir. So
8     detect that behavior and include the right header with cfdisk.
9    
10     Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11     ---
12     configure.ac | 1 +
13     fdisk/cfdisk.c | 2 ++
14     2 files changed, 3 insertions(+), 0 deletions(-)
15    
16     # ATM we avoid regenerating autotools
17     #diff --git a/configure.ac b/configure.ac
18     #index 8c5f92f..e4f8884 100644
19     #--- a/configure.ac
20     #+++ b/configure.ac
21     #@@ -442,6 +442,7 @@ if test "x$with_ncurses" != xno; then
22     if test "x$with_ncurses" = xauto; then
23     UTIL_CHECK_LIB(ncursesw, initscr, ncurses)
24     if test "x$have_ncurses" = xyes; then
25     + AC_CHECK_HEADERS([ncursesw/ncurses.h])
26     NCURSES_LIBS="-lncursesw"
27     fi
28     fi
29     --- a/config.h.in
30     +++ b/config.h.in
31     @@ -229,6 +229,9 @@
32     /* Define to 1 if you have the <ncurses/ncurses.h> header file. */
33     #undef HAVE_NCURSES_NCURSES_H
34    
35     +/* Define to 1 if you have the <ncursesw/ncurses.h> header file. */
36     +#undef HAVE_NCURSESW_NCURSES_H
37     +
38     /* Define to 1 if you have the <netinet/in.h> header file. */
39     #undef HAVE_NETINET_IN_H
40    
41     --- a/configure
42     +++ b/configure
43     @@ -17784,7 +17784,7 @@ if test "x$with_ncurses" != xno; then
44     have_ncurses=no
45    
46    
47     -for ac_header in ncurses.h ncurses/ncurses.h
48     +for ac_header in ncurses.h ncurses/ncurses.h ncursesw/ncurses.h
49     do
50     as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51     if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52     diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c
53     index 552858b..7fa0b19 100644
54     --- a/fdisk/cfdisk.c
55     +++ b/fdisk/cfdisk.c
56     @@ -75,6 +75,8 @@
57     #include <slcurses.h>
58     #elif defined(HAVE_SLANG_SLCURSES_H)
59     #include <slang/slcurses.h>
60     +#elif defined(HAVE_NCURSESW_NCURSES_H) && defined(HAVE_WIDECHAR)
61     +#include <ncursesw/ncurses.h>
62     #elif defined(HAVE_NCURSES_H)
63     #include <ncurses.h>
64     #elif defined(HAVE_NCURSES_NCURSES_H)
65     --
66     1.7.1