mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Build test.c also without readline library
Allow bulding of this testing tool also without readline library. Outputs message about build without readline library then.
This commit is contained in:
parent
16d0725dd3
commit
e3dd1c81e9
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
|
||||
* Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
|
||||
* Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This file is part of LVM2.
|
||||
*
|
||||
@ -12,13 +12,18 @@
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <readline/readline.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "configure.h"
|
||||
#include "lvm2app.h"
|
||||
|
||||
#ifndef READLINE_SUPPORT
|
||||
#include <readline/readline.h>
|
||||
|
||||
#define MAX_ARGS 64
|
||||
|
||||
static int lvm_split(char *str, int *argc, char **argv, int max)
|
||||
@ -1071,6 +1076,13 @@ static int lvmapi_test_shell(lvm_t libh)
|
||||
free(input);
|
||||
return 0;
|
||||
}
|
||||
#else /* !READLINE_SUPPORT */
|
||||
static int lvmapi_test_shell(lvm_t libh)
|
||||
{
|
||||
printf("Build without readline library, no interactive testing.\n");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user