mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-21 03:42:35 +03:00
ChangeLog.old
argp
assert
benchtests
bits
catgets
conform
crypt
csu
ctype
debug
dirent
dlfcn
elf
gmon
gnulib
grp
gshadow
hesiod
htl
hurd
iconv
iconvdata
include
inet
intl
io
libio
locale
localedata
login
mach
malloc
manual
math
mathvec
misc
nis
nptl
nptl_db
nscd
nss
po
posix
pwd
resolv
resource
rt
scripts
setjmp
shadow
signal
socket
soft-fp
stdio-common
stdlib
string
sunrpc
support
sysdeps
aarch64
alpha
arm
csky
generic
gnu
hppa
htl
hurd
i386
ia64
ieee754
m68k
mach
microblaze
mips
nios2
nptl
posix
powerpc
pthread
riscv
s390
sh
sparc
unix
alpha
arm
bsd
i386
inet
mips
powerpc
sh
sysv
x86_64
Implies
Makefile
confstr.h
get_child_max.c
getlogin.c
getlogin_r.c
getpagesize.c
grantpt.c
ifreq.c
make-syscalls.sh
pt-fcntl.c
s-proto-cancel.S
s-proto.S
setxid.h
sockatmark.c
syscall-template.S
syscall.S
syscalls.list
sysdep.h
wordsize-32
wordsize-64
x86
x86_64
sysvipc
termios
time
timezone
wcsmbs
wctype
.gitattributes
.gitignore
COPYING
COPYING.LIB
INSTALL
LICENSES
MAINTAINERS
Makeconfig
Makefile
Makefile.help
Makefile.in
Makerules
NEWS
README
Rules
abi-tags
aclocal.m4
config.h.in
config.make.in
configure
configure.ac
extra-lib.mk
gen-locales.mk
libc-abis
libof-iterator.mk
o-iterator.mk
shlib-versions
test-skeleton.c
version.h
40 lines
1.2 KiB
C
40 lines
1.2 KiB
C
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library; if not, see
|
|
<https://www.gnu.org/licenses/>. */
|
|
|
|
#include <unistd.h>
|
|
#include <sys/param.h>
|
|
|
|
/* Return the system page size. */
|
|
int
|
|
__getpagesize (void)
|
|
{
|
|
#ifdef EXEC_PAGESIZE
|
|
return EXEC_PAGESIZE;
|
|
#else /* No EXEC_PAGESIZE. */
|
|
#ifdef NBPG
|
|
#ifndef CLSIZE
|
|
#define CLSIZE 1
|
|
#endif /* No CLSIZE. */
|
|
return NBPG * CLSIZE;
|
|
#else /* No NBPG. */
|
|
return NBPC;
|
|
#endif /* NBPG. */
|
|
#endif /* EXEC_PAGESIZE. */
|
|
}
|
|
libc_hidden_def (__getpagesize)
|
|
weak_alias (__getpagesize, getpagesize)
|