diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2003-03-15 19:12:43 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2003-03-15 19:12:43 +0000 |
commit | 6591dc250c889506c5f6e1ccd939634de5a3ab74 (patch) | |
tree | 502306684c011c3cc6fa7889d3e6b2b24f225b1e /include/valgrind.h | |
parent | 9d28c95a810b26cf0aeacaa3b62014dd24c0c206 (diff) | |
download | valgrind-6591dc250c889506c5f6e1ccd939634de5a3ab74.tar.gz |
A little cpp magic to cause compilation to fail if valgrind.h is included
directly into sources (it should not be, and was causing people problems).
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1456 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'include/valgrind.h')
-rw-r--r-- | include/valgrind.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/valgrind.h b/include/valgrind.h index dad18ee65..e236245d4 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -60,6 +60,17 @@ #define __VALGRIND_H +#ifndef __VALGRIND_SOMESKIN_H +#warning For valgrind versions 1.9.0 and after, +#warning you should not include valgrind.h directly. +#warning Instead include the .h relevant to the skin +#warning you want to use. For most people this means +#warning you need to include memcheck.h instead of +#warning valgrind.h. +#error Compilation of your source will now abort. +#endif + + /* This file is for inclusion into client (your!) code. You can use these macros to manipulate and query Valgrind's |