/[LeafOK_CVS]/pvpgn-1.7.4/src/compat/mmap.h
ViewVC logotype

Annotation of /pvpgn-1.7.4/src/compat/mmap.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Jun 6 03:41:38 2006 UTC (19 years, 9 months ago) by sysadm
CVS Tags: pvpgn_1-7-4-0_MIL
Branch point for: GNU, MAIN
Content type: text/x-chdr
Initial revision

1 sysadm 1.1 /*
2     * Copyright (C) 2003 Mihai RUSU (dizzy@roedu.net)
3     *
4     * This program is free software; you can redistribute it and/or
5     * modify it under the terms of the GNU General Public License
6     * as published by the Free Software Foundation; either version 2
7     * of the License, or (at your option) any later version.
8     *
9     * This program 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.
13     *
14     * You should have received a copy of the GNU General Public License
15     * along with this program; if not, write to the Free Software
16     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17     */
18     #ifndef INCLUDED_PMMAP_PROTOS
19     #define INCLUDED_PMMAP_PROTOS
20    
21     #ifdef HAVE_SYS_TYPES_H
22     # include <sys/types.h>
23     #endif
24     #ifdef HAVE_SYS_MMAN_H
25     # include <sys/mman.h>
26     #endif
27     #ifdef __BORLANDC__
28     # include <io.h>
29     #endif
30    
31     #ifndef PROT_NONE
32     #define PROT_NONE 0x00 /* no permissions */
33     #endif
34     #ifndef PROT_READ
35     #define PROT_READ 0x01 /* pages can be read */
36     #endif
37     #ifndef PROT_WRITE
38     #define PROT_WRITE 0x02 /* pages can be written */
39     #endif
40     #ifndef PROT_EXEC
41     #define PROT_EXEC 0x04 /* pages can be executed */
42     #endif
43     #ifndef MAP_SHARED
44     #define MAP_SHARED 0x0001 /* share changes */
45     #endif
46     #ifndef MAP_PRIVATE
47     #define MAP_PRIVATE 0x0002 /* changes are private */
48     #endif
49     #ifndef MAP_COPY
50     #define MAP_COPY MAP_PRIVATE /* Obsolete */
51     #endif
52     #ifndef MAP_FAILED
53     #define MAP_FAILED ((void *)-1)
54     #endif
55    
56     #ifdef HAVE_MMAP
57     #define pmmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f)
58     #define pmunmap(a,b) munmap(a,b)
59     #else
60    
61     extern void * pmmap(void *addr, unsigned len, int prot, int flags, int fd, unsigned offset);
62     extern int pmunmap(void *addr, unsigned len);
63    
64     #endif
65    
66     #endif

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1