1 /* This file is part of XEmacs.
3 XEmacs is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
8 XEmacs is distributed in the hope that it will be useful, but WITHOUT
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 You should have received a copy of the GNU General Public License
14 along with XEmacs; see the file COPYING. If not, write to
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 Boston, MA 02111-1307, USA. */
18 /* Synched up with: FSF 19.30. */
20 /* Emulate getpagesize on systems that lack it. */
24 #include <sys/types.h>
25 static size_t getpagesize() { return( 4096 ); }
26 #define HAVE_GETPAGESIZE
30 #ifndef HAVE_GETPAGESIZE
37 #define getpagesize() sysconf(_SC_PAGESIZE)
40 #include <sys/param.h>
43 #define getpagesize() EXEC_PAGESIZE
46 #define getpagesize() NBPG * CLSIZE
49 #endif /* no CLSIZE */
51 #if (defined (sparc) && defined (USG)) || defined (SOLARIS2)
52 #define getpagesize() PAGESIZE
53 #else /* not Solaris 2 */
55 #define getpagesize() NBPC
58 #define getpagesize() PAGESIZE
61 #endif /* not Solaris 2 */
63 #endif /* no EXEC_PAGESIZE */
64 #endif /* _SC_PAGESIZE */
65 #endif /* not HAVE_GETPAGESIZE */