summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-06-17 03:48:21 +0000
committerderaadt <deraadt@openbsd.org>2015-06-17 03:48:21 +0000
commit2e7c3a372dc6de4032f8dd91e409a9a52d1290c1 (patch)
treeb3298e28c8553adbed972178d25f110a6720039a
parentSet FUNC symbol sizes of auto-generated and hand-written syscall wrappers. (diff)
downloadwireguard-openbsd-2e7c3a372dc6de4032f8dd91e409a9a52d1290c1.tar.xz
wireguard-openbsd-2e7c3a372dc6de4032f8dd91e409a9a52d1290c1.zip
remove -DFILEC; code does not compile for the -UFILEC case, and anyways,
who wants csh without FILEC?? from Peter Brottveit Bock, but redone using unifdef
-rw-r--r--bin/csh/Makefile4
-rw-r--r--bin/csh/const.c4
-rw-r--r--bin/csh/csh.h4
-rw-r--r--bin/csh/extern.h6
-rw-r--r--bin/csh/file.c4
-rw-r--r--bin/csh/glob.c4
-rw-r--r--bin/csh/lex.c12
-rw-r--r--bin/csh/set.c6
8 files changed, 9 insertions, 35 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index 69aae20ac8c..c4c132d6de1 100644
--- a/bin/csh/Makefile
+++ b/bin/csh/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2013/07/13 16:34:43 miod Exp $
+# $OpenBSD: Makefile,v 1.12 2015/06/17 03:48:21 deraadt Exp $
#
# C Shell with process control; VM/UNIX VAX Makefile
# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
@@ -6,7 +6,7 @@
# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
PROG= csh
-DFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS
+DFLAGS=-DBUILTIN -DNLS -DSHORT_STRINGS
#CFLAGS+=-g
#CFLAGS+=-Wall
CFLAGS+=-I${.CURDIR} -I. ${DFLAGS}
diff --git a/bin/csh/const.c b/bin/csh/const.c
index f3a7b93f260..0038d1cb641 100644
--- a/bin/csh/const.c
+++ b/bin/csh/const.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: const.c,v 1.6 2009/10/27 23:59:21 deraadt Exp $ */
+/* $OpenBSD: const.c,v 1.7 2015/06/17 03:48:21 deraadt Exp $ */
/* $NetBSD: const.c,v 1.6 1995/03/21 09:02:31 cgd Exp $ */
/*-
@@ -79,9 +79,7 @@ Char STRequal[] = { '=', '\0' };
Char STRfakecom[] = { '{', ' ', '.', '.', '.', ' ', '}', '\0' };
Char STRfakecom1[] = { '`', ' ', '.', '.', '.', ' ', '`', '\0' };
Char STRfignore[] = { 'f', 'i', 'g', 'n', 'o', 'r', 'e', '\0' };
-#ifdef FILEC
Char STRfilec[] = { 'f', 'i', 'l', 'e', 'c', '\0' };
-#endif /* FILEC */
Char STRhistchars[] = { 'h', 'i', 's', 't', 'c', 'h', 'a', 'r', 's', '\0' };
Char STRtildothist[] = { '~', '/', '.', 'h', 'i', 's', 't', 'o', 'r',
'y', '\0' };
diff --git a/bin/csh/csh.h b/bin/csh/csh.h
index 4c3c10b2c5b..9dc7faef5d4 100644
--- a/bin/csh/csh.h
+++ b/bin/csh/csh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.h,v 1.21 2015/02/08 06:01:25 tedu Exp $ */
+/* $OpenBSD: csh.h,v 1.22 2015/06/17 03:48:21 deraadt Exp $ */
/* $NetBSD: csh.h,v 1.9 1995/03/21 09:02:40 cgd Exp $ */
/*-
@@ -118,9 +118,7 @@ bool setintr; /* Set interrupts on/off -> Wait intr... */
bool timflg; /* Time the next waited for command */
bool havhash; /* path hashing is available */
-#ifdef FILEC
bool filec; /* doing filename expansion */
-#endif
/*
* Global i/o info
diff --git a/bin/csh/extern.h b/bin/csh/extern.h
index 6c7e8a119b2..320aa9f88f9 100644
--- a/bin/csh/extern.h
+++ b/bin/csh/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.20 2015/02/08 06:01:25 tedu Exp $ */
+/* $OpenBSD: extern.h,v 1.21 2015/06/17 03:48:21 deraadt Exp $ */
/* $NetBSD: extern.h,v 1.8 1996/10/31 23:50:54 christos Exp $ */
/*-
@@ -103,9 +103,7 @@ int exp0(Char ***, bool);
/*
* file.c
*/
-#ifdef FILEC
int tenex(Char *, int);
-#endif
/*
* func.c
@@ -159,9 +157,7 @@ Char **globall(Char **);
void rscan(Char **, void (*)(int));
void tglob(Char **);
void trim(Char **);
-#ifdef FILEC
int sortscmp(const void *, const void *);
-#endif /* FILEC */
/*
* hist.c
diff --git a/bin/csh/file.c b/bin/csh/file.c
index f9e3d2015eb..e297d589db6 100644
--- a/bin/csh/file.c
+++ b/bin/csh/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.20 2015/06/03 01:49:35 deraadt Exp $ */
+/* $OpenBSD: file.c,v 1.21 2015/06/17 03:48:21 deraadt Exp $ */
/* $NetBSD: file.c,v 1.11 1996/11/08 19:34:37 christos Exp $ */
/*-
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#ifdef FILEC
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -645,4 +644,3 @@ ignored(Char *entry)
return (TRUE);
return (FALSE);
}
-#endif /* FILEC */
diff --git a/bin/csh/glob.c b/bin/csh/glob.c
index cebc598c8ab..426d8c1773f 100644
--- a/bin/csh/glob.c
+++ b/bin/csh/glob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glob.c,v 1.17 2015/02/08 06:01:25 tedu Exp $ */
+/* $OpenBSD: glob.c,v 1.18 2015/06/17 03:48:21 deraadt Exp $ */
/* $NetBSD: glob.c,v 1.10 1995/03/21 09:03:01 cgd Exp $ */
/*-
@@ -875,7 +875,6 @@ Gcat(Char *s1, Char *s2)
continue;
}
-#ifdef FILEC
int
sortscmp(const void *a, const void *b)
{
@@ -900,4 +899,3 @@ sortscmp(const void *a, const void *b)
return ((int) Strcmp(*(Char **)a, *(Char **)b));
#endif
}
-#endif /* FILEC */
diff --git a/bin/csh/lex.c b/bin/csh/lex.c
index 7376579055c..d105dbcaa12 100644
--- a/bin/csh/lex.c
+++ b/bin/csh/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.16 2015/02/08 06:09:50 tedu Exp $ */
+/* $OpenBSD: lex.c,v 1.17 2015/06/17 03:48:21 deraadt Exp $ */
/* $NetBSD: lex.c,v 1.9 1995/09/27 00:38:46 jtc Exp $ */
/*-
@@ -1395,10 +1395,8 @@ bgetc(void)
{
int buf, off, c;
-#ifdef FILEC
int numleft = 0, roomleft;
Char ttyline[BUFSIZ];
-#endif
char tbuf[BUFSIZ + 1];
if (cantell) {
@@ -1445,7 +1443,6 @@ again:
off = (int) feobp % BUFSIZ;
roomleft = BUFSIZ - off;
-#ifdef FILEC
roomleft = BUFSIZ - off;
for (;;) {
if (filec && intty) {
@@ -1461,7 +1458,6 @@ again:
numleft = 0;
}
else {
-#endif
c = read(SHIN, tbuf, roomleft);
if (c > 0) {
int i;
@@ -1470,9 +1466,7 @@ again:
for (i = 0; i < c; i++)
ptr[i] = (unsigned char) tbuf[i];
}
-#ifdef FILEC
}
-#endif
if (c >= 0)
break;
if (errno == EWOULDBLOCK) {
@@ -1486,12 +1480,8 @@ again:
if (c <= 0)
return (-1);
feobp += c;
-#ifndef FILEC
- goto again;
-#else
if (filec && !intty)
goto again;
-#endif
}
c = fbuf[buf][(int) fseekp % BUFSIZ];
fseekp++;
diff --git a/bin/csh/set.c b/bin/csh/set.c
index 0870f39ff4b..28d9ef8da10 100644
--- a/bin/csh/set.c
+++ b/bin/csh/set.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: set.c,v 1.14 2015/02/08 05:47:28 tedu Exp $ */
+/* $OpenBSD: set.c,v 1.15 2015/06/17 03:48:21 deraadt Exp $ */
/* $NetBSD: set.c,v 1.8 1995/03/21 18:35:52 mycroft Exp $ */
/*-
@@ -162,10 +162,8 @@ doset(Char **v, struct command *t)
dtilde();
xfree(cp);
}
-#ifdef FILEC
else if (eq(vp, STRfilec))
filec = 1;
-#endif
} while ((p = *v++) != NULL);
}
@@ -496,10 +494,8 @@ void
unset(Char **v, struct command *t)
{
unset1(v, &shvhed);
-#ifdef FILEC
if (adrof(STRfilec) == 0)
filec = 0;
-#endif
if (adrof(STRhistchars) == 0) {
HIST = '!';
HISTSUB = '^';