Subject: kern/1121: satosin() macro multiply defined
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: None <barrett@ee.und.ac.za>
List: netbsd-bugs
Date: 06/07/1995 05:50:03
>Number:         1121
>Category:       kern
>Synopsis:       #define satosin in netiso/tp_param.h disagrees with netinet/in.h
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun  7 05:50:01 1995
>Originator:     Alan Barrett
>Organization:
Not much
>Release:        NetBSD-current 1995-06-06
>Environment:
System: NetBSD daisy.ee.und.ac.za 1.0A NetBSD 1.0A (DAISY) #0: Sun May 21 20:13:39 GMT+0200 1995 barrett@daisy.ee.und.ac.za:/usr/src/sys/arch/i386/compile/DAISY i386


>Description:
	Several kernel source files fail to compile, with errors about
	satosin being redefined.  This is because sys/netiso/tp_emit.h
	and sys/netinet/in.h contain different definitions of the
	satosin macro.  The two definitions are effectively identical,
	except for the names of the parameters, but ANSI/ISO 9899:1990
	section 6.8.3 says that even the names of the parameters have to
	be identical if a macro is redefined.
>How-To-Repeat:
	configure kernel with both IP and ISO options.
	try to build kernel.
	see the error messages.  For example:

cc [lots of options] ../../../../netiso/tp_emit.c
In file included from ../../../../netiso/tp_emit.c:92:
../../../../netiso/tp_param.h:274: warning: `satosin' redefined
../../../../netinet/in.h:264: warning: this is the location of the previous
definition
*** Error code 1

>Fix:
	Either
		make the two definitions of satosin identical
	or
                remove the definition of satosin from netiso/tp_param.h,
                and let anything that needs satosin get it from
                netinet/in.h instead of from netiso/tp_param.h.
>Audit-Trail:
>Unformatted: