From jau@jau.tmt.tele.fi  Wed Dec 25 14:05:43 1996
Received: from siili.inet.fi (siili.inet.fi [192.89.123.191])
          by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id OAA23907
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Dec 1996 14:05:43 -0800 (PST)
Received: from jau.tmt.tele.fi (jau.tmt.tele.fi [194.251.252.34]) by siili.inet.fi (8.8.3/8.8.0) with ESMTP id AAA01351 for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Dec 1996 00:03:52 +0200
Received: (from jau@localhost) by jau.tmt.tele.fi (8.8.3/8.6.12+CSC-2.1) id AAA14384; Thu, 26 Dec 1996 00:07:08 +0200 (EET)
Message-Id: <199612252207.AAA14384@jau.tmt.tele.fi>
Date: Thu, 26 Dec 1996 00:07:08 +0200 (EET)
From: jau@jau.tmt.tele.fi
Reply-To: jau@jau.tmt.tele.fi
To: FreeBSD-gnats-submit@freebsd.org
Subject: questionable parameter types in /usr/include/signal.h
X-Send-Pr-Version: 3.2

>Number:         2279
>Category:       kern
>Synopsis:       questionable parameter types in /usr/include/signal.h
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 25 14:10:01 PST 1996
>Closed-Date:    Wed Feb 26 08:58:58 PST 1997
>Last-Modified:  Wed Feb 26 09:03:56 PST 1997
>Originator:     Jukka A. Ukkonen
>Release:        FreeBSD 2.2-960501-SNAP i386
>Organization:
Telecom Finland / Telemedia
>Environment:

	

>Description:

	See the patch below in the Fix section.

>How-To-Repeat:

	

>Fix:
	
--- /usr/include/signal.h.orig	Thu Dec 26 00:01:31 1996
+++ /usr/include/signal.h	Wed Dec 25 23:55:02 1996
@@ -36,6 +36,7 @@
 #ifndef _SIGNAL_H_
 #define	_SIGNAL_H_
 
+#include <sys/types.h>
 #include <sys/cdefs.h>
 #include <sys/signal.h>
 #include <machine/ansi.h>
@@ -48,7 +49,7 @@
 __BEGIN_DECLS
 int	raise __P((int));
 #ifndef	_ANSI_SOURCE
-int	kill __P(_BSD_PID_T_, int));
+int	kill __P((pid_t, int));
 int	sigaction __P((int, const struct sigaction *, struct sigaction *));
 int	sigaddset __P((sigset_t *, int));
 int	sigdelset __P((sigset_t *, int));
@@ -59,7 +60,7 @@
 int	sigprocmask __P((int, const sigset_t *, sigset_t *));
 int	sigsuspend __P((const sigset_t *));
 #ifndef _POSIX_SOURCE
-int	killpg __P((_BSD_PID_T_, int));
+int	killpg __P((pid_t, int));
 int	sigblock __P((int));
 int	siginterrupt __P((int, int));
 int	sigpause __P((int));
>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@freebsd.org, jau@jau.tmt.tele.fi
Cc:  Subject: Re: kern/2279: questionable parameter types in /usr/include/signal.h
Date: Thu, 26 Dec 1996 17:39:47 +1100

 >>Description:
 >
 >	See the patch below in the Fix section.
 
 THere was no bug.  _BSD_PID_T is defined in <machine/ansi.h>.
 
 >--- /usr/include/signal.h.orig	Thu Dec 26 00:01:31 1996
 >+++ /usr/include/signal.h	Wed Dec 25 23:55:02 1996
 >@@ -36,6 +36,7 @@
 > #ifndef _SIGNAL_H_
 > #define	_SIGNAL_H_
 > 
 >+#include <sys/types.h>
 
 This restores the massive namespace pollution that I fixed in rev.1.4.
 Note that <sys/signal.h> is included unconditionally by <signal.h>, so
 it must be just as careful about namespace pollution as <signal.h>.
 
 Bruce

From: "Jukka A. Ukkonen" <jau@jau.tmt.tele.fi>
To: bde@zeta.org.au (Bruce Evans)
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/2279: questionable parameter types in /usr/include/signal.h
Date: Thu, 26 Dec 1996 20:32:53 +0200 (EET)

 Quoting Bruce Evans:
 > 
 > >>Description:
 > >
 > >	See the patch below in the Fix section.
 > 
 > THere was no bug.  _BSD_PID_T is defined in <machine/ansi.h>.
 
 	No, not a functional bug, but a logic one. For logical completeness
 	it should read pid_t as per definition instead of _BSD_PID_T_ which
 	is not a real type from the compiler's point of view, but just a
 	macro which is later undefined when the real pid_t gets defined.
 
 	Macros within the parameter lists of prototypes will probably one
 	day cause more problems than importing some definitions one does
 	not absolutely need at the time.
 
 	I always liked the ConvexOS way of doing these #defines and typedefs.
 	ConvexOS also has something like _BSD_PID_T_ macros which are used
 	for initial typedefs. All the typedef types are then declared as
 
 	#ifndef	_PID_T
 	typedef _BSD_PID_T_	pid_t;
 	#  define _PID_T	pid_t
 	#endif
 
 	That should save you at least from doing useless duplicated typedefs.
 	On the other hand I guess there is no way of importing only those
 	typedefs that are absolutely needed. Making everything the way STDC
 	and POSIX put it one is bound to always get some "crap" with the
 	typedefs one really needs.
 
 > >--- /usr/include/signal.h.orig	Thu Dec 26 00:01:31 1996
 > >+++ /usr/include/signal.h	Wed Dec 25 23:55:02 1996
 > >@@ -36,6 +36,7 @@
 > > #ifndef _SIGNAL_H_
 > > #define	_SIGNAL_H_
 > > 
 > >+#include <sys/types.h>
 > 
 > This restores the massive namespace pollution that I fixed in rev.1.4.
 > Note that <sys/signal.h> is included unconditionally by <signal.h>, so
 > it must be just as careful about namespace pollution as <signal.h>.
 
 	Eh? So... what has <sys/signal.h> to do with it? It has nothing
 	to do with defining pid_t. At least it shouldn't have.
 
 
 	Cheers,
 		// jau
 ------
   /    Jukka A. Ukkonen,  Internet and New Media / Finnish Telecom Ltd.
  /__   M.Sc. (sw-eng & cs)                     (Phone) +358-2040-4025
    /   Internet: Jukka.Ukkonen@tele.fi           (Fax) +358-2040-2712
   /    Internet: jau@iki.fi                   (Mobile) +358-400-606671
  v     Internet: ukkonen@nic.funet.fi       (Home&Fax) +358-9-6215280

From: Bruce Evans <bde@zeta.org.au>
To: bde@zeta.org.au, jau@jau.tmt.tele.fi
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/2279: questionable parameter types in /usr/include/signal.h
Date: Fri, 27 Dec 1996 10:06:52 +1100

 >> THere was no bug.  _BSD_PID_T is defined in <machine/ansi.h>.
 >
 >	No, not a functional bug, but a logic one. For logical completeness
 >	it should read pid_t as per definition instead of _BSD_PID_T_ which
 >	is not a real type from the compiler's point of view, but just a
 >	macro which is later undefined when the real pid_t gets defined.
 
 No, the macro is never undefined.  See <machine/ansi.h>.
 
 >	I always liked the ConvexOS way of doing these #defines and typedefs.
 >	ConvexOS also has something like _BSD_PID_T_ macros which are used
 >	for initial typedefs. All the typedef types are then declared as
 >
 >	#ifndef	_PID_T
 >	typedef _BSD_PID_T_	pid_t;
 >	#  define _PID_T	pid_t
 >	#endif
 
 This way takes more code and is only necessary for types that must be
 declared in multiple headers (like size_t).
 
 >> This restores the massive namespace pollution that I fixed in rev.1.4.
 >> Note that <sys/signal.h> is included unconditionally by <signal.h>, so
 >> it must be just as careful about namespace pollution as <signal.h>.
 >
 >	Eh? So... what has <sys/signal.h> to do with it? It has nothing
 >	to do with defining pid_t. At least it shouldn't have.
 
 I thought you were fixing <sys/signal.h>.  It's more obviously wrong to
 include <sys/types.h> in <signal.h> than in <sys/signal.h> :-).
 <sys/signal.h> used to include it.
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Wed Feb 26 08:58:58 PST 1997 
State-Changed-Why:  
Bruce says that he changed the kill() prototype to make signal.h 
not depend on types.h, and to help work around a problem  
with non-ANSI compilers. 
>Unformatted:
