I'm trying to understand why none of the libraries I've seen for the Palm
include explicit calling convention specifiers in their public headers? How
is it possible to reliably distribute a piece of compiled C code potentially
for use in other compilers without specifying this explicitly? Shouldn't you
be able to theoretically take that compiled code to another compiler, change
the default calling convention used by that compiler, and get every call
into one of the compiled functions to hose the stack? I suppose the issue is
that everyone stipulates the compiler to use with their library (I'm not
even sure if the object code is compatible between gcc and mw, (COFF, OMF,
what?)? So a varargs function like StrPrintF, distributed in object code,
would crash if you somehow managed to get the compiler to compile calls to
it using __stdcall, given that it's prototype doesn't include __cdecl. If
anyone has any thoughts on the topic...perhaps you could enlighten me ;-)
Will
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html