* ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
[bpt/emacs.git] / src / getpagesize.h
CommitLineData
b3ae7a0a 1/* Emulate getpagesize on systems that lack it.
73b0cd50 2 Copyright (C) 1986, 1992, 1995, 2001-2011 Free Software Foundation, Inc.
b3ae7a0a
GM
3
4This file is part of GNU Emacs.
5
b9b1cc14 6GNU Emacs is free software: you can redistribute it and/or modify
b3ae7a0a 7it under the terms of the GNU General Public License as published by
b9b1cc14
GM
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
b3ae7a0a
GM
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
b9b1cc14 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
bac7913a
RM
18
19#ifndef HAVE_GETPAGESIZE
20
4004364e 21# include <unistd.h>
bac7913a 22
eb93fe6a
DM
23# ifdef _SC_PAGESIZE
24# define getpagesize() sysconf(_SC_PAGESIZE)
4b45d671
DM
25# else /* no _SC_PAGESIZE */
26# ifdef HAVE_SYS_PARAM_H
27# include <sys/param.h>
28# ifdef EXEC_PAGESIZE
29# define getpagesize() EXEC_PAGESIZE
30# else /* no EXEC_PAGESIZE */
31# ifdef NBPG
32# define getpagesize() NBPG * CLSIZE
33# ifndef CLSIZE
34# define CLSIZE 1
35# endif /* no CLSIZE */
36# else /* no NBPG */
4b45d671
DM
37# ifdef PAGESIZE
38# define getpagesize() PAGESIZE
39# endif /* PAGESIZE */
4b45d671
DM
40# endif /* no NBPG */
41# endif /* no EXEC_PAGESIZE */
42# else /* no HAVE_SYS_PARAM_H */
43# define getpagesize() 8192 /* punt totally */
44# endif /* no HAVE_SYS_PARAM_H */
eb93fe6a 45# endif /* no _SC_PAGESIZE */
bac7913a 46
eb93fe6a 47#endif /* no HAVE_GETPAGESIZE */
ab5796a9 48