diff options
| author | David J. MacKenzie | 1996-11-19 18:40:34 +0000 |
|---|---|---|
| committer | David J. MacKenzie | 1996-11-19 18:40:34 +0000 |
| commit | 4b45d6714a4afd55e138be89723d32472062f54e (patch) | |
| tree | ff63a23b846303c55e78c849055a0fd92ba8e874 /src | |
| parent | eb93fe6a97840318127148cb975652a1356d21fd (diff) | |
| download | emacs-4b45d6714a4afd55e138be89723d32472062f54e.tar.gz emacs-4b45d6714a4afd55e138be89723d32472062f54e.zip | |
If no sys/param.h, default to 8k.
Diffstat (limited to 'src')
| -rw-r--r-- | src/getpagesize.h | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/getpagesize.h b/src/getpagesize.h index eb5109db78b..a064973d15f 100644 --- a/src/getpagesize.h +++ b/src/getpagesize.h | |||
| @@ -12,26 +12,30 @@ | |||
| 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 */ |