|
From: <sv...@va...> - 2010-04-19 08:53:16
|
Author: sewardj Date: 2010-04-19 09:43:26 +0100 (Mon, 19 Apr 2010) New Revision: 11105 Log: Rename preprocessor macro __VALGRIND__ to __VALGRIND_MAJOR__ and add comments. Modified: trunk/docs/internals/release-HOWTO.txt trunk/include/valgrind.h Modified: trunk/docs/internals/release-HOWTO.txt =================================================================== --- trunk/docs/internals/release-HOWTO.txt 2010-04-12 20:56:56 UTC (rev 11104) +++ trunk/docs/internals/release-HOWTO.txt 2010-04-19 08:43:26 UTC (rev 11105) @@ -21,6 +21,9 @@ 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: Modified: trunk/include/valgrind.h =================================================================== --- trunk/include/valgrind.h 2010-04-12 20:56:56 UTC (rev 11104) +++ trunk/include/valgrind.h 2010-04-19 08:43:26 UTC (rev 11105) @@ -79,8 +79,16 @@ /* ------------------------------------------------------------------ */ /* 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 |