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

Using consistent calling convention declarations (ITS 1074)

There's a problem with inconsistent function declarations in the CLDAP client code.
The include files prototype functions like this:
   LDAP_F ( int )  ldap_search_ext ( ... );
But the source code usually declares functions like this, without the LDAP_F:
   int ldap_search_ext (...)
  { ... }
LDAP_F is a macro in ldap_cdefs.h which gives the developer some control over the calling convention.
By leaving out the LDAP_F in the function declaration, it's making an assumption about the compiler defaults.  In MSVC6, the default compiler options cause compilation errors in our build environment.
For various reasons, we can't just change the compiler option.  To build the library as a DLL, we've had to modify all the source code to declare it consistently (1000's of places!).  Makes synching with OpenLDAP very painful.  Same situation for LDAP_LDIF_F, LDAP_LUTIL_F, etc.
I'd like to propose modifying the source code to declare functions consistently.
Functions that are exported MUST have the LDAP_F declaration.
For purely internal private functions, I don't care whether it contains LDAP_F or not, as long as it matches.
I'd be willing to do the work   (he who whines... :)
Does anyone have reasons this should not be done?
Is it going to cause anyone problems?
Dave Steck
Novell, Inc., the leading provider of Net services software