|
From: <sv...@va...> - 2005-05-02 12:53:41
|
Author: sewardj
Date: 2005-05-02 13:53:38 +0100 (Mon, 02 May 2005)
New Revision: 3596
Modified:
trunk/memcheck/mc_main.c
Log:
Fix compile warnings on 32-bit platforms, hopefully without breaking
64-bit platforms. (a.k.a The Portability Game)
Modified: trunk/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_main.c 2005-05-02 12:25:13 UTC (rev 3595)
+++ trunk/memcheck/mc_main.c 2005-05-02 12:53:38 UTC (rev 3596)
@@ -50,11 +50,6 @@
*/
#define VG_DEBUG_MEMORY 0
=20
-
-typedef enum {
- MC_Ok =3D 5, MC_AddrErr =3D 6, MC_ValueErr =3D 7
-} MC_ReadResult;
-
#define DEBUG(fmt, args...) //VG_(printf)(fmt, ## args)
=20
=20
@@ -116,7 +111,7 @@
=20
/* Only change this. N_PRIMARY_MAP *must* be a power of 2. */
=20
-#if VEX_HOST_WORDSIZE =3D=3D 4
+#if VG_WORDSIZE =3D=3D 4
=20
/* cover the entire address space */
# define N_PRIMARY_BITS 16
@@ -131,7 +126,7 @@
=20
=20
/* Do not change this. */
-#define N_PRIMARY_MAP (1ULL << N_PRIMARY_BITS)
+#define N_PRIMARY_MAP ( ((UWord)1) << N_PRIMARY_BITS)
=20
/* Do not change this. */
#define MAX_PRIMARY_ADDRESS (Addr)((((Addr)65536) * N_PRIMARY_MAP)-1)
@@ -918,6 +913,15 @@
/*--- Checking memory ---*/
/*------------------------------------------------------------*/
=20
+typedef=20
+ enum {
+ MC_Ok =3D 5,=20
+ MC_AddrErr =3D 6,=20
+ MC_ValueErr =3D 7
+ }=20
+ 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. */
|