[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Compiling curl for fireTOS under Freemint with GCC



On 14.04.2011 22:31, Miro Kropáček wrote:
I couldn't resist, I was curios how it's done and actually, it's completely
another way and now it makes even more sense. It's true Didier uses lwip in
FireTOS but bridge to TOS isn't done by some wrapper in GEMDOS but via STiK
compatible interface. So you must not use any lwip headers! You must use
STiK/Sting API (via cookie).
so I need to use the SOCKET cookie, but from my point of view that's not possible directly... (because of the metnioned issues) I guess I have to undef the defines, put some functions with the previously undefined defines into an library ( as real function ), like this:

SOCKET_LIB_EXPORT socket( a,b,c ){
if(!init){
init_socket();
}
return( psc->socket( a, b, c ) );
}

and that maybe works. I'll just have to undef the socket defines first, than redeclare them as functions - when compiling curl. Will try it tomorrow...

The Sting interface is a third interface - gluestick.

Sting/Stick doesn't offer any socket functionality - if someone would provide an socket layer for GLueStick, that would be cool >;) - because than you can compile curl with support for Sting ;) ( but that probably won't be very clean, I expect that sting uses shorts instead of types like long, long long, etc...). With sting there is no support for sockets, just connections. So you have to emulate the socket() call and keep track of the fake socket somehow, associate it with sting connection handles, etc. :)

Greets,
m