Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jun 2022 13:38:23 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a4bc220143ff - stable/12 - getpagesize(3): add .Xr to sysconf(3)
Message-ID:  <202206161338.25GDcNV9069874@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=a4bc220143ffef03b3eb58c63d6f7d2d6f81b6f0

commit a4bc220143ffef03b3eb58c63d6f7d2d6f81b6f0
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-05-30 19:34:34 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-06-16 13:37:47 +0000

    getpagesize(3): add .Xr to sysconf(3)
    
    POSIX deprecated getpagesize(3).  The portable way to obtain the page
    size is `sysconf(_SC_PAGESIZE)`.
    
    Reviewed by:    cperciva (earlier), imp
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D35352
    
    (cherry picked from commit 49c937e7040c44afdcfccede57dcecaf9ff08ed6)
---
 lib/libc/gen/getpagesize.3 | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/libc/gen/getpagesize.3 b/lib/libc/gen/getpagesize.3
index eeea6854a258..4c57f7474208 100644
--- a/lib/libc/gen/getpagesize.3
+++ b/lib/libc/gen/getpagesize.3
@@ -28,7 +28,7 @@
 .\"     @(#)getpagesize.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd April 26, 2017
+.Dd June 1, 2022
 .Dt GETPAGESIZE 3
 .Os
 .Sh NAME
@@ -51,9 +51,17 @@ management calls.
 The page size is a system
 page size and may not be the same as the underlying
 hardware page size.
+.Pp
+.St -p1003.1-2001
+removed
+.Nm .
+Portable applications should use
+.Ql sysconf(_SC_PAGESIZE)
+instead.
 .Sh SEE ALSO
 .Xr pagesize 1 ,
-.Xr sbrk 2
+.Xr sbrk 2 ,
+.Xr sysconf 3
 .Sh HISTORY
 The
 .Fn getpagesize



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