]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Rename preprocessor macro __VALGRIND__ to __VALGRIND_MAJOR__ and add
authorJulian Seward <jseward@acm.org>
Mon, 19 Apr 2010 08:43:26 +0000 (08:43 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 19 Apr 2010 08:43:26 +0000 (08:43 +0000)
comments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11105

docs/internals/release-HOWTO.txt
include/valgrind.h

index 54b98a042be55fd465b798bc400fc66dcf9d94f8..df2152232d4807ba8ba4ee7e9467b5ad83ceafee 100644 (file)
@@ -21,6 +21,9 @@ First of all:
   release date probably won't be known yet, updating it is in the list below
   of tasks for the official release.)
 
+- Make sure __VALGRIND_MAJOR__ and __VALGRIND_MINOR__ are correct
+  for the release.  (include/valgrind.h)
+
 - Write release notes, add to NEWS.  Include a list of fixed bugs from
   Bugzilla.  It's unclear how to do this consistently.  The approach
   taken for 3.0.0 was to go to this page in KDE's bugzilla:
index 65993fbb32f004d566d915197c5b992bbbb8c140..43e3657a568f38d0987455346c406bb4ec14fd60 100644 (file)
 /* ------------------------------------------------------------------ */
 
 /* Specify Valgrind's version number, so that user code can
-   conditionally compile based on our version number. */
-#define __VALGRIND__          3
+   conditionally compile based on our version number.  Note that these
+   were introduced at version 3.6 and so do not exist in version 3.5
+   or earlier.  The recommended way to use them to check for "version
+   X.Y or later" is (eg)
+
+#if defined(__VALGRIND_MAJOR__) && defined(__VALGRIND_MINOR__)   \
+    && (__VALGRIND_MAJOR__ > 3                                   \
+        || (__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 6))
+*/
+#define __VALGRIND_MAJOR__    3
 #define __VALGRIND_MINOR__    6