Date: Wed, 19 Apr 2000 21:00:03 -0700 (PDT) From: Anatoly Vorobey <mellon@pobox.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/18104: missing include file in sh(1) Message-ID: <200004200400.VAA88954@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/18104; it has been noted by GNATS. From: Anatoly Vorobey <mellon@pobox.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: Subject: Re: bin/18104: missing include file in sh(1) Date: Thu, 20 Apr 2000 06:55:33 +0000 > When sh(1) is compiled with DEBUG defined, as it usually isn't, > show.c won't compile as it uses errno but lacks the include. > The offending function, opentrace(), is inside a #ifdef DEBUG block. I've goofed here, in fact; sh(1) still won't build with DEBUG since -- get that! -- the function trace() defined in show.c conflicts with trace() in lib_trace.o of libtermcap.a of ncurses fame. I've renamed the sh function, and retested everything. When build with DEBUG_FLAGS=-DDEBUG=2 , it'll create a file 'trace' in the current directory and will write tons of good info there. Would someone please review/commit? Index: shell.h =================================================================== RCS file: /freebsd/cvs/src/bin/sh/shell.h,v retrieving revision 1.11 diff -u -r1.11 shell.h --- shell.h 1999/08/27 23:15:24 1.11 +++ shell.h 2000/04/20 06:44:37 @@ -77,7 +77,7 @@ #ifdef DEBUG -#define TRACE(param) trace param +#define TRACE(param) sh_trace param #else #define TRACE(param) #endif Index: show.c =================================================================== RCS file: /freebsd/cvs/src/bin/sh/show.c,v retrieving revision 1.11 diff -u -r1.11 show.c --- show.c 1999/11/29 19:11:01 1.11 +++ show.c 2000/04/20 06:51:56 @@ -48,6 +48,7 @@ #else #include <varargs.h> #endif +#include <errno.h> #include "shell.h" #include "parser.h" @@ -301,9 +302,9 @@ void #ifdef __STDC__ -trace(const char *fmt, ...) +sh_trace(const char *fmt, ...) #else -trace(va_alist) +sh_trace(va_alist) va_dcl #endif { Index: show.h =================================================================== RCS file: /freebsd/cvs/src/bin/sh/show.h,v retrieving revision 1.7 diff -u -r1.7 show.h --- show.h 1999/08/27 23:15:25 1.7 +++ show.h 2000/04/20 06:44:53 @@ -36,7 +36,7 @@ void showtree __P((union node *)); #ifdef DEBUG -void trace __P((const char *, ...)); +void sh_trace __P((const char *, ...)); void trargs __P((char **)); void trputc __P((int)); void trputs __P((char *)); -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004200400.VAA88954>