|
From: <sv...@va...> - 2009-02-26 21:17:50
|
Author: njn
Date: 2009-02-26 21:17:39 +0000 (Thu, 26 Feb 2009)
New Revision: 9276
Log:
Make the VKI_PAGE_SIZE conditional match that in m_vki.c.
Modified:
trunk/memcheck/tests/unit_libcbase.c
Modified: trunk/memcheck/tests/unit_libcbase.c
===================================================================
--- trunk/memcheck/tests/unit_libcbase.c 2009-02-26 17:50:14 UTC (rev 9275)
+++ trunk/memcheck/tests/unit_libcbase.c 2009-02-26 21:17:39 UTC (rev 9276)
@@ -11,11 +11,6 @@
if (!x) { fprintf(stderr, "failure: %s:%d\n", __FILE__, __LINE__); }
-#if ! defined(VKI_PAGE_SIZE)
-unsigned long VKI_PAGE_SIZE = VKI_MAX_PAGE_SIZE;
-#endif
-
-
void test_VG_STREQ(void)
{
CHECK( ! VG_STREQ(NULL, NULL) ); // Nb: strcmp() considers these equal
@@ -59,6 +54,11 @@
CHECK( VG_STREQN(3, "abcd", "abce"));
}
+// On PPC/Linux VKI_PAGE_SIZE is a variable, not a macro.
+#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+unsigned long VKI_PAGE_SIZE = 1UL << 12;
+#endif
+
void test_VG_IS_XYZ_ALIGNED(void)
{
CHECK( VG_IS_2_ALIGNED(0x0) );
|