@@ -3365,11 +3365,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3365
3365
int port = LDAP_DEF_PORT ,
3366
3366
scope ,
3367
3367
rc ,
3368
- msgid ,
3369
3368
size ,
3370
3369
state ,
3371
3370
oldstate ,
3372
3371
i ;
3372
+ #ifndef WIN32
3373
+ int msgid ;
3374
+ #endif
3373
3375
bool found_keyword ;
3374
3376
char * url ,
3375
3377
* hostname ,
@@ -3514,11 +3516,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3514
3516
3515
3517
/*
3516
3518
* Perform an explicit anonymous bind.
3517
- * LDAP does not require that an anonymous bind is preformed explicitly,
3519
+ *
3520
+ * LDAP does not require that an anonymous bind is performed explicitly,
3518
3521
* but we want to distinguish between the case where LDAP bind does not
3519
3522
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
3520
3523
* the service control file) and the case where querying the LDAP server
3521
3524
* fails (return 1 to end parsing).
3525
+ *
3522
3526
* Unfortunately there is no way of setting a timeout that works for
3523
3527
* both Windows and OpenLDAP.
3524
3528
*/
@@ -3531,7 +3535,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3531
3535
ldap_unbind (ld );
3532
3536
return 2 ;
3533
3537
}
3534
- #else /* WIN32 */
3538
+ #else /*! WIN32 */
3535
3539
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
3536
3540
if (ldap_set_option (ld ,LDAP_OPT_NETWORK_TIMEOUT ,& time )!= LDAP_SUCCESS )
3537
3541
{
@@ -3786,7 +3790,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3786
3790
3787
3791
return 0 ;
3788
3792
}
3789
- #endif
3793
+
3794
+ #endif /* USE_LDAP */
3790
3795
3791
3796
#define MAXBUFSIZE 256
3792
3797