Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 2010 01:07:29 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r203161 - head/lib/libc/sys
Message-ID:  <20100130005028.R77143@delplex.bde.org>
In-Reply-To: <201001291032.o0TAW1VZ034590@svn.freebsd.org>
References:  <201001291032.o0TAW1VZ034590@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 Jan 2010, Robert Watson wrote:

> Log:
>  You must include fcntl.h (in practice) to be able to do anything useful
>  with shm_open(2), as otherwise the O_ flags are undefined.

Only usually, not "in practice".  You can usefully call shm_open() with
flags obtained from a variable.

>  MFC after:	3 days

> Modified: head/lib/libc/sys/shm_open.2
> ==============================================================================
> --- head/lib/libc/sys/shm_open.2	Fri Jan 29 10:20:11 2010	(r203160)
> +++ head/lib/libc/sys/shm_open.2	Fri Jan 29 10:32:01 2010	(r203161)
> @@ -39,6 +39,7 @@
> .Sh SYNOPSIS
> .In sys/types.h
> .In sys/mman.h
> +.In fcntl.h
> .Ft int
> .Fn shm_open "const char *path" "int flags" "mode_t mode"
> .Ft int

This detail belongs in the description, not in the synopsis.  This is
correctly handled in POSIX.

POSIX also correctly specifies the include of <sys/types.h> -- it wasn't
specified for shm_open() even in POSIX.1-1996 though it was specified for
some other functions then.  Now it isn't specified for any functions.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100130005028.R77143>