summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-08-25 12:38:07 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-08-25 12:38:07 +0000
commit71ec949299cd46e2df5d811187cac54d7dde2e7b (patch)
tree045591cd74f25607deb7ac1d02fd94b5ccf99c40
parent03abe9b1bcd7af738406e8ca96bd745609d006d5 (diff)
Fix problems with compiling without KSH defined, add NOEDIT override.
-rw-r--r--bin/ksh/c_ksh.c4
-rw-r--r--bin/ksh/conf-end.h9
-rw-r--r--bin/ksh/exec.c6
-rw-r--r--bin/ksh/jobs.c6
-rw-r--r--bin/ksh/tests/th2
-rw-r--r--bin/pdksh/c_ksh.c4
-rw-r--r--bin/pdksh/conf-end.h9
-rw-r--r--bin/pdksh/exec.c6
-rw-r--r--bin/pdksh/jobs.c6
-rw-r--r--bin/pdksh/tests/th2
10 files changed, 38 insertions, 16 deletions
diff --git a/bin/ksh/c_ksh.c b/bin/ksh/c_ksh.c
index ea27c7ddcbe..30832ecb4d3 100644
--- a/bin/ksh/c_ksh.c
+++ b/bin/ksh/c_ksh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: c_ksh.c,v 1.2 1996/08/19 20:08:45 downsj Exp $ */
+/* $OpenBSD: c_ksh.c,v 1.3 1996/08/25 12:37:55 downsj Exp $ */
/*
* built-in Korn commands: c_*
@@ -378,8 +378,8 @@ c_print(wp)
Xfree(xs, xp);
} else {
int n, len = Xlength(xs, xp);
-#ifdef KSH
int UNINITIALIZED(opipe);
+#ifdef KSH
/* Ensure we aren't killed by a SIGPIPE while writing to
* a coprocess. at&t ksh doesn't seem to do this (seems
diff --git a/bin/ksh/conf-end.h b/bin/ksh/conf-end.h
index f7d076d4598..8b65cb7d1df 100644
--- a/bin/ksh/conf-end.h
+++ b/bin/ksh/conf-end.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf-end.h,v 1.1 1996/08/14 06:19:12 downsj Exp $ */
+/* $OpenBSD: conf-end.h,v 1.2 1996/08/25 12:37:58 downsj Exp $ */
/*
* End of configuration stuff for PD ksh.
@@ -10,6 +10,13 @@
# undef EDIT
#endif
+/* Super small configuration-- no editing. */
+#if defined(EDIT) && defined(NOEDIT)
+# undef EDIT
+# undef EMACS
+# undef VI
+#endif
+
/* Editing implies history */
#if defined(EDIT) && !defined(HISTORY)
# define HISTORY
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c
index ce4ca7668c5..32e2024206a 100644
--- a/bin/ksh/exec.c
+++ b/bin/ksh/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.2 1996/08/19 20:08:50 downsj Exp $ */
+/* $OpenBSD: exec.c,v 1.3 1996/08/25 12:38:00 downsj Exp $ */
/*
* execute command tree
@@ -1459,7 +1459,7 @@ herein(hname, sub)
return fd;
}
-#ifdef KSH
+#if defined(KSH) || defined(EDIT)
/*
* ksh special - the select command processing section
* print the args in column form - assuming that we can
@@ -1562,7 +1562,7 @@ pr_menu(ap)
return n;
}
-#endif /* KSH */
+#endif /* KSH || EDIT */
#ifdef KSH
/*
diff --git a/bin/ksh/jobs.c b/bin/ksh/jobs.c
index e1c11fcd04a..ec68bff518b 100644
--- a/bin/ksh/jobs.c
+++ b/bin/ksh/jobs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: jobs.c,v 1.2 1996/08/19 20:08:52 downsj Exp $ */
+/* $OpenBSD: jobs.c,v 1.3 1996/08/25 12:38:03 downsj Exp $ */
/*
* Process and job control
@@ -140,7 +140,9 @@ struct job {
clock_t usrtime; /* user time used by job */
Proc *proc_list; /* process list */
Proc *last_proc; /* last process in list */
+#ifdef KSH
Coproc_id coproc_id; /* 0 or id of coprocess output pipe */
+#endif /* KSH */
#ifdef TTY_PGRP
TTY_state ttystate; /* saved tty state for stopped jobs */
#endif /* TTY_PGRP */
@@ -484,7 +486,9 @@ exchild(t, flags, close_fd)
j->ppid = procpid;
j->age = ++njobs;
j->proc_list = p;
+#ifdef KSH
j->coproc_id = 0;
+#endif /* KSH */
last_job = j;
last_proc = p;
put_job(j, PJ_PAST_STOPPED);
diff --git a/bin/ksh/tests/th b/bin/ksh/tests/th
index 340cbe2d5dc..ebe54718ece 100644
--- a/bin/ksh/tests/th
+++ b/bin/ksh/tests/th
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
#
# Test harness for pdksh tests.
diff --git a/bin/pdksh/c_ksh.c b/bin/pdksh/c_ksh.c
index ea27c7ddcbe..30832ecb4d3 100644
--- a/bin/pdksh/c_ksh.c
+++ b/bin/pdksh/c_ksh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: c_ksh.c,v 1.2 1996/08/19 20:08:45 downsj Exp $ */
+/* $OpenBSD: c_ksh.c,v 1.3 1996/08/25 12:37:55 downsj Exp $ */
/*
* built-in Korn commands: c_*
@@ -378,8 +378,8 @@ c_print(wp)
Xfree(xs, xp);
} else {
int n, len = Xlength(xs, xp);
-#ifdef KSH
int UNINITIALIZED(opipe);
+#ifdef KSH
/* Ensure we aren't killed by a SIGPIPE while writing to
* a coprocess. at&t ksh doesn't seem to do this (seems
diff --git a/bin/pdksh/conf-end.h b/bin/pdksh/conf-end.h
index f7d076d4598..8b65cb7d1df 100644
--- a/bin/pdksh/conf-end.h
+++ b/bin/pdksh/conf-end.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf-end.h,v 1.1 1996/08/14 06:19:12 downsj Exp $ */
+/* $OpenBSD: conf-end.h,v 1.2 1996/08/25 12:37:58 downsj Exp $ */
/*
* End of configuration stuff for PD ksh.
@@ -10,6 +10,13 @@
# undef EDIT
#endif
+/* Super small configuration-- no editing. */
+#if defined(EDIT) && defined(NOEDIT)
+# undef EDIT
+# undef EMACS
+# undef VI
+#endif
+
/* Editing implies history */
#if defined(EDIT) && !defined(HISTORY)
# define HISTORY
diff --git a/bin/pdksh/exec.c b/bin/pdksh/exec.c
index ce4ca7668c5..32e2024206a 100644
--- a/bin/pdksh/exec.c
+++ b/bin/pdksh/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.2 1996/08/19 20:08:50 downsj Exp $ */
+/* $OpenBSD: exec.c,v 1.3 1996/08/25 12:38:00 downsj Exp $ */
/*
* execute command tree
@@ -1459,7 +1459,7 @@ herein(hname, sub)
return fd;
}
-#ifdef KSH
+#if defined(KSH) || defined(EDIT)
/*
* ksh special - the select command processing section
* print the args in column form - assuming that we can
@@ -1562,7 +1562,7 @@ pr_menu(ap)
return n;
}
-#endif /* KSH */
+#endif /* KSH || EDIT */
#ifdef KSH
/*
diff --git a/bin/pdksh/jobs.c b/bin/pdksh/jobs.c
index e1c11fcd04a..ec68bff518b 100644
--- a/bin/pdksh/jobs.c
+++ b/bin/pdksh/jobs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: jobs.c,v 1.2 1996/08/19 20:08:52 downsj Exp $ */
+/* $OpenBSD: jobs.c,v 1.3 1996/08/25 12:38:03 downsj Exp $ */
/*
* Process and job control
@@ -140,7 +140,9 @@ struct job {
clock_t usrtime; /* user time used by job */
Proc *proc_list; /* process list */
Proc *last_proc; /* last process in list */
+#ifdef KSH
Coproc_id coproc_id; /* 0 or id of coprocess output pipe */
+#endif /* KSH */
#ifdef TTY_PGRP
TTY_state ttystate; /* saved tty state for stopped jobs */
#endif /* TTY_PGRP */
@@ -484,7 +486,9 @@ exchild(t, flags, close_fd)
j->ppid = procpid;
j->age = ++njobs;
j->proc_list = p;
+#ifdef KSH
j->coproc_id = 0;
+#endif /* KSH */
last_job = j;
last_proc = p;
put_job(j, PJ_PAST_STOPPED);
diff --git a/bin/pdksh/tests/th b/bin/pdksh/tests/th
index 340cbe2d5dc..ebe54718ece 100644
--- a/bin/pdksh/tests/th
+++ b/bin/pdksh/tests/th
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
#
# Test harness for pdksh tests.