Trouble building unix VM for OSX

John M McIntosh johnmci at
Sun Jan 15 04:31:37 UTC 2006

Well that will work but it's not correct because you are taking an  
macroman character based  file path, and saying it's a UTF-8  
character set based file name.
Those are not the same.

As long as you use generic a-z,0-9 etc in your file names you find it  
will work. However an "å"  or other more interesting character would  
cause disaster.

I *THINK* it's this routine in sqUnixCharConv.c  you need to use  
instead of doing the strncpy.

void sqFilenameFromString(char *uxName, sqInt sqNameIndex, int  
   /*xxx BUG: lots of code generate from the image assumes 1000 chars  
max path len */
   sq2uxPath(pointerForOop(sqNameIndex), sqNameLength, uxName, 1000, 1);

Or maybe it's the
sq2uxPath(sqNameIndex, sqNameLength, uxName, 1000, 1);
since I don't know what pointerForOop(sqNameIndex)  does, it that a  
cast, or is it getting a pointer from sqNameIndex because it's  an oops?

On 14-Jan-06, at 7:14 PM, David T. Lewis wrote:

> On Sat, Jan 14, 2006 at 07:35:35PM -0600, Alan Sibley wrote:
>> Hey folks,
>> I'm trying to build the latest unix/osx from svn rev. 1290.
>> I think I have the latest VMMaker (2.8b5-64B).
>> I'm compiling but not linking... missing sqGetFilenameFromString.
>> It's referenced from ioFilenamefromStringofLengthresolveAliases in
>> interp.c.
>> I grepped around and didn't find it... heeeeelp ;)
> This is a function that is not yet fully implemented in the
> platforms sources. When building a Linux VM, I added the
> following as a workaround (I don't know if this will work
> for OS X):
> /* A default implementation for unix */
> sqInt sqGetFilenameFromString(char *aCharBuffer, char  
> *aFilenameString,
>     sqInt filenameLength, sqInt aBoolean) {
>   strncpy(aCharBuffer, aFilenameString, filenameLength);
>   aCharBuffer[filenameLength] = 0;
> }
> Dave

John M. McIntosh <johnmci at> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.

More information about the Vm-dev mailing list