Mercurial > emacs
annotate src/getpagesize.h @ 67089:3eac7486ff05
(cfstring_to_lisp_nodecode) [TARGET_API_MAC_CARBON]: Add prototype.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Wed, 23 Nov 2005 07:19:24 +0000 |
parents | a0d1312ede66 |
children | 3bd95f4f2941 2d92f5c9d6ae |
rev | line source |
---|---|
36226 | 1 /* Emulate getpagesize on systems that lack it. |
64770
a0d1312ede66
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64084
diff
changeset
|
2 Copyright (C) 1986, 1992, 1995, 2001, 2002, 2003, 2004, |
a0d1312ede66
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64084
diff
changeset
|
3 2005 Free Software Foundation, Inc. |
36226 | 4 |
5 This file is part of GNU Emacs. | |
6 | |
7 GNU Emacs is free software; you can redistribute it and/or modify | |
8 it under the terms of the GNU General Public License as published by | |
9 the Free Software Foundation; either version 2, or (at your option) | |
10 any later version. | |
11 | |
12 GNU Emacs is distributed in the hope that it will be useful, | |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with GNU Emacs; see the file COPYING. If not, write to | |
64084 | 19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 Boston, MA 02110-1301, USA. */ | |
4356 | 21 |
22 #ifndef HAVE_GETPAGESIZE | |
23 | |
16599 | 24 # ifdef VMS |
25 # define getpagesize() 512 | |
26 # endif | |
4356 | 27 |
16599 | 28 # ifdef HAVE_UNISTD_H |
29 # include <unistd.h> | |
30 # endif | |
4356 | 31 |
16599 | 32 # ifdef _SC_PAGESIZE |
33 # define getpagesize() sysconf(_SC_PAGESIZE) | |
16600
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
34 # else /* no _SC_PAGESIZE */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
35 # ifdef HAVE_SYS_PARAM_H |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
36 # include <sys/param.h> |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
37 # ifdef EXEC_PAGESIZE |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
38 # define getpagesize() EXEC_PAGESIZE |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
39 # else /* no EXEC_PAGESIZE */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
40 # ifdef NBPG |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
41 # define getpagesize() NBPG * CLSIZE |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
42 # ifndef CLSIZE |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
43 # define CLSIZE 1 |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
44 # endif /* no CLSIZE */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
45 # else /* no NBPG */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
46 # ifdef NBPC |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
47 # define getpagesize() NBPC |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
48 # else /* no NBPC */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
49 # ifdef PAGESIZE |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
50 # define getpagesize() PAGESIZE |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
51 # endif /* PAGESIZE */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
52 # endif /* no NBPC */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
53 # endif /* no NBPG */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
54 # endif /* no EXEC_PAGESIZE */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
55 # else /* no HAVE_SYS_PARAM_H */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
56 # define getpagesize() 8192 /* punt totally */ |
4f9e6148ce6a
If no sys/param.h, default to 8k.
David J. MacKenzie <djm@gnu.org>
parents:
16599
diff
changeset
|
57 # endif /* no HAVE_SYS_PARAM_H */ |
16599 | 58 # endif /* no _SC_PAGESIZE */ |
4356 | 59 |
16599 | 60 #endif /* no HAVE_GETPAGESIZE */ |
52401 | 61 |
62 /* arch-tag: ff6206e3-97e2-4763-923a-e84bf28eabbc | |
63 (do not change this comment) */ |