]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/shm.h
merge from SslServerCertValidator r12332
[thirdparty/squid.git] / compat / shm.h
1 #ifndef SQUID_COMPAT_SHM_H
2 #define SQUID_COMPAT_SHM_H
3
4 #if HAVE_SHM
5
6 #if HAVE_SYS_STAT_H
7 #include <sys/stat.h> /* for mode constants */
8 #endif
9
10 #if HAVE_FCNTL_H
11 #include <fcntl.h> /* for O_* constants */
12 #endif
13
14 #if HAVE_SYS_MMAN_H
15 #include <sys/mman.h>
16 #endif
17
18 #else /* HAVE_SHM */
19
20 #if HAVE_ERRNO_H
21 #include <errno.h>
22 #endif
23
24 extern "C" {
25
26 inline int
27 shm_open(const char *, int, mode_t) {
28 errno = ENOTSUP;
29 return -1;
30 }
31
32 inline int
33 shm_unlink(const char *) {
34 errno = ENOTSUP;
35 return -1;
36 }
37
38 } /* extern "C" */
39
40 #endif /* HAVE_SHM */
41
42 /// Determines whether segment names are iterpreted as full file paths.
43 bool shm_portable_segment_name_is_path();
44
45 #endif /* SQUID_COMPAT_CPU_H */