@@ -3134,11 +3134,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3134
3134
int port = LDAP_DEF_PORT ,
3135
3135
scope ,
3136
3136
rc ,
3137
- msgid ,
3138
3137
size ,
3139
3138
state ,
3140
3139
oldstate ,
3141
3140
i ;
3141
+ #ifndef WIN32
3142
+ int msgid ;
3143
+ #endif
3142
3144
bool found_keyword ;
3143
3145
char * url ,
3144
3146
* hostname ,
@@ -3283,11 +3285,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3283
3285
3284
3286
/*
3285
3287
* Perform an explicit anonymous bind.
3286
- * LDAP does not require that an anonymous bind is preformed explicitly,
3288
+ *
3289
+ * LDAP does not require that an anonymous bind is performed explicitly,
3287
3290
* but we want to distinguish between the case where LDAP bind does not
3288
3291
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
3289
3292
* the service control file) and the case where querying the LDAP server
3290
3293
* fails (return 1 to end parsing).
3294
+ *
3291
3295
* Unfortunately there is no way of setting a timeout that works for
3292
3296
* both Windows and OpenLDAP.
3293
3297
*/
@@ -3300,7 +3304,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3300
3304
ldap_unbind (ld );
3301
3305
return 2 ;
3302
3306
}
3303
- #else /* WIN32 */
3307
+ #else /* ! WIN32 */
3304
3308
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
3305
3309
if (ldap_set_option (ld , LDAP_OPT_NETWORK_TIMEOUT , & time ) != LDAP_SUCCESS )
3306
3310
{
@@ -3555,7 +3559,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
3555
3559
3556
3560
return 0 ;
3557
3561
}
3558
- #endif
3562
+
3563
+ #endif /* USE_LDAP */
3559
3564
3560
3565
#define MAXBUFSIZE 256
3561
3566
0 commit comments