diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-12-18 21:04:53 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-12-18 21:04:53 +0000 |
commit | b228348292c4361c750ae05a5597a15e71c5c5da (patch) | |
tree | e7527881cd44cefdbbcd11ec8332b581e2e4f8ec /bin/ksh/c_sh.c | |
parent | 55e483bc0655baec919e26c2dfcdda314a467a32 (diff) |
Get rid of #ifdef KSH since we don't care about building a V7 style sh and
the #ifdef KSH code is required to make a POSIX sh. From Matthias Kilian
Diffstat (limited to 'bin/ksh/c_sh.c')
-rw-r--r-- | bin/ksh/c_sh.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/bin/ksh/c_sh.c b/bin/ksh/c_sh.c index a2c5fb14d6d..7bd9d0adfb4 100644 --- a/bin/ksh/c_sh.c +++ b/bin/ksh/c_sh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_sh.c,v 1.18 2004/12/18 20:55:52 millert Exp $ */ +/* $OpenBSD: c_sh.c,v 1.19 2004/12/18 21:04:52 millert Exp $ */ /* * built-in Bourne commands @@ -252,14 +252,12 @@ c_read(wp) while ((optc = ksh_getopt(wp, &builtin_opt, "prsu,")) != EOF) switch (optc) { -#ifdef KSH case 'p': if ((fd = coproc_getfd(R_OK, &emsg)) < 0) { bi_errorf("-p: %s", emsg); return 1; } break; -#endif /* KSH */ case 'r': expand = 0; break; @@ -299,7 +297,6 @@ c_read(wp) } } -#ifdef KSH /* If we are reading from the co-process for the first time, * make sure the other side of the pipe is closed first. This allows * the detection of eof. @@ -310,7 +307,6 @@ c_read(wp) * If this call is removed, remove the eof check below, too. * coproc_readw_close(fd); */ -#endif /* KSH */ if (history) Xinit(xs, xp, 128, ATEMP); @@ -403,14 +399,12 @@ c_read(wp) histsave(source->line, Xstring(xs, xp), 1); Xfree(xs, xp); } -#ifdef KSH /* if this is the co-process fd, close the file descriptor * (can get eof if and only if all processes are have died, ie, * coproc.njobs is 0 and the pipe is closed). */ if (c == EOF && !ecode) coproc_read_close(fd); -#endif /* KSH */ return ecode ? ecode : c == EOF; } @@ -840,10 +834,8 @@ c_exec(wp) * happens is unspecified and the bourne shell * keeps them open). */ -#ifdef KSH if (!Flag(FSH) && i > 2 && e->savefd[i]) fd_clexec(i); -#endif /* KSH */ } e->savefd = NULL; } |