Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / native_client_sdk / src / libraries / nacl_io / osmman.h
blobd587f335faff89ae9b8d5ee177708b62ec8e3ea0
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */
5 #ifndef LIBRARIES_NACL_IO_OSMMAN_H
6 #define LIBRARIES_NACL_IO_OSMMAN_H
8 #if defined(WIN32)
10 #define PROT_READ 0x1
11 #define PROT_WRITE 0x2
12 #define PROT_EXEC 0x4
13 #define PROT_NONE 0x0
15 #define MAP_SHARED 0x01
16 #define MAP_PRIVATE 0x02
17 #define MAP_FIXED 0x10
18 #define MAP_ANONYMOUS 0x20
19 #define MAP_FAILED (void*)-1
21 #else
23 #include <sys/mman.h>
25 #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
26 #define MAP_ANONYMOUS MAP_ANON
27 #endif
29 #endif
31 #endif /* LIBRARIES_NACL_IO_OSMMAN_H */