]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix compile warnings on 32-bit platforms, hopefully without breaking
authorJulian Seward <jseward@acm.org>
Mon, 2 May 2005 12:53:38 +0000 (12:53 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 2 May 2005 12:53:38 +0000 (12:53 +0000)
64-bit platforms.  (a.k.a The Portability Game)

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

memcheck/mc_main.c

index a33571c6e3073d16a8de5e76cd92a9eaf53d0dc3..ca4a36f54a54b935312bc94d3b9264728f979498 100644 (file)
 */
 #define VG_DEBUG_MEMORY 0
 
-
-typedef enum {
-   MC_Ok = 5, MC_AddrErr = 6, MC_ValueErr = 7
-} MC_ReadResult;
-
 #define DEBUG(fmt, args...) //VG_(printf)(fmt, ## args)
 
 
@@ -116,7 +111,7 @@ typedef enum {
 
 /* Only change this.  N_PRIMARY_MAP *must* be a power of 2. */
 
-#if VEX_HOST_WORDSIZE == 4
+#if VG_WORDSIZE == 4
 
 /* cover the entire address space */
 #  define N_PRIMARY_BITS  16
@@ -131,7 +126,7 @@ typedef enum {
 
 
 /* Do not change this. */
-#define N_PRIMARY_MAP  (1ULL << N_PRIMARY_BITS)
+#define N_PRIMARY_MAP  ( ((UWord)1) << N_PRIMARY_BITS)
 
 /* Do not change this. */
 #define MAX_PRIMARY_ADDRESS (Addr)((((Addr)65536) * N_PRIMARY_MAP)-1)
@@ -918,6 +913,15 @@ SP_UPDATE_HANDLERS ( make_aligned_word32_writable,
 /*--- Checking memory                                      ---*/
 /*------------------------------------------------------------*/
 
+typedef 
+   enum {
+      MC_Ok = 5, 
+      MC_AddrErr = 6, 
+      MC_ValueErr = 7
+   } 
+   MC_ReadResult;
+
+
 /* Check permissions for address range.  If inadequate permissions
    exist, *bad_addr is set to the offending address, so the caller can
    know what it is. */