Re: Open Source, then...?

new topic     » goto parent     » topic index » view thread      » older message » newer message

alban read wrote:
> 
> Jeremy Cowgar wrote:
> > 
> > Yes, see The Archive. I believe it has a bug though in the Dynamic Library
> > support.
> > I tried wrapping libdbi and it fails randomly. Wrapping pgsql did the same
> > thing,
> > random weirdness.
> > 
> > Jeremy
> > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>
> 
> About OSX Intel components random dynamic library chaos..
> 
> Sorry - the random chaos in dynamic library calls is being caused by at least
> two problems.
> One is that Mac OSX (Intel) expects each half of a double to be copied the
> opposite
> way around 
> to the way you would push them onto a stack.  This may makes sense since they
> are being copied 
> on rather than pushed down. That is very easy to do as it doesnt change the
> function much. 
> 
> 
> The other problem is that the entire argument list needs to be reversed.
> e.g If you called mul(22/7) it would end up doing mul(7/22) which doesnt
> matter,
> but div(22/7) 
> compared to div(7/22) would matter quite a lot :)
> 
> Things seem to work a lot better if the arguments in the list are reversed
> then
> copied.
> I have tested copying the arguments into a buffer and then copying them out
> of the buffer 
> in reverse order, this was easy to add to the call_c function. 
> It seems wrong to copy arguments out of the sequence twice.
> I thought about reversing the argument sequence - but that may be slower if
> anything.
> Reading the sequence of arguments in reverse would work, if that was easy to
> do.
> Another option would be to work out the complete argument list size (in
> bytes),
> add it the 
> pointer then copy the arguments on in the reverse direction, decrementing the
> pointer as you
> do it. I dont know what is likely to be fastest and most reliable.

Alban:

OSX was written originally for the PowerPC.
The Euphoria source code was written for Intel X86 PC.

PowerPC stores the most significant byte first while x86 stores the least
significant byte first. Byte ordering is also referred to as endian format;
PowerPC uses big endian, and x86 uses little endian.

You would need to write the code for the type of MAC OSX that you are
running on or create the code for Universal Binaries on Mac OS X.

Here is a link that might interest you.

http://developer.apple.com/macosx/adoptinguniversalbinaries.html

Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu