[Vm-dev] Why StandardFileStream fileID is 16 bytes in Linux while 20 bytes in OSX?

Eliot Miranda eliot.miranda at gmail.com
Sat Jan 9 15:45:31 UTC 2016


My guess is that the VM is being built, wrongly, without 64-bit file sizes.  In the Squeak VM this is definitely not 16 bytes.

_,,,^..^,,,_ (phone)

> On Jan 9, 2016, at 7:06 AM, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
> 
> Hi guys,
> 
> In OSX, StandardFileStream byteID size is 20, while in Linux, it is 16. I see this definition in  ./Cross/plugins/FilePlugin/FilePlugin.h 
> 
> 
> /* squeak file record; see sqFilePrims.c for details */
> typedef struct {
>   int                    sessionID;     /* ikp: must be first */
>   void                  *file;
>   squeakFileOffsetType   fileSize;      /* 64-bits we hope. */
> #if defined(ACORN)
> // ACORN has to have 'lastOp' as at least a 32 bit field in order to work
>   int lastOp; // actually used to save file position
>   char writable;
>   char lastChar;
>   char isStdioStream;
> #else
>   char                   writable;
>   char                   lastOp; /* 0 = uncommitted, 1 = read, 2 = write */
>   char                   lastChar;
>   char                   isStdioStream;
> #endif
> } SQFile;
> 
> And I see no override from UNIX platform code. So...how can that be 16 bytes in Linux?
> 
> Thanks in advance, 
> 
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160109/3ba55351/attachment-0001.htm


More information about the Vm-dev mailing list