Commit e5eb270e authored by Howard Chu's avatar Howard Chu
Browse files

from jon@symas.com - misc Windows cleanup

parent c37fa6d1
......@@ -143,7 +143,7 @@ ber_skip_tag( BerElement *ber, ber_len_t *len )
}
/* 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;
}
......
......@@ -2060,7 +2060,7 @@ end_of_value:;
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 ) {
......
......@@ -18,6 +18,14 @@
#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
......@@ -306,8 +314,6 @@ struct ldap {
#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
......
......@@ -237,7 +237,7 @@ bind_prompt( LDAP *ld,
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
......
......@@ -10,9 +10,6 @@
#include <ac/time.h>
#include <ac/unistd.h>
#ifdef HAVE_WINCRYPT_H
#include <wincrypt.h>
#endif
#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
......
......@@ -373,6 +373,8 @@ struct berval * lutil_passwd_hash(
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 )
......@@ -394,6 +396,7 @@ static struct berval * pw_string(
pw->bv_val[pw->bv_len] = '\0';
return pw;
}
#endif /* SLAPD_LMHASH || SLAPD_CRYPT */
static struct berval * pw_string64(
const struct pw_scheme *sc,
......
......@@ -42,7 +42,8 @@
#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 )
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment