1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

sh: fix NO_HISTORY build

(cherry picked from commit 35b253d9d2)
This commit is contained in:
Piotr Pawel Stefaniak 2021-08-18 22:40:39 +02:00
parent a346729d1c
commit b25642d653

View File

@ -506,27 +506,6 @@ bindcmd(int argc, char **argv)
return ret;
}
#else
#include "error.h"
int
histcmd(int argc __unused, char **argv __unused)
{
error("not compiled with history support");
/*NOTREACHED*/
return (0);
}
int
bindcmd(int argc __unused, char **argv __unused)
{
error("not compiled with line editing support");
return (0);
}
#endif
/*
* Comparator function for qsort(). The use of curpos here is to skip
* characters that we already know to compare equal (common prefix).
@ -647,3 +626,24 @@ sh_complete(EditLine *sel, int ch __unused)
L" \t\n\"\\'`@$><=;|&{(", NULL, NULL, (size_t)100,
NULL, &((int) {0}), NULL, NULL, FN_QUOTE_MATCH);
}
#else
#include "error.h"
int
histcmd(int argc __unused, char **argv __unused)
{
error("not compiled with history support");
/*NOTREACHED*/
return (0);
}
int
bindcmd(int argc __unused, char **argv __unused)
{
error("not compiled with line editing support");
return (0);
}
#endif