@@ -3415,11 +3415,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3415
3415
int port = LDAP_DEF_PORT ,
3416
3416
scope ,
3417
3417
rc ,
3418
- msgid ,
3419
3418
size ,
3420
3419
state ,
3421
3420
oldstate ,
3422
3421
i ;
3422
+ #ifndef WIN32
3423
+ int msgid ;
3424
+ #endif
3423
3425
bool found_keyword ;
3424
3426
char * url ,
3425
3427
* hostname ,
@@ -3564,11 +3566,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3564
3566
3565
3567
/*
3566
3568
* Perform an explicit anonymous bind.
3567
- * LDAP does not require that an anonymous bind is preformed explicitly,
3569
+ *
3570
+ * LDAP does not require that an anonymous bind is performed explicitly,
3568
3571
* but we want to distinguish between the case where LDAP bind does not
3569
3572
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
3570
3573
* the service control file) and the case where querying the LDAP server
3571
3574
* fails (return 1 to end parsing).
3575
+ *
3572
3576
* Unfortunately there is no way of setting a timeout that works for
3573
3577
* both Windows and OpenLDAP.
3574
3578
*/
@@ -3581,7 +3585,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3581
3585
ldap_unbind (ld );
3582
3586
return 2 ;
3583
3587
}
3584
- #else /* WIN32 */
3588
+ #else /* ! WIN32 */
3585
3589
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
3586
3590
if (ldap_set_option (ld , LDAP_OPT_NETWORK_TIMEOUT , & time ) != LDAP_SUCCESS )
3587
3591
{
@@ -3836,7 +3840,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3836
3840
3837
3841
return 0 ;
3838
3842
}
3839
- #endif
3843
+
3844
+ #endif /* USE_LDAP */
3840
3845
3841
3846
#define MAXBUFSIZE 256
3842
3847
0 commit comments