Mercurial > emacs
comparison src/getpagesize.h @ 16600:4f9e6148ce6a libc-961120
If no sys/param.h, default to 8k.
author | David J. MacKenzie <djm@gnu.org> |
---|---|
date | Tue, 19 Nov 1996 18:40:34 +0000 |
parents | ae726fd5403b |
children | c8fb06423da0 |
comparison
equal
deleted
inserted
replaced
16599:ae726fd5403b | 16600:4f9e6148ce6a |
---|---|
10 # include <unistd.h> | 10 # include <unistd.h> |
11 # endif | 11 # endif |
12 | 12 |
13 # ifdef _SC_PAGESIZE | 13 # ifdef _SC_PAGESIZE |
14 # define getpagesize() sysconf(_SC_PAGESIZE) | 14 # define getpagesize() sysconf(_SC_PAGESIZE) |
15 # else | 15 # else /* no _SC_PAGESIZE */ |
16 # include <sys/param.h> | 16 # ifdef HAVE_SYS_PARAM_H |
17 # ifdef EXEC_PAGESIZE | 17 # include <sys/param.h> |
18 # define getpagesize() EXEC_PAGESIZE | 18 # ifdef EXEC_PAGESIZE |
19 # else /* no EXEC_PAGESIZE */ | 19 # define getpagesize() EXEC_PAGESIZE |
20 # ifdef NBPG | 20 # else /* no EXEC_PAGESIZE */ |
21 # define getpagesize() NBPG * CLSIZE | 21 # ifdef NBPG |
22 # ifndef CLSIZE | 22 # define getpagesize() NBPG * CLSIZE |
23 # define CLSIZE 1 | 23 # ifndef CLSIZE |
24 # endif /* no CLSIZE */ | 24 # define CLSIZE 1 |
25 # else /* no NBPG */ | 25 # endif /* no CLSIZE */ |
26 # ifdef NBPC | 26 # else /* no NBPG */ |
27 # define getpagesize() NBPC | 27 # ifdef NBPC |
28 # else /* no NBPC */ | 28 # define getpagesize() NBPC |
29 # ifdef PAGESIZE | 29 # else /* no NBPC */ |
30 # define getpagesize() PAGESIZE | 30 # ifdef PAGESIZE |
31 # endif /* PAGESIZE */ | 31 # define getpagesize() PAGESIZE |
32 # endif /* no NBPC */ | 32 # endif /* PAGESIZE */ |
33 # endif /* no NBPG */ | 33 # endif /* no NBPC */ |
34 # endif /* no EXEC_PAGESIZE */ | 34 # endif /* no NBPG */ |
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 */ | |
35 # endif /* no _SC_PAGESIZE */ | 39 # endif /* no _SC_PAGESIZE */ |
36 | 40 |
37 #endif /* no HAVE_GETPAGESIZE */ | 41 #endif /* no HAVE_GETPAGESIZE */ |