]> git.ipfire.org Git - thirdparty/squid.git/blame - compat/valgrind.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / valgrind.h
CommitLineData
37be9888 1/*
bde978a6 2 * Copyright (C) 1996-2015 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
f04e1182
AJ
9#ifndef SQUID_VALGRIND_H
10#define SQUID_VALGRIND_H
11
12/****************************************************************************
13 *--------------------------------------------------------------------------*
14 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
15 *--------------------------------------------------------------------------*
16 ****************************************************************************/
17
18/*
19 * valgrind debug support
20 */
21#if WITH_VALGRIND
5cf3b000 22# include <valgrind/memcheck.h>
f04e1182 23/* A little glue for older valgrind version prior to 3.2.0 */
5cf3b000
AJ
24# ifndef VALGRIND_MAKE_MEM_NOACCESS
25# define VALGRIND_MAKE_MEM_NOACCESS VALGRIND_MAKE_NOACCESS
26# define VALGRIND_MAKE_MEM_UNDEFINED VALGRIND_MAKE_WRITABLE
27# define VALGRIND_MAKE_MEM_DEFINED VALGRIND_MAKE_READABLE
28# define VALGRIND_CHECK_MEM_IS_ADDRESSABLE VALGRIND_CHECK_WRITABLE
29# else
30# undef VALGRIND_MAKE_NOACCESS
31# undef VALGRIND_MAKE_WRITABLE
32# undef VALGRIND_MAKE_READABLE
33# endif
f04e1182 34#else
5cf3b000
AJ
35# define VALGRIND_MAKE_MEM_NOACCESS(a,b) (0)
36# define VALGRIND_MAKE_MEM_UNDEFINED(a,b) (0)
37# define VALGRIND_MAKE_MEM_DEFINED(a,b) (0)
38# define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,b) (0)
39# define VALGRIND_CHECK_MEM_IS_DEFINED(a,b) (0)
40# define VALGRIND_MALLOCLIKE_BLOCK(a,b,c,d)
41# define VALGRIND_FREELIKE_BLOCK(a,b)
42# define RUNNING_ON_VALGRIND 0
f04e1182
AJ
43#endif /* WITH_VALGRIND */
44
45#endif /* SQUID_CONFIG_H */
f53969cc 46