2 This file is part of SXEmacs
4 SXEmacs is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 SXEmacs is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* Synched up with: FSF 19.30. */
20 #ifndef INCLUDED_getpagesize_h_
21 #define INCLUDED_getpagesize_h_
23 /* Emulate getpagesize on systems that lack it. */
27 #include <sys/types.h>
28 static size_t getpagesize()
33 #define HAVE_GETPAGESIZE
37 #ifndef HAVE_GETPAGESIZE
44 #define getpagesize() sysconf(_SC_PAGESIZE)
47 #include <sys/param.h>
50 #define getpagesize() EXEC_PAGESIZE
53 #define getpagesize() NBPG * CLSIZE
56 #endif /* no CLSIZE */
58 #if (defined (sparc) && defined (USG)) || defined (SOLARIS2)
59 #define getpagesize() PAGESIZE
60 #else /* not Solaris 2 */
62 #define getpagesize() NBPC
65 #define getpagesize() PAGESIZE
68 #endif /* not Solaris 2 */
70 #endif /* no EXEC_PAGESIZE */
71 #endif /* _SC_PAGESIZE */
72 #endif /* not HAVE_GETPAGESIZE */
74 #endif /* INCLUDED_getpagesize_h_ */