--- ray/src/common/getpagesize.c 1991/11/25 11:24:41 2.2 +++ ray/src/common/getpagesize.c 2003/02/25 02:47:21 2.5 @@ -1,13 +1,12 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: getpagesize.c,v 2.5 2003/02/25 02:47:21 greg Exp $"; #endif - /* * Return system page size for non-BSD machine. */ +#include "copyright.h" + #ifndef BSD #if defined(_AUX_SOURCE) /* Apple's A/UX */ @@ -32,8 +31,15 @@ return(NBPG_PA83); /* This is supposed to be ok for PA I don't know about 1.1 (i.e. Snakes) */ } -#else /* Unknown version of UNIX */ +#else +#if defined(sparc) +#include +int getpagesize() +{ + return (int)sysconf(_SC_PAGESIZE); +} +#else /* Unknown version of UNIX */ #ifndef PAGESIZE #define PAGESIZE 8192 /* Guess on the high side */ #endif @@ -43,6 +49,7 @@ getpagesize() return(PAGESIZE); } +#endif #endif #endif