Mercurial > mplayer.hg
annotate osdep/mmap.h @ 34514:e421fb9bb0b9
Fix compilation with --disable-networking.
Patch by Andrew Wason, rectalogic rectalogic com
author | cehoyos |
---|---|
date | Thu, 26 Jan 2012 23:16:43 +0000 |
parents | 32ef0c7cb949 |
children |
rev | line source |
---|---|
26076 | 1 /* |
2 * mmap declaration header for systems with missing/nonfunctional sys/mman.h | |
3 * | |
4 * Copyright (c) 2008 KO Myung-Hun (komh@chollian.net) | |
5 * | |
6 * This file is part of MPlayer. | |
7 * | |
8 * MPlayer is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * MPlayer is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License along | |
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
21 */ | |
22 | |
23 #ifndef MPLAYER_MMAP_H | |
24 #define MPLAYER_MMAP_H | |
25 | |
26164
32ef0c7cb949
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
26076
diff
changeset
|
26 #include <sys/types.h> |
32ef0c7cb949
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
26076
diff
changeset
|
27 |
26076 | 28 /* |
29 * Protections are chosen from these bits, or-ed together | |
30 */ | |
31 #define PROT_NONE 0x00 /* no permissions */ | |
32 #define PROT_READ 0x01 /* pages can be read */ | |
33 #define PROT_WRITE 0x02 /* pages can be written */ | |
34 #define PROT_EXEC 0x04 /* pages can be executed */ | |
35 | |
36 /* | |
37 * Flags contain sharing type and options. | |
38 * Sharing types; choose one. | |
39 */ | |
40 #define MAP_SHARED 0x0001 /* share changes */ | |
41 #define MAP_PRIVATE 0x0002 /* changes are private */ | |
42 #define MAP_FIXED 0x0010 /* map addr must be exactly as requested */ | |
43 | |
44 /* | |
45 * Mapping type | |
46 */ | |
47 #define MAP_ANON 0x1000 /* allocated from memory, swap space */ | |
48 | |
49 /* MAP_FAILED is defined in config.h */ | |
50 | |
51 #ifndef _MMAP_DECLARED | |
52 #define _MMAP_DECLARED | |
53 void *mmap( void *addr, size_t len, int prot, int flags, int fildes, off_t off ); | |
54 #endif | |
55 int munmap( void *addr, size_t len ); | |
56 int mprotect( void *addr, size_t len, int prot ); | |
57 | |
58 #endif /* MPLAYER_MMAP_H */ |