1 /* Emulate getpagesize on systems that lack it. */
3 #ifndef HAVE_GETPAGESIZE
6 # define getpagesize() 512
14 # define getpagesize() sysconf(_SC_PAGESIZE)
15 # else /* no _SC_PAGESIZE */
16 # ifdef HAVE_SYS_PARAM_H
17 # include <sys/param.h>
19 # define getpagesize() EXEC_PAGESIZE
20 # else /* no EXEC_PAGESIZE */
22 # define getpagesize() NBPG * CLSIZE
25 # endif /* no CLSIZE */
28 # define getpagesize() NBPC
31 # define getpagesize() PAGESIZE
32 # endif /* PAGESIZE */
35 # endif /* no EXEC_PAGESIZE */
36 # else /* no HAVE_SYS_PARAM_H */
37 # define getpagesize() 8192 /* punt totally */
38 # endif /* no HAVE_SYS_PARAM_H */
39 # endif /* no _SC_PAGESIZE */
41 #endif /* no HAVE_GETPAGESIZE */