cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Calling convention

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 2 Nov 2007 10:59:32 +0100 (CET)

On Thu, 1 Nov 2007, Gisle Vanem wrote:

> Ops, wrong ML. Resending.

For those who missed it, Brian Dessent replied to this on the users list:

    http://curl.haxx.se/mail/archive-2007-11/0004.html

> As it is now all applications using libcurl (either dynamically or the
> static lib) must be built with the same calling convention as libcurl was
> built with. Normally this would be 'cdecl' (which is implicit and the only
> (?) possible calling-convention in gcc).
>
> Sometimes mixing e.g. 'fastcall', 'stdcall' and 'cdecl' would be useful. I
> guess this would be an issue only on Windows and DOS using non-gcc
> compilers.

Sorry for being thick, but why do applicatons have to use the same calling
convention as libcurl? Aren't all the libcurl functions "tagged" accordingly
with the convention?

And even if they do, in what way does introducing a new set of conventions
help that situation?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-11-02