POSIX deprecated getpagesize(3), and sysconf(_SC_PAGESIZE) is a portable way to get the page size.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/libc/gen/getpagesize.3 | ||
---|---|---|
58 | Will update to _SC_PAGESIZE (leading _) Not certain this is the best markup for this though. .Xr sysconf 3 with the .Ar _SC_PAGESIZE argument but that seems awkward. |
LGTM, I would add "This replaces the deprecated getpagesize(3) function" to sysconf(3).
Maybe in sysconf's _SC_PAGESIZE description "Portable applications should use this instead of .Xr sysconf 3 (which is deprecated by POSIX)."
I assume you meant "... instead of .Xr getpagesize 3 ..."
lib/libc/gen/getpagesize.3 | ||
---|---|---|
31 | So you're giving us 3 weeks to review? :-) |
It's fine as it is, but I've none the less pulled out a can of purple paint for the annual memorial day bike shed painting party.
lib/libc/gen/getpagesize.3 | ||
---|---|---|
55 | Usually we say "POSIX 2001.xx deprecated ...." Do you know when POSIX deprecated the API? | |
59 | "sysconf(_SC_PAGESIZE) replaces it." might be simpler, shorter and better? |
lib/libc/gen/getpagesize.3 | ||
---|---|---|
55 | I am not sure off hand... The Linux man page says:
| |
59 | I don't like something about this, maybe it's just starting with a lower case letter via the function name. |
lib/libc/gen/getpagesize.3 | ||
---|---|---|
55 | .Nm Since it's actually been removed from POSIX.1. Deprecated means that it is still there, but it may be removed in a future version, so we should avoid that language. I don't have any of the POSIX standards before 2001, so it's not easy for me to go look. the opengroup website is hit or miss on older standards finding details like this, alas. I've had some luck in the past, but it's been mixed.... | |
59 | fair enough. See above for a different take then. |
So it looks to be in POSIX-1.1997 as LEGACY (at least that's the version tagged on the opengroup web site), but gone in 2001. I'd just say it was removed in ".St -p1003.1-2001". and leave it at that.