1 /*
2  * Copyright (C) 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ART_LIBARTBASE_BASE_MMAN_H_
18 #define ART_LIBARTBASE_BASE_MMAN_H_
19 
20 #ifdef _WIN32
21 
22 // There is no sys/mman.h in mingw.
23 
24 #define PROT_READ      0x1
25 #define PROT_WRITE     0x2
26 #define PROT_EXEC      0x4
27 #define PROT_NONE      0x0
28 
29 #define MAP_SHARED     0x01
30 #define MAP_PRIVATE    0x02
31 
32 #define MAP_FAILED     ((void*) -1)
33 #define MAP_FIXED      0x10
34 #define MAP_ANONYMOUS  0x20
35 
36 #else
37 
38 #include <sys/mman.h>
39 
40 #endif
41 
42 
43 #endif  // ART_LIBARTBASE_BASE_MMAN_H_
44