[Vm-dev] Porting to Alpine Linux aarch64 Raspberry Pi 3B

ken.dickey at whidbey.com ken.dickey at whidbey.com
Wed Dec 4 15:25:00 UTC 2019

> I would try two things.  One is to find out where FILE is defined by
> searching the system's include files.  There has to be some kind of
> definition because e.g. open answers a FILE *.  So one /has/ to be able 
> to
> write e.g.
>   FILE *f = open("foo.txt",...
> and that's all the code is doing, trying to declare a small array of 
> *'s.

Ya.  Attached.

The code array uses 'FILE', not 'FILE *', btw.
   static FILE stdoutStack[STDOUT_STACK_SZ];

Hey, I once used '***' in EPROM boot code -- because I had to!

My ol' brain has now rotted and no longer does cdecl.  Back to the 

I am just confused by this. I don't know enough memory usage context to 
safely convert to 'FILE *'

> The second thing would be to commit a change to sqVirtualMachine.c 
> which
> simply ifdef's out push/popOutputFile if some manifest constant, such 
> as
> CANT_USE_FILE_STAR or DONT_USE_FILE_STAR is defined in the makefile (so
> that files are compiled with -DDONT_USE_FILE_STAR=1 or some such).

I will continue to play around.  Thanks!

Part of my confusion is lack of understanding as to why pushOutputFile() 
side-effects stdout rather than using a global 'output' variable 
   *stdout = *output
Just initialize 'output' global on startup an side effect that.

Thanks again much for all,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-def.txt
Type: text/x-c
Size: 839 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191204/79b7872b/attachment.bin>

More information about the Vm-dev mailing list