No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / grep / src / getpagesize.h
blob822d1c182d13f520680b7a7124170d642c2adba3
1 /* $NetBSD$ */
3 /* Emulate getpagesize on systems that lack it. */
5 #ifndef HAVE_GETPAGESIZE
7 #if !defined getpagesize && defined __BEOS__
8 # include <OS.h>
9 # define getpagesize() B_PAGE_SIZE
10 #endif
12 #ifdef HAVE_UNISTD_H
13 # include <unistd.h>
14 #endif
16 #if !defined getpagesize && defined _SC_PAGESIZE
17 # if !(defined VMS && __VMS_VER < 70000000)
18 # define getpagesize() sysconf (_SC_PAGESIZE)
19 # endif
20 #endif
22 #if !defined getpagesize && defined VMS
23 # ifdef __ALPHA
24 # define getpagesize() 8192
25 # else
26 # define getpagesize() 512
27 # endif
28 #endif
30 #ifndef getpagesize
31 # include <sys/param.h>
32 # ifdef EXEC_PAGESIZE
33 # define getpagesize() EXEC_PAGESIZE
34 # else
35 # ifdef NBPG
36 # ifndef CLSIZE
37 # define CLSIZE 1
38 # endif
39 # define getpagesize() (NBPG * CLSIZE)
40 # else
41 # ifdef NBPC
42 # define getpagesize() NBPC
43 # endif
44 # endif
45 # endif
46 #endif
48 #endif /* not HAVE_GETPAGESIZE */