Begin forwarded message:

From: Curt Arnold <carnold@apache.org>
Date: May 2, 2007 3:45:02 PM CDT
To: Graham Leggett <minfrin@sharp.fm>
Subject: Re: apr-ldap on VC6 (was Re: misc/win32/rand.c include order change breaking VC6 build)

The change is in Windows specific code.  apr_ldap.hw is the precanned version of apr_ldap.h for Windows.  It is copied to apr_ldap.h by Visual Studio as a special build step.  apr_ldap.hnw is equivalent precanned header for NetWare.  For all other platforms, apr_ldap.h is generated by configure from apr_ldap.h.in and would not be affected by the change.

So the questions are:

Does the change result in different generated code that pointing VC6 to a later Platform SDK.  I don't believe so, but I've thought about compiling the LDAP code both with the VC6 fix and with the Platform SDK with debugging off and see if the generated object files are identical.

Is there an a winldap.h that doesn't define LDAP_VERSION_MAX, does define LDAP_VERSION3 where LDAP_VERSION_MAX == 3 is inappropriate.   Since the comparison is greater than 2, we don't need to care about any hypothetical larger version numbers.

Is there an winldap.h that doesn't define LDAP_VENDOR_NAME where Microsoft isn't the answer (which is only used to formulate a response to a get info call).

I've just looked at several winldap.h's.  The versions shipped with Borland C++ 5.5, Winelib and Microsoft VC6 are all similar if not identical and would benefit from the patch.  The version in MinGW should behave the same as later versions of VC.




On May 2, 2007, at 3:02 PM, Graham Leggett wrote:

Curt Arnold wrote:

 From a superficial review, it seems the only deficiency in the VC6 header files is a lack of definitions for LDAP_VENDOR_NAME and LDAP_VERSION_MAX.  The following will allow apr_util to build with VC6 with ldap without needing to use a Platform SDK update.  Maybe I'm missing something however.

This patch assumes that the only platform out there that doesn't export the two symbols is VC6, and that may not be the case.

Is there any symbol exported by VC6 that could be used to reliably detect if you're really on windows?

Regards,
Graham
--