2010/1/12 Andreas Raab andreas.raab@gmx.de:
Igor Stasenko wrote:
2010/1/12 Andreas Raab andreas.raab@gmx.de:
Igor Stasenko wrote:
Btw, about that function. Its using a squeakFileOffsetType, which is platform specific, and i had hard times trying to deal with right header inclusion order imposing dependency of interpreter from platform code, which, IMO should be avoided. I propose to change it to typedef unsigned long long vmFileOffsetType; and use this type instead.
I'm not sure if MSVC supports long long nowadays. It didn't used to - it used to require __int64 which is why the definition of squeakFileOffsetType is external.
There should be an ANSI long long integer type.
There's a C99 long long type (does MSVC implement C99?) but for example no C++ long long type. See also:
http://bytes.com/topic/c/answers/63790-__int64-vs-long-long
I'd strongly suggest leaving this in a way that allows for external redefinition. You could have something that says:
#ifndef LONGLONG_NOT_SUPPORTED typedef long long squeakFileOffsetType #endif
Oh, well, then how about
typedef struct { long hi; long lo; } squeakFileOffsetType;
let me restate what i intend to achieve: i just want to make interp.c to be independent from compiler-specific idiosyncrasies , and from platform-specific types.
Cheers, - Andreas