NetBSD Problem Report #1132

From gnats  Mon Jun 19 22:45:38 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id WAA18817 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 19 Jun 1995 22:45:31 -0400
Message-Id: <199506150624.SAA19609@grass.pc.comp.vuw.ac.nz>
Date: Thu, 15 Jun 1995 18:24:25 +1200
From: Duncan McEwan <duncan@Comp.VUW.AC.NZ>
Reply-To: duncan@Comp.VUW.AC.NZ
To: gnats-bugs@NetBSD.ORG
Subject: mkdep in usr.sbin/netstat fails
X-Send-Pr-Version: 3.2

>Number:         1132
>Category:       misc
>Synopsis:       mkdep in usr.sbin/netstat fails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 20 02:50:13 +0000 1995
>Closed-Date:    Tue Jun 20 05:11:57 +0000 1995
>Last-Modified:  Wed Aug 07 21:30:40 +0000 2002
>Originator:     Duncan McEwan
>Release:        1.0
>Organization:
	Computer Scence Department,
	Victoria University of Wellington, New Zealand.
>Environment:

System: NetBSD grass.pc.comp.vuw.ac.nz 1.0A NetBSD 1.0A (ORSINIS) #0: Wed Jun 14 16:46:45 NZST 1995 duncan@grass.pc.comp.vuw.ac.nz:/scratch/src/sys/arch/i386/compile/ORSINIS i386


>Description:

In /usr/src/usr.bin/netstat from a recent (Jun 9th ish) -current:

make depend
rm -f .depend
files=" ";  if [ "$files" != " " ]; then  mkdep -a     $files;  fi
files="if.c inet.c iso.c main.c mbuf.c mroute.c ns.c route.c /usr/src/usr.bin/netstat/../../sys/netiso/tp_astring.c unix.c";  if [ "$files" != "" ]; then  mkdep -a    $files;  fi
In file included from if.c:50:
/usr/include/netiso/iso_var.h:86: macro or `#include' recursion too deep
mkdep: compile failed.
*** Error code 1

Stop.

The problem seems to be mutually recursive #defines of ifra_dstaddr and
ifra_broadaddr in netinet/in_var.h and netns/ns_if.h.  This then causes mkdep
to fail when parsing line 86 of netiso/iso_var.h 

The following shows the relevent lines:

cd /usr/include
grep -n ifra_dstaddr netinet/in_var.h netns/ns_if.h netiso/iso_var.h
netinet/in_var.h:65:    struct  sockaddr_in ifra_dstaddr;
netinet/in_var.h:66:#define     ifra_broadaddr  ifra_dstaddr
netns/ns_if.h:60:#define ifra_dstaddr ifra_broadaddr
netiso/iso_var.h:86:    struct  sockaddr_iso ifra_dstaddr;

Note: the problem only occurs when depending and not when compiling as a result
of the '-traditional' flag that /usr/bin/cpp passes to the pre-processor.  The
compiler invokves the preprocessor without '-traditional' and doesn't get
this error.

>How-To-Repeat:
	cd /usr/src/usr.bin/netstat
	make depend

>Fix:
	o remove the mutual recursion?

	o change /usr/bin/cpp so that is invokes /usr/libexec/cpp without
          -traditional (note: this was the temporary hack I used to get my
          compile going again, and although it solves this problem, it causes
          another later.  When depending font.cc in gnu/usr.bin/groff/libgroff.
	  I got the error 

		font.cc:465: unterminated character constant

	  which didn't happen when cpp was invoked *with* -traditional :-(

	o ???
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Tue Jun 20 01:11:57 EDT 1995 
State-Changed-Why:  
i could not repeat the problem described in this bug, with the latest 
sources and binaries. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.