LDAP function signature for MSVC

Started by Magnus Haganderover 19 years ago2 messages
#1Magnus Hagander
mha@sollentuna.net
1 attachment(s)

This patch changes the function definition for ldap_start_tls_sA() on
win32 by removing the WINLDAPAPI. This is because in some cases
WINLDAPAPI gets defined to __declspec(dllimport), which is not permitted
at this location. in all other location it apears to be defined to
nothing, so removing it really should have no effect.

//Magnus

Attachments:

libpq_auth_ldap_msvc.diffapplication/octet-stream; name=libpq_auth_ldap_msvc.diffDownload
Index: src\backend\libpq/auth.c
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/backend/libpq/auth.c,v
retrieving revision 1.141
diff -c -r1.141 auth.c
*** src\backend\libpq/auth.c	22 Aug 2006 02:23:45 -0000	1.141
--- src\backend\libpq/auth.c	15 Sep 2006 12:01:00 -0000
***************
*** 75,81 ****
  #include <winldap.h>
  
  /* Correct header from the Platform SDK */
! typedef ULONG (WINLDAPAPI *__ldap_start_tls_sA)(
      IN   PLDAP          ExternalHandle,
      OUT  PULONG         ServerReturnValue,
      OUT  LDAPMessage    **result,
--- 75,81 ----
  #include <winldap.h>
  
  /* Correct header from the Platform SDK */
! typedef ULONG (*__ldap_start_tls_sA)(
      IN   PLDAP          ExternalHandle,
      OUT  PULONG         ServerReturnValue,
      OUT  LDAPMessage    **result,
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#1)
Re: LDAP function signature for MSVC

"Magnus Hagander" <mha@sollentuna.net> writes:

This patch changes the function definition for ldap_start_tls_sA() on
win32 by removing the WINLDAPAPI.

Applied.

regards, tom lane