]> err.no Git - util-linux/commitdiff
cfdisk: fix --with-slang
authorKarel Zak <kzak@redhat.com>
Thu, 1 Jul 2010 08:56:41 +0000 (10:56 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 1 Jul 2010 08:56:41 +0000 (10:56 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk/Makefile.am
fdisk/cfdisk.c

index 9a9db0c259701d187cadd8df97398066c4ea58ed..36871f3cf8e804cbb442dda499b7fe53aa6c9e4c 100644 (file)
@@ -54,7 +54,7 @@ endif
 if USE_SLANG
 sbin_PROGRAMS += cfdisk
 dist_man_MANS += cfdisk.8
-cfdisk_SOURCES = cfdisk.c $(fdisk_common) $(top_srcdir)/lib/mbsalign.c
+cfdisk_SOURCES = cfdisk.c $(fdisk_common)
 cfdisk_CFLAGS = $(cflags_blkid)
 cfdisk_LDADD = -lslang $(ldadd_blkid)
 else
index 30550c0ad8e043268bccce7ef76bfdd5dbb5f432..552858b6b77639cf052f05f3c019752f5026d121 100644 (file)
 #include <errno.h>
 #include <getopt.h>
 #include <fcntl.h>
+
+#ifdef HAVE_SLANG_H
+#include <slang.h>
+#elif defined(HAVE_SLANG_SLANG_H)
+#include <slang/slang.h>
+#endif
+
 #ifdef HAVE_SLCURSES_H
 #include <slcurses.h>
 #elif defined(HAVE_SLANG_SLCURSES_H)
@@ -73,6 +80,7 @@
 #elif defined(HAVE_NCURSES_NCURSES_H)
 #include <ncurses/ncurses.h>
 #endif
+
 #include <signal.h>
 #include <math.h>
 #include <string.h>
@@ -431,7 +439,8 @@ get_string(char *str, int len, char *def) {
 
     refresh();
 
-#if defined(HAVE_LIBNCURSESW) && defined(HAVE_WIDECHAR)
+#if !defined(HAVE_SLCURSES_H) && !defined(HAVE_SLANG_SLCURSES_H) && \
+    defined(HAVE_LIBNCURSESW) && defined(HAVE_WIDECHAR)
     while ((key = get_wch(&c)) != ERR &&
           c != '\r' && c != '\n' && c != KEY_ENTER) {
 #else