diff options
author | Max Horn | 2006-02-20 16:03:48 +0000 |
---|---|---|
committer | Max Horn | 2006-02-20 16:03:48 +0000 |
commit | 6176252117fccfbd315915b671a867550df6b4b5 (patch) | |
tree | 69577e8e6a86f59f5fe8ef2441673de933a0618f /engines | |
parent | d87e5d6094a46749169b9659a1f40864240ff266 (diff) | |
download | scummvm-rg350-6176252117fccfbd315915b671a867550df6b4b5.tar.gz scummvm-rg350-6176252117fccfbd315915b671a867550df6b4b5.tar.bz2 scummvm-rg350-6176252117fccfbd315915b671a867550df6b4b5.zip |
Use ptrdiff_t from stddef.h for our offsetof-clone (this should reduce warnings on e.g. the PS2, but may cause problems on systems that are missing this type/header. Please contact me if this causes problems on your port)
svn-id: r20793
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/saveload.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h index 08ecf0258e..8af3cec46c 100644 --- a/engines/scumm/saveload.h +++ b/engines/scumm/saveload.h @@ -24,6 +24,7 @@ #define SAVELOAD_H #include "common/scummsys.h" +#include <stddef.h> namespace Common { class InSaveFile; @@ -72,7 +73,7 @@ namespace Scumm { * current reality (many of our complex structs are non-POD; for an explanation of * what POD means refer to http://www-cpd.fnal.gov/personal/wb/boost/ISOcxx/doc/POD.html) */ -#define OFFS(type,item) (((long)(&((type*)42)->type::item))-42) +#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42) /** * Similar to the OFFS macro, this macro computes the size (in bytes) of a |