"Meyer, Will" wrote:
> 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 ;-)
Resistance is futile. You will be assimilated.
As far as I know there is only one calling convention. All else is discouraged.
You don't need to specify it because there aren't several to choose from.
--
Adam Wozniak Senior Software Design Engineer
Surveyor Corporation
[EMAIL PROTECTED] 4548 Broad Street
[EMAIL PROTECTED] San Luis Obispo, CA 93401
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html