ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/getpagesize.c
Revision: 2.1
Committed: Tue Nov 12 16:56:12 1991 UTC (32 years, 5 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.1: +0 -0 lines
Log Message:
updated revision number for release 2.0

File Contents

# Content
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 #elif defined(hpux) /* Hewlett Packard's HPUX */
25
26 #include <machine/param.h>
27 int
28 getpagesize()
29 {
30 return(NBPG_PA83); /* This is supposed to be ok for PA-RISC 1.0, but
31 I don't know about 1.1 (i.e. Snakes) */
32 }
33
34 #else /* Unknown version of UNIX */
35
36 #ifndef PAGESIZE
37 #define PAGESIZE 8192 /* Guess on the high side */
38 #endif
39 int
40 getpagesize()
41 {
42 return(PAGESIZE);
43 }
44
45 #endif
46
47 #endif /* !BSD */