@@ -3378,11 +3378,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3378
3378
int port = LDAP_DEF_PORT ,
3379
3379
scope ,
3380
3380
rc ,
3381
- msgid ,
3382
3381
size ,
3383
3382
state ,
3384
3383
oldstate ,
3385
3384
i ;
3385
+ #ifndef WIN32
3386
+ int msgid ;
3387
+ #endif
3386
3388
bool found_keyword ;
3387
3389
char * url ,
3388
3390
* hostname ,
@@ -3527,11 +3529,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3527
3529
3528
3530
/*
3529
3531
* Perform an explicit anonymous bind.
3530
- * LDAP does not require that an anonymous bind is preformed explicitly,
3532
+ *
3533
+ * LDAP does not require that an anonymous bind is performed explicitly,
3531
3534
* but we want to distinguish between the case where LDAP bind does not
3532
3535
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
3533
3536
* the service control file) and the case where querying the LDAP server
3534
3537
* fails (return 1 to end parsing).
3538
+ *
3535
3539
* Unfortunately there is no way of setting a timeout that works for
3536
3540
* both Windows and OpenLDAP.
3537
3541
*/
@@ -3544,7 +3548,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3544
3548
ldap_unbind (ld );
3545
3549
return 2 ;
3546
3550
}
3547
- #else /* WIN32 */
3551
+ #else /* ! WIN32 */
3548
3552
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
3549
3553
if (ldap_set_option (ld , LDAP_OPT_NETWORK_TIMEOUT , & time ) != LDAP_SUCCESS )
3550
3554
{
@@ -3799,7 +3803,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3799
3803
3800
3804
return 0 ;
3801
3805
}
3802
- #endif
3806
+
3807
+ #endif /* USE_LDAP */
3803
3808
3804
3809
#define MAXBUFSIZE 256
3805
3810
0 commit comments