From nobody@FreeBSD.org  Sun Sep  9 12:10:49 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 4341B37B406
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  9 Sep 2001 12:10:49 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f89JAnG02417;
	Sun, 9 Sep 2001 12:10:49 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109091910.f89JAnG02417@freefall.freebsd.org>
Date: Sun, 9 Sep 2001 12:10:49 -0700 (PDT)
From: Steve Watt <steve@Watt.COM>
To: freebsd-gnats-submit@FreeBSD.org
Subject: shm_open man page missing <fcntl.h>
X-Send-Pr-Version: www-1.0

>Number:         30463
>Category:       docs
>Synopsis:       shm_open man page missing <fcntl.h>
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 09 12:20:00 PDT 2001
>Closed-Date:    Mon Sep 10 01:54:07 PDT 2001
>Last-Modified:  Mon Sep 10 02:00:00 PDT 2001
>Originator:     Steve Watt
>Release:        4.3-STABLE 2001-04-25
>Organization:
>Environment:
FreeBSD wattres.Watt.COM 4.3-STABLE FreeBSD 4.3-STABLE #9: Sun May 20 13:25:38 PDT 2001     root@wattres.Watt.COM:/old/usr/obj/usr/src/sys/WATTRES  i386

>Description:
The manual page for shm_open does not state that <fcntl.h> is a required header.  You need it to get the O_* flags for the flags argument.

Hmm...  Does <sys/stat.h> need to be there (and on the open(3)) page to get the S_* flags for mode?  I think it's there in the POSIX spec, but I don't have a copy at hand any more.
>How-To-Repeat:
man shm_open

>Fix:
--- shm_open.3.orig     Sun Sep  9 12:09:18 2001
+++ shm_open.3  Sun Sep  9 12:10:15 2001
@@ -26,7 +26,7 @@
 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libc/gen/shm_open.3,v 1.3.2.3 2001/03/06 16:45:54 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/shm_open.3,v 1.3.2.3+ 2001/09/09 17:09:54 steve Exp $
 .\"
 .Dd March 24, 2000
 .Dt SHM_OPEN 3
@@ -39,6 +39,7 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
+.Fd #include <fcntl.h>
 .Fd #include <sys/types.h>
 .Fd #include <sys/mman.h>
 .Ft int

>Release-Note:
>Audit-Trail:

From: "Steve Watt" <steve@Watt.COM>
To: <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: docs/30463: shm_open man page missing <fcntl.h>
Date: Sun, 9 Sep 2001 12:51:52 -0700

 Ummm, nevermind.  I'm just being brain-damaged today and couldn't figure out
 where to get the O_* flags from.  Once I found it, things were better and I
 decided that Something Needed To Be Done.
 
 Maybe an inline mention of <fcntl.h> would be nice?
 
 Thanks.
 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Sep 10 01:54:07 PDT 2001 
State-Changed-Why:  
Asked and answered. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30463 

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Steve Watt <steve@Watt.COM>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/30463: shm_open man page missing <fcntl.h>
Date: Mon, 10 Sep 2001 11:53:43 +0300

 On Sun, Sep 09, 2001 at 01:00:12PM -0700, Steve Watt wrote:
 > The following reply was made to PR docs/30463; it has been noted by GNATS.
 > 
 > From: "Steve Watt" <steve@Watt.COM>
 > To: <freebsd-gnats-submit@FreeBSD.org>
 > Cc:  
 > Subject: Re: docs/30463: shm_open man page missing <fcntl.h>
 > Date: Sun, 9 Sep 2001 12:51:52 -0700
 > 
 >  Ummm, nevermind.  I'm just being brain-damaged today and couldn't figure out
 >  where to get the O_* flags from.  Once I found it, things were better and I
 >  decided that Something Needed To Be Done.
 >  
 : The shm_open() and shm_unlink() act as wrappers around the open(2)
       ^^^^^^^^^^                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 : and unlink(2) routines, and <path>, <flags>, and <mode> arguments
                                       ^^^^^^^             ^^^^^^^^^
 : are as specified for those functions.  The <flags> argument is
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 : checked to ensure that the access mode specified is not O_WRONLY
 : (which is not defined for shared memory objects).
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Oracle Developer/DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
>Unformatted:
