[gnu.gcc] bug in dbm.h and gcc

duc@cos.com (Duc Kim Nguyen) (10/25/89)

While building X11 with gcc (1.36) and includes fixed, in particular the
file oscolor.c under os/4.2bsd, the cpp could not resolve `fetch' macro
fixed in dbm.h by fixincludes.  Here is some details:

Hardware: sun 3/60,
Software: SunOS 4.0.3, gcc(1.36)
Details:
/*** file tonto.c ***/
#include <dbm.h>
main()
{
        datum *f;

        f= fetch(f);
}
$ gcc -traditional -v -E -Wall tonto.c -o tonto.E
gcc version 1.36
 /usr/local/lib/gnu/Gcc/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -traditional -Wall -D__HAVE_68881__ -Dmc68020 tonto.c -o tonto.E
GNU CPP version 1.36
tonto.c:6: macro or #include recursion too deep
/*** file tonto.E ***/
# 1 "tonto.c"
# 1 "/usr/local/lib/gnu/Gcc/gcc-include/dbm.h" 1
long	bitno;
long	maxbno;
long	blkno;
long	hmask;

char	pagbuf[1024];
char	dirbuf[4096];

int	dirf;
int	pagf;
int	dbrdonly;

typedef	struct
{
	char	*dptr;
	int	dsize;
} datum;

datum	*fetch();
datum	*firstkey();
datum	*nextkey();
datum   *makdatum();
datum   *firsthash();

long	calchash();
long	hashinc();

# 1 "tonto.c" 2

main()
{
	datum *f;

	f= *******************************************************************************************************************************************************************************************************(f);
}