From nobody@FreeBSD.ORG  Fri Sep 29 03:05:25 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 1F33637B423; Fri, 29 Sep 2000 03:05:19 -0700 (PDT)
Message-Id: <20000929100519.1F33637B423@hub.freebsd.org>
Date: Fri, 29 Sep 2000 03:05:19 -0700 (PDT)
From: toga@puyo.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: /usr/include/sys/mman.h uses a type defined in /usr/include/sys/types.h
X-Send-Pr-Version: www-1.0

>Number:         21644
>Category:       misc
>Synopsis:       /usr/include/sys/mman.h uses a type defined in /usr/include/sys/types.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mike
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 29 03:10:04 PDT 2000
>Closed-Date:    Fri Aug 23 13:09:05 PDT 2002
>Last-Modified:  Fri Aug 23 13:09:05 PDT 2002
>Originator:     TOGAWA Satoshi
>Release:        4-STABLE
>Organization:
PUYO Online Reactionary Group
>Environment:
FreeBSD cel.sd.puyo.org 4.1.1-STABLE FreeBSD 4.1.1-STABLE #7: Thu Sep 28 00:57:42 JST 2000     root@:/usr/src/sys/compile/CEL  i386

>Description:
In /usr/include/sys/mman.h , 

line 134
int     shm_open __P((const char *, int, mode_t));

but type "mode_t" is defined in /usr/include/sys/types.h.
And mman.h don't include types.h. So using mman.h, without
including types.h, causes compile error.

I hope that mman.h includes types.h. 

>How-To-Repeat:
Including /usr/include/sys/mman.h , without including /usr/include/sys/types.h in above.

>Fix:
*** /usr/include/sys/mman.h	Thu Jul 27 12:06:39 2000
--- ./mman.h	Fri Sep 29 18:59:47 2000
***************
*** 129,134 ****
--- 129,135 ----
  
  __BEGIN_DECLS
  #ifdef _P1003_1B_VISIBLE
+ #include <sys/cdefs.h>
  int	mlockall __P((int));
  int	munlockall __P((void));
  int	shm_open __P((const char *, int, mode_t));


>Release-Note:
>Audit-Trail:

From: Togawa Satoshi <toga@af.wakwak.com>
To: freebsd-gnats-submit@FreeBSD.org,
	"toga@puyo.org?subject=Re":%20misc/21644:%20%2Fusr%2Finclude%2Fsys%2Fmman.h%20uses%20a%20type%20defined%20in%20%2Fusr%2Finclude%2Fsys@2Ftypes.h
Cc:  
Subject: Re: misc/21644: /usr/include/sys/mman.h uses a type defined in /usr/include/sys/types.h
Date: Fri, 29 Sep 2000 19:15:22 +0900 (JST)

 *** /usr/include/sys/mman.h	Thu Jul 27 12:06:39 2000
 --- ./mman.h	Fri Sep 29 18:59:47 2000
 ***************
 *** 129,134 ****
 --- 129,135 ----
   
   __BEGIN_DECLS
   #ifdef _P1003_1B_VISIBLE
 + #include <sys/types.h>
   int	mlockall __P((int));
   int	munlockall __P((void));
   int	shm_open __P((const char *, int, mode_t));
 

From: Peter Pentchev <roam@orbitel.bg>
To: toga@puyo.org
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/21644: /usr/include/sys/mman.h uses a type defined in /usr/include/sys/types.h
Date: Fri, 29 Sep 2000 13:34:02 +0300

 On Fri, Sep 29, 2000 at 03:05:19AM -0700, toga@puyo.org wrote:
 > >Synopsis:       /usr/include/sys/mman.h uses a type defined in /usr/include/sys/types.h
 [snip]
 > >Description:
 > In /usr/include/sys/mman.h , 
 > 
 > line 134
 > int     shm_open __P((const char *, int, mode_t));
 > 
 > but type "mode_t" is defined in /usr/include/sys/types.h.
 > And mman.h don't include types.h. So using mman.h, without
 > including types.h, causes compile error.
 
 Uhm.. the shm_open(3) manpage lists both <sys/types.h> and <sys/mman.h>
 as headers you should include when using shm_open().  That is, on FreeBSD,
 this is a well documented header dependency.
 
 It is true, though, that SUSv2 says shm_open() should only need <sys/mman.h> -
 http://www.opengroup.org/onlinepubs/007908799/xsh/shm_open.html
 
 G'luck,
 Peter
 
 -- 
 This sentence contains exactly threee erors.
 
Responsible-Changed-From-To: freebsd-bugs->freebsd-standards 
Responsible-Changed-By: johan 
Responsible-Changed-When: Thu Aug 22 12:28:49 PDT 2002 
Responsible-Changed-Why:  
Apperently SUSv2 thinks this should be changed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21644 
Responsible-Changed-From-To: freebsd-standards->mike 
Responsible-Changed-By: mike 
Responsible-Changed-When: Thu Aug 22 23:11:29 PDT 2002 
Responsible-Changed-Why:  

Over to me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21644 
State-Changed-From-To: open->closed 
State-Changed-By: mike 
State-Changed-When: Fri Aug 23 13:06:57 PDT 2002 
State-Changed-Why:  

Fixed in 5.0-CURRENT.  No plans to MFC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21644 
>Unformatted:
