annotate src/getpagesize.h @ 13740:7868bb1ee05f libc-951216 libc-951217 libc-951218 libc-951219 libc-951220 libc-951221 libc-951222 libc-951223 libc-951224 libc-951225 libc-951226 libc-951227 libc-951228 libc-951229 libc-951230 libc-951231 libc-960101 libc-960102 libc-960103 libc-960104 libc-960105 libc-960106 libc-960107 libc-960108 libc-960109 libc-960110 libc-960111 libc-960112 libc-960113 libc-960114 libc-960115

(AViiON): Add ix86-dg-dgux
author Stan Cox <scox@redhat.com>
date Sat, 16 Dec 1995 03:32:35 +0000
parents 44ebc50db2c5
children ae726fd5403b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4356
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
1 /* Emulate getpagesize on systems that lack it. */
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
2
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
3 #ifndef HAVE_GETPAGESIZE
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
4
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
5 #ifdef VMS
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
6 #define getpagesize() 512
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
7 #endif
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
8
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
9 #ifdef HAVE_UNISTD_H
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
10 #include <unistd.h>
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
11 #endif
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
12
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
13 #ifdef _SC_PAGESIZE
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
14 #define getpagesize() sysconf(_SC_PAGESIZE)
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
15 #else
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
16
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
17 #include <sys/param.h>
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
18
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
19 #ifdef EXEC_PAGESIZE
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
20 #define getpagesize() EXEC_PAGESIZE
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
21 #else
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
22 #ifdef NBPG
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
23 #define getpagesize() NBPG * CLSIZE
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
24 #ifndef CLSIZE
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
25 #define CLSIZE 1
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
26 #endif /* no CLSIZE */
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
27 #else /* no NBPG */
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
28 #ifdef NBPC
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
29 #define getpagesize() NBPC
9421
44ebc50db2c5 entered into RCS
David J. MacKenzie <djm@gnu.org>
parents: 4356
diff changeset
30 #else /* no NBPC */
44ebc50db2c5 entered into RCS
David J. MacKenzie <djm@gnu.org>
parents: 4356
diff changeset
31 #ifdef PAGESIZE
44ebc50db2c5 entered into RCS
David J. MacKenzie <djm@gnu.org>
parents: 4356
diff changeset
32 #define getpagesize() PAGESIZE
44ebc50db2c5 entered into RCS
David J. MacKenzie <djm@gnu.org>
parents: 4356
diff changeset
33 #endif
4356
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
34 #endif /* NBPC */
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
35 #endif /* no NBPG */
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
36 #endif /* no EXEC_PAGESIZE */
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
37 #endif /* no _SC_PAGESIZE */
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
38
3f0d5006a2c4 Initial revision
Roland McGrath <roland@gnu.org>
parents:
diff changeset
39 #endif /* not HAVE_GETPAGESIZE */