Rename the trace() function (that is build only in the -DDEBUG=2

case), so that it doesn't clash with the ncurses function of the same
name when linking statically with -ltermcap.

The linker only complains when -static is used, and it is not clear
whether this is a bug.

PR:		bin/18104
Submitted by:	Anatoly Vorobey <mellon@pobox.com>
This commit is contained in:
Martin Cracauer 2000-04-20 11:39:11 +00:00
parent e988388eff
commit d62ec71c31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59438
3 changed files with 5 additions and 4 deletions

View File

@ -77,7 +77,7 @@ extern char nullstr[1]; /* null string */
#ifdef DEBUG
#define TRACE(param) trace param
#define TRACE(param) sh_trace param
#else
#define TRACE(param)
#endif

View File

@ -51,6 +51,7 @@ static const char rcsid[] =
#if DEBUG == 2
#include <errno.h>
#endif
#include <errno.h>
#include "shell.h"
#include "parser.h"
@ -304,9 +305,9 @@ trputc(c)
void
#ifdef __STDC__
trace(const char *fmt, ...)
sh_trace(const char *fmt, ...)
#else
trace(va_alist)
sh_trace(va_alist)
va_dcl
#endif
{

View File

@ -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 *));