1 |
– |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Return system page size for non-BSD machine. |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include "copyright.h" |
9 |
+ |
|
10 |
|
#ifndef BSD |
11 |
|
|
12 |
|
#if defined(_AUX_SOURCE) /* Apple's A/UX */ |
20 |
|
return(1 << v.v_pageshift); |
21 |
|
} |
22 |
|
|
23 |
< |
#elif defined(hpux) /* Hewlett Packard's HPUX */ |
23 |
> |
#else |
24 |
> |
#if defined(hpux) /* Hewlett Packard's HPUX */ |
25 |
|
|
26 |
|
#include <machine/param.h> |
27 |
|
int |
31 |
|
I don't know about 1.1 (i.e. Snakes) */ |
32 |
|
} |
33 |
|
|
34 |
< |
#else /* Unknown version of UNIX */ |
34 |
> |
#else |
35 |
> |
#if defined(sparc) |
36 |
|
|
37 |
+ |
#include <unistd.h> |
38 |
+ |
int getpagesize() |
39 |
+ |
{ |
40 |
+ |
return (int)sysconf(_SC_PAGESIZE); |
41 |
+ |
} |
42 |
+ |
#else /* Unknown version of UNIX */ |
43 |
|
#ifndef PAGESIZE |
44 |
|
#define PAGESIZE 8192 /* Guess on the high side */ |
45 |
|
#endif |
49 |
|
return(PAGESIZE); |
50 |
|
} |
51 |
|
|
52 |
+ |
#endif |
53 |
+ |
#endif |
54 |
|
#endif |
55 |
|
|
56 |
|
#endif /* !BSD */ |