From 9c24fb7c12d3b11fa6f5b9ac57641e4ca449857a Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 27 Jul 2004 21:01:44 +0000 Subject: [PATCH] Patch out tcsh's use of 'exp2', which is math-reserved in gcc-3.4. --- bin/csh/Makefile | 4 +++- bin/csh/sh.exp.c.patch | 44 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 bin/csh/sh.exp.c.patch diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 27e04f5ef6..6ffc701ebf 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/bin/csh/Makefile,v 1.11.2.8 2002/02/19 00:36:40 mp Exp $ -# $DragonFly: src/bin/csh/Makefile,v 1.3 2004/03/22 20:57:23 dillon Exp $ +# $DragonFly: src/bin/csh/Makefile,v 1.4 2004/07/27 21:01:44 dillon Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # # C Shell with process control; VM/UNIX VAX Makefile @@ -8,6 +8,7 @@ # To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. TCSHDIR= ${.CURDIR}/../../contrib/tcsh +CONTRIBDIR=${TCSHDIR} .PATH: ${TCSHDIR} PROG= csh @@ -29,6 +30,7 @@ SRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ tc.who.c tc.h GENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c SRCS+= ${GENHDRS} +SRCS+= sh.exp.c.patch MLINKS= csh.1 tcsh.1 # MLINKS for Shell built in commands for which there are no userland diff --git a/bin/csh/sh.exp.c.patch b/bin/csh/sh.exp.c.patch new file mode 100644 index 0000000000..a6a1d6d0c6 --- /dev/null +++ b/bin/csh/sh.exp.c.patch @@ -0,0 +1,44 @@ +$DragonFly: src/bin/csh/Attic/sh.exp.c.patch,v 1.1 2004/07/27 21:01:44 dillon Exp $ +Index: sh.exp.c +=================================================================== +RCS file: /cvs/src/contrib/tcsh/sh.exp.c,v +retrieving revision 1.1 +diff -u -r1.1 sh.exp.c +--- sh.exp.c 17 Jun 2003 02:47:06 -0000 1.1 ++++ sh.exp.c 27 Jul 2004 20:25:12 -0000 +@@ -59,7 +59,7 @@ + + static int sh_access __P((Char *, int)); + static int exp1 __P((Char ***, bool)); +-static int exp2 __P((Char ***, bool)); ++static int exp2x __P((Char ***, bool)); + static int exp2a __P((Char ***, bool)); + static int exp2b __P((Char ***, bool)); + static int exp2c __P((Char ***, bool)); +@@ -233,7 +233,7 @@ + register Char ***vp; + bool ignore; + { +- register int p1 = exp2(vp, ignore); ++ register int p1 = exp2x(vp, ignore); + + #ifdef EDEBUG + etraci("exp1 p1", p1, vp); +@@ -252,7 +252,7 @@ + } + + static int +-exp2(vp, ignore) ++exp2x(vp, ignore) + register Char ***vp; + bool ignore; + { +@@ -265,7 +265,7 @@ + register int p2; + + (*vp)++; +- p2 = exp2(vp, ignore); ++ p2 = exp2x(vp, ignore); + #ifdef EDEBUG + etraci("exp3 p2", p2, vp); + #endif /* EDEBUG */ -- 2.41.0