(init_alloc_once): Call init_weak_hash_tables.
[bpt/emacs.git] / src / getpagesize.h
CommitLineData
b3ae7a0a 1/* Emulate getpagesize on systems that lack it.
0b5538bd 2 Copyright (C) 1986, 1992, 1995, 2001, 2002, 2003, 2004,
8cabe764 3 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
b3ae7a0a
GM
4
5This file is part of GNU Emacs.
6
7GNU Emacs is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
684d6f5b 9the Free Software Foundation; either version 3, or (at your option)
b3ae7a0a
GM
10any later version.
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Emacs; see the file COPYING. If not, write to
4fc5845f
LK
19the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20Boston, MA 02110-1301, USA. */
bac7913a
RM
21
22#ifndef HAVE_GETPAGESIZE
23
eb93fe6a
DM
24# ifdef VMS
25# define getpagesize() 512
26# endif
bac7913a 27
eb93fe6a
DM
28# ifdef HAVE_UNISTD_H
29# include <unistd.h>
30# endif
bac7913a 31
eb93fe6a
DM
32# ifdef _SC_PAGESIZE
33# define getpagesize() sysconf(_SC_PAGESIZE)
4b45d671
DM
34# else /* no _SC_PAGESIZE */
35# ifdef HAVE_SYS_PARAM_H
36# include <sys/param.h>
37# ifdef EXEC_PAGESIZE
38# define getpagesize() EXEC_PAGESIZE
39# else /* no EXEC_PAGESIZE */
40# ifdef NBPG
41# define getpagesize() NBPG * CLSIZE
42# ifndef CLSIZE
43# define CLSIZE 1
44# endif /* no CLSIZE */
45# else /* no NBPG */
4b45d671
DM
46# ifdef PAGESIZE
47# define getpagesize() PAGESIZE
48# endif /* PAGESIZE */
4b45d671
DM
49# endif /* no NBPG */
50# endif /* no EXEC_PAGESIZE */
51# else /* no HAVE_SYS_PARAM_H */
52# define getpagesize() 8192 /* punt totally */
53# endif /* no HAVE_SYS_PARAM_H */
eb93fe6a 54# endif /* no _SC_PAGESIZE */
bac7913a 55
eb93fe6a 56#endif /* no HAVE_GETPAGESIZE */
ab5796a9
MB
57
58/* arch-tag: ff6206e3-97e2-4763-923a-e84bf28eabbc
59 (do not change this comment) */