NetBSD Problem Report #19

From gnats  Mon Oct 11 11:40:06 1993
Received: from localhost (jtc@localhost) by sun-lamp.cs.berkeley.edu (8.3/8.3) id LAA12265; Mon, 11 Oct 1993 11:40:06 -0700
Message-Id: <199310111840.LAA12265@sun-lamp.cs.berkeley.edu>
Date: Mon, 11 Oct 1993 11:40:06 -0700
From: "J.T. Conklin" <jtc>
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: <stdlib.h> should not include <sys/types.h>

>Number:         19
>Category:       lib
>Synopsis:       <stdlib.h> should not include <sys/types.h>
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 11 11:50:10 +0000 1993
>Closed-Date:    Mon Oct 11 12:16:58 +0000 1993
>Last-Modified:  
>Originator:     J.T. Conklin
>Release:        NetBSD-0.9
>Organization:
Winning Strategies, Inc.
>Environment:

System: NetBSD sun-lamp.cs.berkeley.edu 0.9a SUN_LAMP#6 i386

>Description:
	<stdlib.h> should not include <sys/types.h>.  It drags in two many
	type declarations for strict _POSIX behavior.  We can provide
	_SIZE_T_ by including <machine/ansi.h> and doing  the appropriate
	preprocessor junk by ourselves.

	Unfortunately, we still have to include <sys/types.h> for the
	prototype for radixtype() (it uses u_char).  But that is protected
	by a !_POSIX_SOURCE conditional.  

>How-To-Repeat:

>Fix:
>Release-Note:
>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: jtc
State-Changed-When: Mon Oct 11 12:16:58 1993
State-Changed-Why:
#included <machine/ansi.h> and declared size_t.
Moved #include of <sys/type.h> into !_POSIX_SOURCE conditional.

>Unformatted:
 To: gnats-bugs@sun-lamp.cs.berkeley.edu
 Subject: <stdlib.h> should not include <sys/types.h>
 From: jtc@sun-lamp.cs.berkeley.edu
 Reply-To: jtc@sun-lamp.cs.berkeley.edu
 X-send-pr-version: 3.01

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.