Module Name:    src
Committed By:   martin
Date:           Thu Sep 15 11:35:06 UTC 2022

Modified Files:
        src/bin/csh: csh.c extern.h set.c

Log Message:
Fix the build for variants that do not define EDIT.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/bin/csh/csh.c
cvs rdiff -u -r1.33 -r1.34 src/bin/csh/extern.h
cvs rdiff -u -r1.39 -r1.40 src/bin/csh/set.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/csh/csh.c
diff -u src/bin/csh/csh.c:1.55 src/bin/csh/csh.c:1.56
--- src/bin/csh/csh.c:1.55	Wed Sep 14 17:06:16 2022
+++ src/bin/csh/csh.c	Thu Sep 15 11:35:06 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: csh.c,v 1.55 2022/09/14 17:06:16 christos Exp $ */
+/* $NetBSD: csh.c,v 1.56 2022/09/15 11:35:06 martin Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)csh.c	8.2 (Berkeley) 10/12/93";
 #else
-__RCSID("$NetBSD: csh.c,v 1.55 2022/09/14 17:06:16 christos Exp $");
+__RCSID("$NetBSD: csh.c,v 1.56 2022/09/15 11:35:06 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -1139,7 +1139,9 @@ process(int catch)
 	    pnote();
 	if (intty && prompt && evalvec == 0) {
 	    mailchk();
+#ifdef EDIT
 	    updateediting();
+#endif
 	    /*
 	     * If we are at the end of the input buffer then we are going to
 	     * read fresh stuff. Otherwise, we are rereading input and don't

Index: src/bin/csh/extern.h
diff -u src/bin/csh/extern.h:1.33 src/bin/csh/extern.h:1.34
--- src/bin/csh/extern.h:1.33	Wed Sep 14 16:15:51 2022
+++ src/bin/csh/extern.h	Thu Sep 15 11:35:06 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.33 2022/09/14 16:15:51 christos Exp $ */
+/* $NetBSD: extern.h,v 1.34 2022/09/15 11:35:06 martin Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -291,7 +291,9 @@ void unsetv(Char *);
 void setNS(Char *);
 void shift(Char **, struct command *);
 void plist(struct varent *);
+#ifdef EDIT
 void updateediting(void);
+#endif
 
 /*
  * time.c

Index: src/bin/csh/set.c
diff -u src/bin/csh/set.c:1.39 src/bin/csh/set.c:1.40
--- src/bin/csh/set.c:1.39	Wed Sep 14 16:15:51 2022
+++ src/bin/csh/set.c	Thu Sep 15 11:35:06 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: set.c,v 1.39 2022/09/14 16:15:51 christos Exp $ */
+/* $NetBSD: set.c,v 1.40 2022/09/15 11:35:06 martin Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)set.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: set.c,v 1.39 2022/09/14 16:15:51 christos Exp $");
+__RCSID("$NetBSD: set.c,v 1.40 2022/09/15 11:35:06 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -59,9 +59,9 @@ static void unsetv1(struct varent *);
 static void exportpath(Char **);
 static void balance(struct varent *, int, int);
 
+#ifdef EDIT
 static int wantediting;
 
-#ifdef EDIT
 static const char *
 alias_text(void *dummy __unused, const char *name)
 {
@@ -555,6 +555,7 @@ unset(Char **v, struct command *t)
 #endif
 }
 
+#ifdef EDIT
 extern int insource;
 void
 updateediting(void)
@@ -590,6 +591,7 @@ updateediting(void)
     }
     editing = wantediting;
 }
+#endif
 
 void
 unset1(Char *v[], struct varent *head)

Reply via email to