(jm_FILE_SYSTEM_USAGE): Add `[]' between use of
[coreutils.git] / lib / getpagesize.h
blobfb5b91c0890d0169502ddac7186b4913763d83b6
1 /* Emulate getpagesize on systems that lack it. */
3 #ifndef HAVE_GETPAGESIZE
5 #ifdef HAVE_UNISTD_H
6 # include <unistd.h>
7 #endif
9 #if !defined getpagesize && defined _SC_PAGESIZE
10 # if !(defined VMS && __VMS_VER < 70000000)
11 # define getpagesize() sysconf (_SC_PAGESIZE)
12 # endif
13 #endif
15 #if !defined getpagesize && defined VMS
16 # ifdef __ALPHA
17 # define getpagesize() 8192
18 # else
19 # define getpagesize() 512
20 # endif
21 #endif
23 /* This is for BeOS. */
24 #if !defined getpagesize && HAVE_OS_H
25 # include <OS.h>
26 # if defined B_PAGE_SIZE
27 # define getpagesize() B_PAGE_SIZE
28 # endif
29 #endif
31 #ifndef getpagesize
32 # include <sys/param.h>
33 # ifdef EXEC_PAGESIZE
34 # define getpagesize() EXEC_PAGESIZE
35 # else
36 # ifdef NBPG
37 # ifndef CLSIZE
38 # define CLSIZE 1
39 # endif
40 # define getpagesize() (NBPG * CLSIZE)
41 # else
42 # ifdef NBPC
43 # define getpagesize() NBPC
44 # endif
45 # endif
46 # endif
47 #endif
49 #endif /* not HAVE_GETPAGESIZE */