Page MenuHomeFreeBSD

Add missing header to shmget(2)
ClosedPublic

Authored by sevan on Aug 12 2017, 4:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 6, 1:59 AM
Unknown Object (File)
Jan 28 2024, 7:16 PM
Unknown Object (File)
Jan 26 2024, 3:03 AM
Unknown Object (File)
Jan 13 2024, 3:49 AM
Unknown Object (File)
Dec 20 2023, 1:29 AM
Unknown Object (File)
Nov 13 2023, 2:33 PM
Unknown Object (File)
Nov 11 2023, 2:26 PM
Unknown Object (File)
Nov 11 2023, 1:23 PM
Subscribers

Details

Reviewers
bcr
Group Reviewers
Src Committers
manpages
Commits
rS322432: Add missing header.
Summary

S_IRUSR is defined in sys/stat.h

Bug 209229
mt@markoturk.info

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

OK, go ahead with this.

This revision is now accepted and ready to land.Aug 12 2017, 4:39 PM
This revision was automatically updated to reflect the committed changes.

This is internally consistent, but does not match what POSIX says. POSIX says only <sys/shm.h> is required and the permissions should be coded using octal constants (yuck). However, if a programmer wants to use S_IRUSR and the like, that is fine. POSIX defines the exact values these constants should have. I don't think POSIX needs to be followed exactly in this.

Note that <sys/ipc.h> can safely be removed from this list. POSIX says <sys/shm.h> should include <sys/ipc.h> and that is what we implement.

Also, it seems like <sys/types.h> can be removed. A shmget() invocation will compile and run with only #include <sys/shm.h>.