shm.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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#include <cerrno>
29
30extern "C" {
31
32 inline int
33 shm_open(const char *, int, mode_t) {
34 errno = ENOTSUP;
35 return -1;
36 }
37
38 inline int
39 shm_unlink(const char *) {
40 errno = ENOTSUP;
41 return -1;
42 }
43
44} /* extern "C" */
45
46#endif /* HAVE_SHM */
47
50
51#endif /* SQUID_COMPAT_CPU_H */
52
bool shm_portable_segment_name_is_path()
Determines whether segment names are iterpreted as full file paths.
Definition: shm.cc:23
int shm_unlink(const char *)
Definition: shm.h:39
int shm_open(const char *, int, mode_t)
Definition: shm.h:33
unsigned short mode_t
Definition: types.h:144

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors