[self-interest] Re: Linux Socket Support

Russell Allen mail at russell-allen.com
Wed Jul 22 01:07:19 UTC 2009

You are the perfect open source user - you find a bug, work out the  
issue and provide a patch all within a single day! :)

If you can send me an email at mail at russell-allen.com saying that

(a) you irrevocably licence your changes under the Self licence at



(b) you are happy for me to add the changes to the github repo.

then I'll pull your changes across to the main repository and add you  
to the AUTHORS file.


If you don't want to edit .self files directly, you need to use the  
transporter.  A good place to start is


I should do a screencast at some stage though, as it's better to see  
it in action then read about it.

- Russell

On 21/07/2009, at 11:51 PM, Chris Double wrote:

> I found the issue. The problem is in vm/src/unix/prims/unixPrims.cpp.
> The address in set_sockaddr_in isn't copied under Linux. The fix is:
> memcpy((char*) &aLong, address, sizeof(long));
> memset(a.sin_zero, 0, sizeof(a.sin_zero));
> I've put a git repository up with the following fixes:
> 1) The fix for the above issue
> 2) Added socketConstants for Linux
> 3) Fix to get the build working under Linux - uses flex, and modifies
> an include header line for <new>.
> Note that for (2) I manually edited objects/core/unix.self. I'm not
> sure if this is the right way to do it. I originally did the change
> under the UI but didn't know how to file it out such that it will be
> recreated when bootstrapping a new image.
> The changes are in my fork of the github self repository in the master
> branch: git://github.com/doublec/self.git
> To test it you can file in the web browser code:
> bootstrap read: 'webBrowser' From: 'applications/webBrowser'
> Then in a shell:
> 'http://www.w3.org/' asURL getPageForUser
> Unfortunately it shows an error page since this browser doesn't
> support HTTP 1.1. Just about every webserver around uses virtual hosts
> and it doesn't send a Host: header. But the error page is the HTML
> served from the W3C website so it shows the browser and socket code
> working.
> Chris.
> -- 
> http://www.bluishcoder.co.nz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20090722/d58a133d/attachment.html>

More information about the Self-interest mailing list