]>
Commit | Line | Data |
---|---|---|
37be9888 | 1 | /* |
ef57eb7b | 2 | * Copyright (C) 1996-2016 The Squid Software Foundation and contributors |
37be9888 AJ |
3 | * |
4 | * Squid software is distributed under GPLv2+ license and includes | |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
7 | */ | |
8 | ||
c975f532 DK |
9 | #ifndef SQUID_COMPAT_SHM_H |
10 | #define SQUID_COMPAT_SHM_H | |
11 | ||
12 | #if HAVE_SHM | |
13 | ||
14 | #if HAVE_SYS_STAT_H | |
15 | #include <sys/stat.h> /* for mode constants */ | |
16 | #endif | |
17 | ||
18 | #if HAVE_FCNTL_H | |
19 | #include <fcntl.h> /* for O_* constants */ | |
20 | #endif | |
21 | ||
22 | #if HAVE_SYS_MMAN_H | |
23 | #include <sys/mman.h> | |
24 | #endif | |
25 | ||
26 | #else /* HAVE_SHM */ | |
27 | ||
28 | #if HAVE_ERRNO_H | |
29 | #include <errno.h> | |
30 | #endif | |
31 | ||
32 | extern "C" { | |
33 | ||
9199139f AR |
34 | inline int |
35 | shm_open(const char *, int, mode_t) { | |
36 | errno = ENOTSUP; | |
37 | return -1; | |
38 | } | |
39 | ||
40 | inline int | |
41 | shm_unlink(const char *) { | |
42 | errno = ENOTSUP; | |
43 | return -1; | |
44 | } | |
c975f532 DK |
45 | |
46 | } /* extern "C" */ | |
47 | ||
48 | #endif /* HAVE_SHM */ | |
49 | ||
ef8de464 AR |
50 | /// Determines whether segment names are iterpreted as full file paths. |
51 | bool shm_portable_segment_name_is_path(); | |
52 | ||
c975f532 | 53 | #endif /* SQUID_COMPAT_CPU_H */ |
f53969cc | 54 |