ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/getpagesize.c
(Generate patch)

Comparing ray/src/common/getpagesize.c (file contents):
Revision 1.1 by greg, Wed Oct 9 13:08:16 1991 UTC vs.
Revision 2.5 by greg, Tue Feb 25 02:47:21 2003 UTC

# Line 1 | Line 1
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 */
# Line 21 | Line 20 | getpagesize()                  /* use var structure to get page size
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
# Line 31 | Line 31 | return(NBPG_PA83);     /* This is supposed to be ok for PA
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
# Line 42 | Line 49 | getpagesize()
49          return(PAGESIZE);
50   }
51  
52 + #endif
53 + #endif
54   #endif
55  
56   #endif /* !BSD */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines