[Pkg-libvirt-commits] [libguestfs] 47/384: fish: fix build warning when readline-devel is missing
Hilko Bengen
bengen at moszumanska.debian.org
Sun Mar 29 16:55:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit eddc8862e06728bcceb675f4c705c4078a962eb0
Author: Hu Tao <hutao at cn.fujitsu.com>
Date: Thu Dec 4 16:40:58 2014 +0800
fish: fix build warning when readline-devel is missing
Signed-off-by: Hu Tao <hutao at cn.fujitsu.com>
---
fish/fish.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fish/fish.c b/fish/fish.c
index 0432774..20511f8 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -641,10 +641,12 @@ shell_script (void)
#define FISH "><fs> "
+#ifdef HAVE_LIBREADLINE
static char *ps1 = NULL; /* GUESTFISH_PS1 */
static char *ps_output = NULL; /* GUESTFISH_OUTPUT */
-static char *ps_restore = NULL; /* GUESTFISH_RESTORE */
static char *ps_init = NULL; /* GUESTFISH_INIT */
+#endif /* HAVE_LIBREADLINE */
+static char *ps_restore = NULL; /* GUESTFISH_RESTORE */
static char *line_read = NULL;
static char *
@@ -698,10 +700,12 @@ script (int prompt)
struct parsed_command pcmd;
if (prompt) {
+#ifdef HAVE_LIBREADLINE
if (ps_init) { /* GUESTFISH_INIT */
CLEANUP_FREE char *pi = decode_ps1 (ps_init);
printf ("%s", pi);
}
+#endif /* HAVE_LIBREADLINE */
printf (_("\n"
"Welcome to guestfish, the guest filesystem shell for\n"
@@ -739,6 +743,7 @@ script (int prompt)
}
}
+#ifdef HAVE_LIBREADLINE
if (prompt) {
printf ("\n");
if (ps_restore) { /* GUESTFISH_RESTORE */
@@ -746,6 +751,7 @@ script (int prompt)
printf ("%s", pr);
}
}
+#endif /* HAVE_LIBREADLINE */
}
/* Parse a command string, splitting at whitespace, handling '!', '#' etc.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list