}
/* BER element should have enough data left */
- if( *len > ber_pvt_ber_remaining( ber ) ) {
+ if( *len > (ber_len_t) ber_pvt_ber_remaining( ber ) ) {
return LBER_DEFAULT;
}
len = ( ( endPos ? endPos : p ) - startPos ) / 2;
/* must be even! */
- assert( 2 * len == ( endPos ? endPos : p ) - startPos );
+ assert( 2 * len == (ber_len_t) (( endPos ? endPos : p ) - startPos ));
*val = LDAP_MALLOC( sizeof( struct berval ) );
if ( *val == NULL ) {
#include "../liblber/lber-int.h"
+/*
+ * Windows does not preprocess correctly unless
+ * this #include precedes queue.h
+ */
+#ifdef LDAP_R_COMPILE
+#include <ldap_pvt_thread.h>
+#endif
+
#include <ac/queue.h>
#ifdef HAVE_CYRUS_SASL
#define LDAP_VALID(ld) ( (ld)->ld_valid == LDAP_VALID_SESSION )
#ifdef LDAP_R_COMPILE
-#include <ldap_pvt_thread.h>
-
#ifdef HAVE_RES_QUERY
LDAP_V ( ldap_pvt_thread_mutex_t ) ldap_int_resolv_mutex;
#endif
static char dn[256], passwd[256];
int authmethod;
- printf("rebind for request=%d msgid=%ld url=%s\n",
+ printf("rebind for request=%ld msgid=%ld url=%s\n",
request, (long) msgid, url );
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
#include <ac/time.h>
#include <ac/unistd.h>
-#ifdef HAVE_WINCRYPT_H
-#include <wincrypt.h>
-#endif
#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
return (sc->hash_fn)( sc, passwd );
}
+/* pw_string is only called when SLAPD_LMHASH or SLAPD_CRYPT is defined */
+#if defined(SLAPD_LMHASH) || defined(SLAPD_CRYPT)
static struct berval * pw_string(
const struct pw_scheme *sc,
const struct berval *passwd )
pw->bv_val[pw->bv_len] = '\0';
return pw;
}
+#endif /* SLAPD_LMHASH || SLAPD_CRYPT */
static struct berval * pw_string64(
const struct pw_scheme *sc,
#include <lutil.h>
-#ifndef HAVE_SYS_UUID_H
+/* not needed for Windows */
+#if !defined(HAVE_SYS_UUID_H) && !defined(_WIN32)
static unsigned char *
lutil_eaddr( void )
{