The branch main has been updated by pstef:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=35b253d9d238c46a710a0cd7ba027ec87ba7c8ba

commit 35b253d9d238c46a710a0cd7ba027ec87ba7c8ba
Author:     Piotr Pawel Stefaniak <ps...@freebsd.org>
AuthorDate: 2021-08-18 20:40:39 +0000
Commit:     Piotr Pawel Stefaniak <ps...@freebsd.org>
CommitDate: 2021-08-19 04:57:06 +0000

    sh: fix NO_HISTORY build
    
    Move code added in b315a7296d2a ("autocomplete commands") to
    conditionally compiled part under #ifndef NO_HISTORY.
    
    Reported by:    bdrewery
    Fixes:          b315a7296d2a
---
 bin/sh/histedit.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index 596145790f31..bd82016c33cb 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -565,27 +565,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).
@@ -706,3 +685,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
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to