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