From: Nicholas Nethercote Date: Thu, 26 Feb 2009 21:17:39 +0000 (+0000) Subject: Make the VKI_PAGE_SIZE conditional match that in m_vki.c. X-Git-Tag: svn/VALGRIND_3_5_0~915 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3bd63f485cef9a815e37fe0db02a22919205ee02;p=thirdparty%2Fvalgrind.git Make the VKI_PAGE_SIZE conditional match that in m_vki.c. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9276 --- diff --git a/memcheck/tests/unit_libcbase.c b/memcheck/tests/unit_libcbase.c index 2ce9044415..fab5d2865f 100644 --- a/memcheck/tests/unit_libcbase.c +++ b/memcheck/tests/unit_libcbase.c @@ -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 @@ void test_VG_STREQN(void) 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) );