[Vm-dev] other 64bit changes, header files, and smalltalk
Andreas Raab
andreas.raab at gmx.de
Tue Jan 12 16:42:33 UTC 2010
Igor Stasenko wrote:
>> 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;
Could do, but that's not the same as a native 64 bit int on little
endian machines so all code using squeakFileOffsetType needs to be
rewritten to use struct accessors. Not sure if that's worth it.
> 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.
I'm not sure what purpose this serves. The compiler will fail instantly
for an absent definition of squeakFileOffsetType so it's not that
there's any doubt about what you need to do if you port to a new
platform. Let's be pragmatic here - as much as I agree that having
compiler specific stuff in there isn't the best choice, there are some
situations where the alternative is needlessly complex. This seems to be
one of those.
Cheers,
- Andreas
More information about the Vm-dev
mailing list