Add macro definitions that make it possible to do cpu/os/both

ifdeffery in a sane way where it's absolutely unavoidable.  When
building the core, eg on amd64-linux, the following preprocessor
symbols are defined:

   VGA_amd64
   VGO_linux
   VGP_amd64_linux

etc on other platforms.

Also, include/basic_types.h now defines VG_WORDSIZE and this is what
should be used for ifdefs that need to know the host word size.

ifdefs based on the C compilers built-ins such as __amd64__ etc
are deprecated and will be done away with.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3590
This commit is contained in:
Julian Seward
2005-05-02 10:25:34 +00:00
parent 2275f4f69b
commit 5496e4553b
3 changed files with 11 additions and 3 deletions

View File

@@ -57,6 +57,11 @@ typedef Word SSizeT; // 32 64
typedef Word OffT; // 32 64
/* This is going to be either 4 or 8. */
#define VG_WORDSIZE VEX_HOST_WORDSIZE
/* ---------------------------------------------------------------------
non-builtin types
------------------------------------------------------------------ */