[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Calling conventions



At 01:35 PM 1/7/00 -0700, Steve Sonntag wrote:
>Has anyone given thought to specifying calling conventions in the header
>files.  There ought to be a way to specify whether a library is built
>with __stdcall or __cdecl calling conventions.  That way when an
>application is built, the header files will specify the correct calling 
>convention and it will not get left up to default compiler options.

This likely should be added to ldap_cdefs.h...

>In looking at ldap_cdefs.h I was confused by LIBXXX_F defines.  
>It is obvious they control all external stuff, but I couldn't figure out
>what F might mean.  I at first thought "Function", but they are
>used also for variables.

It means "Function" and it's also used for variables.  We
likely should have an LDAP_E (extern) which is used by both
LDAP_F and LDAP_V macros.

>If the original intent was function,
>then perhaps there should be two defines: LIBXXX_V for variables
>and LIBXXX_F for functions.  Then the calling conention could be
>put on the Function define.  The define LIBXXX_F would have to also be
>put in the code where the function is coded so it would match the prototype.

At the same time, s/LIBXXX/LDAP_LIBXXX/ to place defines within
the required namespace.

>Does this make sense.  Any better ideas.  Does anyone else need
>something like this?

Sounds reasonable to me...  Gary? Howard?