1 |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
|
3 |
#ifndef lint |
4 |
static char SCCSid[] = "$SunId$ LBL"; |
5 |
#endif |
6 |
|
7 |
/* |
8 |
* Return system page size for non-BSD machine. |
9 |
*/ |
10 |
|
11 |
#ifndef BSD |
12 |
|
13 |
#if defined(_AUX_SOURCE) /* Apple's A/UX */ |
14 |
|
15 |
#include <sys/var.h> |
16 |
int |
17 |
getpagesize() /* use var structure to get page size */ |
18 |
{ |
19 |
struct var v; |
20 |
uvar(&v); |
21 |
return(1 << v.v_pageshift); |
22 |
} |
23 |
|
24 |
#else |
25 |
#if defined(hpux) /* Hewlett Packard's HPUX */ |
26 |
|
27 |
#include <machine/param.h> |
28 |
int |
29 |
getpagesize() |
30 |
{ |
31 |
return(NBPG_PA83); /* This is supposed to be ok for PA-RISC 1.0, but |
32 |
I don't know about 1.1 (i.e. Snakes) */ |
33 |
} |
34 |
|
35 |
#else /* Unknown version of UNIX */ |
36 |
|
37 |
#ifndef PAGESIZE |
38 |
#define PAGESIZE 8192 /* Guess on the high side */ |
39 |
#endif |
40 |
int |
41 |
getpagesize() |
42 |
{ |
43 |
return(PAGESIZE); |
44 |
} |
45 |
|
46 |
#endif |
47 |
#endif |
48 |
|
49 |
#endif /* !BSD */ |