@@ -3378,11 +3378,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
33783378int port = LDAP_DEF_PORT ,
33793379scope ,
33803380rc ,
3381- msgid ,
33823381size ,
33833382state ,
33843383oldstate ,
33853384i ;
3385+ #ifndef WIN32
3386+ int msgid ;
3387+ #endif
33863388bool found_keyword ;
33873389char * url ,
33883390* hostname ,
@@ -3527,11 +3529,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
35273529
35283530/*
35293531 * 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,
35313534 * but we want to distinguish between the case where LDAP bind does not
35323535 * succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
35333536 * the service control file) and the case where querying the LDAP server
35343537 * fails (return 1 to end parsing).
3538+ *
35353539 * Unfortunately there is no way of setting a timeout that works for
35363540 * both Windows and OpenLDAP.
35373541 */
@@ -3544,7 +3548,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
35443548ldap_unbind (ld );
35453549return 2 ;
35463550}
3547- #else /* WIN32 */
3551+ #else /*! WIN32 */
35483552/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
35493553if (ldap_set_option (ld ,LDAP_OPT_NETWORK_TIMEOUT ,& time )!= LDAP_SUCCESS )
35503554{
@@ -3799,7 +3803,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
37993803
38003804return 0 ;
38013805}
3802- #endif
3806+
3807+ #endif /* USE_LDAP */
38033808
38043809#define MAXBUFSIZE 256
38053810