[Vm-dev] Why StandardFileStream fileID is 16 bytes in Linux while
20 bytes in OSX?
tim Rowledge
tim at rowledge.org
Sat Jan 9 23:37:16 UTC 2016
> On 09-01-2016, at 2:46 PM, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
> ou said that in the SqueakVM it is 64 bits. By SqueakVM you mean your Cog (and not our Pharo builds) or you mean the old interpreter VM?
>
> Should I open an issue somewhere so that we can make it 64 bits file size?
It’s been able to be 64bits for a long while now - I remember having to futz around with it on the RISC OS branch *ages* ago, before Cog. Ah, in fact I see it was 2002.
In your sqPlatformSpecific.h file you ought to be seeing
typedef off_t squeakFileOffsetType;
or maybe
#ifdef _MSC_VER
#define squeakFileOffsetType __int64
#else
#define squeakFileOffsetType unsigned long long
#endif
etc. For unixes the off_t would usually be a long long ie 64 bits. It’s tied to the possible size of files so on any OS that allows >4Gb file size you’d expect to have a type used for pile pointers that handles that.
If you have squeakFileOffsetType anything other than a 64bit type, something is wrong. If it is being defined as a 32bit size than I would anticipate warning (at least) from the C compiler when tackling the file primitives; look at sqFilePluginBasicPrims.c>sqFileGetPosition() for example.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Gotta run, the cat's caught in the printer.
More information about the Vm-dev
mailing list