shm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
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 
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 
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  }
45 
46 } /* extern "C" */
47 
48 #endif /* HAVE_SHM */
49 
52 
53 #endif /* SQUID_COMPAT_CPU_H */
54 
int shm_unlink(const char *)
Definition: shm.h:41
bool shm_portable_segment_name_is_path()
Determines whether segment names are iterpreted as full file paths.
Definition: shm.cc:23
int shm_open(const char *, int, mode_t)
Definition: shm.h:35
unsigned short mode_t
Definition: types.h:150

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors