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 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"