Subject: port-sparc/1196: [dM] needs
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 07/05/1995 13:05:06
>Number:         1196
>Category:       port-sparc
>Synopsis:       [dM] <machine/types.h> needs <sys/cdefs.h>
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul  5 13:05:03 1995
>Originator:     der Mouse
>Organization:
	Dis-
>Release:        -current source tree as of July 4th sup
>Environment:
	NetBSD/sparc on an IPC
>Description:
	<machine/types.h> uses __signed but doesn't include
	<sys/cdefs.h>, so you get syntax errors.

	This actually applies to the alpha, pc532, pmax, and vax ports
	as well as the sparc, according to a couple of quick greps in
	/usr/src/sys/arch/*/include.  (But not the i386, which is the
	only port whose <machine/types.h> uses __signed but also
	includes <sys/cdefs.h>, according to those same greps.)
>How-To-Repeat:
	Try to build the lint libraries for the new lint, or, I
	suspect,
	% echo '#include <sys/types.h>' > foo.c
	% cc -c foo.c
>Fix:
	--- /sources/supped/netbsd/src/./sys/arch/sparc/include/types.h	Mon Jun 26 03:09:30 1995
	+++ /usr/src/./sys/arch/sparc/include/types.h	Wed Jul  5 12:36:35 1995
	@@ -47,6 +47,8 @@
	 #ifndef	_MACHTYPES_H_
	 #define	_MACHTYPES_H_
	 
	+#include <sys/cdefs.h>
	+
	 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
	 typedef struct _physadr {
	 	short r[1];

	Something similar will probably work equally well for the other
	ports, though I haven't looked.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu
>Audit-Trail:
>Unformatted: