[fpc-devel] Safecall on Linux (and other unices?)
joshyfun at gmail.com
Wed Jul 21 11:58:27 CEST 2010
Wednesday, July 21, 2010, 11:28:55 AM, you wrote:
JvdS> I've finally managed to get xpcom/gecko to work (partly) on linux/i386.
JvdS> The delphi/fpc gecko-headers uses the safecall calling convention a
I get it to work too, but missing safecall (unix version) makes it
unusable as a lot of assembler is needed.
JvdS> On Windows a safecall is in principle a stdcall with a 'hidden' function
JvdS> result which contains a value (nsresult) to check if there was any
JvdS> problem during the call of the procedure/function.
JvdS> I had to find out what calling convention is used by xpcom on Linux. And
JvdS> in fact it's quite logical: it uses cdecl. (As most c-libraries do, use
JvdS> stdcall on Windows, cdecl on others)
It is not 100% cdecl, const records in safecall must be passed as
reference while in cdecl a copy of the record is being passed.
Please check my bug report:
http://bugs.freepascal.org/view.php?id=16685 and some messages in
In the other side, I was unable to make Gecko work correctly (windows)
using Gecko > 126.96.36.199 all 1.9.2.x versions raise a bunch of
loaded. Files needed to be removed:
More information about the fpc-devel