]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
A little cpp magic to cause compilation to fail if valgrind.h is included
authorJulian Seward <jseward@acm.org>
Sat, 15 Mar 2003 19:12:43 +0000 (19:12 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 15 Mar 2003 19:12:43 +0000 (19:12 +0000)
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

helgrind/helgrind.h
include/valgrind.h
memcheck/memcheck.h

index 2b25d47f49e65d7cd75e5c93fce6ce87f19acb5b..b2f61d40a2133c4b71d14410b6d7ef60a524aef7 100644 (file)
@@ -57,6 +57,7 @@
 #ifndef __HELGRIND_H
 #define __HELGRIND_H
 
+#define __VALGRIND_SOMESKIN_H
 #include "valgrind.h"
 
 typedef
index dad18ee6503bcd0dc9dbf05b3da02819cf7386c8..e236245d4587ffbe91ade187c6b5431ef06ddecb 100644 (file)
 #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 
index 0dc5448ffd3ad2b3dc37277ecea7ebb1e8a58ceb..151797a9f55bdd9425101f01da69575701048d21 100644 (file)
@@ -68,6 +68,7 @@
    See comment near the top of valgrind.h on how to use them.
 */
 
+#define __VALGRIND_SOMESKIN_H
 #include "valgrind.h"
 
 typedef