Commit 5d0b23be authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wldap32: Build without -DWINE_NO_LONG_TYPES.

parent 86891eea
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wldap32.dll MODULE = wldap32.dll
UNIXLIB = wldap32.so UNIXLIB = wldap32.so
IMPORTLIB = wldap32 IMPORTLIB = wldap32
......
...@@ -41,7 +41,7 @@ ULONG CDECL ldap_bindA( LDAP *ld, char *dn, char *cred, ULONG method ) ...@@ -41,7 +41,7 @@ ULONG CDECL ldap_bindA( LDAP *ld, char *dn, char *cred, ULONG method )
ULONG ret = LDAP_NO_MEMORY; ULONG ret = LDAP_NO_MEMORY;
WCHAR *dnW = NULL, *credW = NULL; WCHAR *dnW = NULL, *credW = NULL;
TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method ); TRACE( "(%p, %s, %p, %#lx)\n", ld, debugstr_a(dn), cred, method );
if (!ld) return ~0u; if (!ld) return ~0u;
...@@ -81,7 +81,7 @@ ULONG CDECL ldap_bindW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method ) ...@@ -81,7 +81,7 @@ ULONG CDECL ldap_bindW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
struct bervalU pwd = { 0, NULL }; struct bervalU pwd = { 0, NULL };
int msg; int msg;
TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method ); TRACE( "(%p, %s, %p, %#lx)\n", ld, debugstr_w(dn), cred, method );
if (!ld) return ~0u; if (!ld) return ~0u;
if (method != LDAP_AUTH_SIMPLE) return LDAP_PARAM_ERROR; if (method != LDAP_AUTH_SIMPLE) return LDAP_PARAM_ERROR;
...@@ -119,7 +119,7 @@ ULONG CDECL ldap_bind_sA( LDAP *ld, char *dn, char *cred, ULONG method ) ...@@ -119,7 +119,7 @@ ULONG CDECL ldap_bind_sA( LDAP *ld, char *dn, char *cred, ULONG method )
ULONG ret = LDAP_NO_MEMORY; ULONG ret = LDAP_NO_MEMORY;
WCHAR *dnW = NULL, *credW = NULL; WCHAR *dnW = NULL, *credW = NULL;
TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method ); TRACE( "(%p, %s, %p, %#lx)\n", ld, debugstr_a(dn), cred, method );
if (!ld) return LDAP_PARAM_ERROR; if (!ld) return LDAP_PARAM_ERROR;
...@@ -162,7 +162,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method ) ...@@ -162,7 +162,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
char *dnU = NULL, *credU = NULL; char *dnU = NULL, *credU = NULL;
struct bervalU pwd = { 0, NULL }; struct bervalU pwd = { 0, NULL };
TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method ); TRACE( "(%p, %s, %p, %#lx)\n", ld, debugstr_w(dn), cred, method );
if (!ld) return LDAP_PARAM_ERROR; if (!ld) return LDAP_PARAM_ERROR;
...@@ -224,7 +224,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method ) ...@@ -224,7 +224,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
} }
else else
{ {
FIXME( "method %#x not supported\n", method ); FIXME( "method %#lx not supported\n", method );
return LDAP_PARAM_ERROR; return LDAP_PARAM_ERROR;
} }
......
...@@ -96,7 +96,7 @@ char ** CDECL ldap_explode_dnA( char *dn, ULONG notypes ) ...@@ -96,7 +96,7 @@ char ** CDECL ldap_explode_dnA( char *dn, ULONG notypes )
char **ret; char **ret;
WCHAR *dnW, **retW; WCHAR *dnW, **retW;
TRACE( "(%s, 0x%08x)\n", debugstr_a(dn), notypes ); TRACE( "(%s, %#lx)\n", debugstr_a(dn), notypes );
if (!(dnW = strAtoW( dn ))) return NULL; if (!(dnW = strAtoW( dn ))) return NULL;
...@@ -130,7 +130,7 @@ WCHAR ** CDECL ldap_explode_dnW( WCHAR *dn, ULONG notypes ) ...@@ -130,7 +130,7 @@ WCHAR ** CDECL ldap_explode_dnW( WCHAR *dn, ULONG notypes )
WCHAR **ret = NULL; WCHAR **ret = NULL;
char *dnU, **retU; char *dnU, **retU;
TRACE( "(%s, 0x%08x)\n", debugstr_w(dn), notypes ); TRACE( "(%s, %#lx)\n", debugstr_w(dn), notypes );
if ((dnU = strWtoU( dn ))) if ((dnU = strWtoU( dn )))
{ {
......
...@@ -67,7 +67,7 @@ char * CDECL ldap_err2stringA( ULONG err ) ...@@ -67,7 +67,7 @@ char * CDECL ldap_err2stringA( ULONG err )
{ {
static char buf[256] = ""; static char buf[256] = "";
TRACE( "(0x%08x)\n", err ); TRACE( "(%#lx)\n", err );
if (err <= LDAP_REFERRAL_LIMIT_EXCEEDED) if (err <= LDAP_REFERRAL_LIMIT_EXCEEDED)
LoadStringA( hwldap32, err, buf, 256 ); LoadStringA( hwldap32, err, buf, 256 );
...@@ -97,7 +97,7 @@ WCHAR * CDECL ldap_err2stringW( ULONG err ) ...@@ -97,7 +97,7 @@ WCHAR * CDECL ldap_err2stringW( ULONG err )
{ {
static WCHAR buf[256] = { 0 }; static WCHAR buf[256] = { 0 };
TRACE( "(0x%08x)\n", err ); TRACE( "(%#lx)\n", err );
if (err <= LDAP_REFERRAL_LIMIT_EXCEEDED) if (err <= LDAP_REFERRAL_LIMIT_EXCEEDED)
LoadStringW( hwldap32, err, buf, 256 ); LoadStringW( hwldap32, err, buf, 256 );
...@@ -148,7 +148,7 @@ ULONG CDECL ldap_result2error( LDAP *ld, LDAPMessage *res, ULONG free ) ...@@ -148,7 +148,7 @@ ULONG CDECL ldap_result2error( LDAP *ld, LDAPMessage *res, ULONG free )
{ {
int error; int error;
TRACE( "(%p, %p, 0x%08x)\n", ld, res, free ); TRACE( "(%p, %p, %#lx)\n", ld, res, free );
if (ld && res) if (ld && res)
{ {
...@@ -289,7 +289,7 @@ static const ULONG errormap[] = { ...@@ -289,7 +289,7 @@ static const ULONG errormap[] = {
*/ */
ULONG CDECL LdapMapErrorToWin32( ULONG err ) ULONG CDECL LdapMapErrorToWin32( ULONG err )
{ {
TRACE( "(0x%08x)\n", err ); TRACE( "(%#lx)\n", err );
if (err >= ARRAY_SIZE( errormap )) return ERROR_DS_GENERIC_ERROR; if (err >= ARRAY_SIZE( errormap )) return ERROR_DS_GENERIC_ERROR;
return errormap[err]; return errormap[err];
......
...@@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32); ...@@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
*/ */
ULONG CDECL ldap_close_extended_op( LDAP *ld, ULONG msgid ) ULONG CDECL ldap_close_extended_op( LDAP *ld, ULONG msgid )
{ {
TRACE( "(%p, 0x%08x)\n", ld, msgid ); TRACE( "(%p, %#lx)\n", ld, msgid );
if (!ld) return LDAP_PARAM_ERROR; if (!ld) return LDAP_PARAM_ERROR;
return LDAP_SUCCESS; return LDAP_SUCCESS;
......
...@@ -118,10 +118,10 @@ static char *join_hostnames( const char *scheme, char **hostnames, ULONG portnum ...@@ -118,10 +118,10 @@ static char *join_hostnames( const char *scheme, char **hostnames, ULONG portnum
{ {
char *res, *p, *q, **v; char *res, *p, *q, **v;
unsigned int i = 0, size = 0; unsigned int i = 0, size = 0;
static const char sep[] = " ", fmt[] = ":%d"; static const char sep[] = " ";
char port[7]; char port[7];
sprintf( port, fmt, portnumber ); sprintf( port, ":%lu", portnumber );
for (v = hostnames; *v; v++) for (v = hostnames; *v; v++)
{ {
...@@ -220,7 +220,7 @@ LDAP * CDECL cldap_openA( char *hostname, ULONG portnumber ) ...@@ -220,7 +220,7 @@ LDAP * CDECL cldap_openA( char *hostname, ULONG portnumber )
LDAP *ld; LDAP *ld;
WCHAR *hostnameW = NULL; WCHAR *hostnameW = NULL;
TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber ); TRACE( "(%s, %lu)\n", debugstr_a(hostname), portnumber );
if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL; if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL;
...@@ -256,7 +256,7 @@ LDAP * CDECL cldap_openW( WCHAR *hostname, ULONG portnumber ) ...@@ -256,7 +256,7 @@ LDAP * CDECL cldap_openW( WCHAR *hostname, ULONG portnumber )
LDAP *ld = NULL; LDAP *ld = NULL;
char *hostnameU, *url = NULL; char *hostnameU, *url = NULL;
TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber ); TRACE( "(%s, %lu)\n", debugstr_w(hostname), portnumber );
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL; if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
if (!(url = urlify_hostnames( "cldap://", hostnameU, portnumber ))) goto exit; if (!(url = urlify_hostnames( "cldap://", hostnameU, portnumber ))) goto exit;
...@@ -305,7 +305,7 @@ LDAP * CDECL ldap_initA( const PCHAR hostname, ULONG portnumber ) ...@@ -305,7 +305,7 @@ LDAP * CDECL ldap_initA( const PCHAR hostname, ULONG portnumber )
LDAP *ld; LDAP *ld;
WCHAR *hostnameW = NULL; WCHAR *hostnameW = NULL;
TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber ); TRACE( "(%s, %lu)\n", debugstr_a(hostname), portnumber );
if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL; if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL;
...@@ -342,7 +342,7 @@ LDAP * CDECL ldap_initW( const PWCHAR hostname, ULONG portnumber ) ...@@ -342,7 +342,7 @@ LDAP * CDECL ldap_initW( const PWCHAR hostname, ULONG portnumber )
LDAP *ld = NULL; LDAP *ld = NULL;
char *hostnameU, *url = NULL; char *hostnameU, *url = NULL;
TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber ); TRACE( "(%s, %lu)\n", debugstr_w(hostname), portnumber );
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL; if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
if (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit; if (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit;
...@@ -365,7 +365,7 @@ LDAP * CDECL ldap_openA( char *hostname, ULONG portnumber ) ...@@ -365,7 +365,7 @@ LDAP * CDECL ldap_openA( char *hostname, ULONG portnumber )
LDAP *ld; LDAP *ld;
WCHAR *hostnameW = NULL; WCHAR *hostnameW = NULL;
TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber ); TRACE( "(%s, %lu)\n", debugstr_a(hostname), portnumber );
if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL; if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL;
...@@ -401,7 +401,7 @@ LDAP * CDECL ldap_openW( WCHAR *hostname, ULONG portnumber ) ...@@ -401,7 +401,7 @@ LDAP * CDECL ldap_openW( WCHAR *hostname, ULONG portnumber )
LDAP *ld = NULL; LDAP *ld = NULL;
char *hostnameU, *url = NULL; char *hostnameU, *url = NULL;
TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber ); TRACE( "(%s, %lu)\n", debugstr_w(hostname), portnumber );
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL; if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
if (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit; if (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit;
...@@ -424,7 +424,7 @@ LDAP * CDECL ldap_sslinitA( char *hostname, ULONG portnumber, int secure ) ...@@ -424,7 +424,7 @@ LDAP * CDECL ldap_sslinitA( char *hostname, ULONG portnumber, int secure )
LDAP *ld; LDAP *ld;
WCHAR *hostnameW = NULL; WCHAR *hostnameW = NULL;
TRACE( "(%s, %d, 0x%08x)\n", debugstr_a(hostname), portnumber, secure ); TRACE( "(%s, %lu, %d)\n", debugstr_a(hostname), portnumber, secure );
if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL; if (hostname && !(hostnameW = strAtoW( hostname ))) return NULL;
...@@ -462,7 +462,7 @@ LDAP * CDECL ldap_sslinitW( WCHAR *hostname, ULONG portnumber, int secure ) ...@@ -462,7 +462,7 @@ LDAP * CDECL ldap_sslinitW( WCHAR *hostname, ULONG portnumber, int secure )
LDAP *ld = NULL; LDAP *ld = NULL;
char *hostnameU, *url = NULL; char *hostnameU, *url = NULL;
TRACE( "(%s, %d, 0x%08x)\n", debugstr_w(hostname), portnumber, secure ); TRACE( "(%s, %lu, %d)\n", debugstr_w(hostname), portnumber, secure );
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL; if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
......
...@@ -34,7 +34,7 @@ unixlib_handle_t ldap_handle = 0; ...@@ -34,7 +34,7 @@ unixlib_handle_t ldap_handle = 0;
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{ {
TRACE( "(%p, %d, %p)\n", hinst, reason, reserved ); TRACE( "(%p, %#lx, %p)\n", hinst, reason, reserved );
switch (reason) switch (reason)
{ {
......
...@@ -45,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32); ...@@ -45,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
*/ */
ULONG CDECL ldap_abandon( LDAP *ld, ULONG msgid ) ULONG CDECL ldap_abandon( LDAP *ld, ULONG msgid )
{ {
TRACE( "(%p, 0x%08x)\n", ld, msgid ); TRACE( "(%p, %#lx)\n", ld, msgid );
if (!ld) return ~0u; if (!ld) return ~0u;
else else
...@@ -223,7 +223,7 @@ ULONG CDECL ldap_escape_filter_elementA( char *src, ULONG srclen, char *dst, ULO ...@@ -223,7 +223,7 @@ ULONG CDECL ldap_escape_filter_elementA( char *src, ULONG srclen, char *dst, ULO
{ {
ULONG len = get_escape_size( src, srclen ); ULONG len = get_escape_size( src, srclen );
TRACE( "(%p, 0x%08x, %p, 0x%08x)\n", src, srclen, dst, dstlen ); TRACE( "(%p, %#lx, %p, %#lx)\n", src, srclen, dst, dstlen );
if (!dst) return len; if (!dst) return len;
if (!src || dstlen < len) return LDAP_PARAM_ERROR; if (!src || dstlen < len) return LDAP_PARAM_ERROR;
...@@ -251,7 +251,7 @@ ULONG CDECL ldap_escape_filter_elementW( char *src, ULONG srclen, WCHAR *dst, UL ...@@ -251,7 +251,7 @@ ULONG CDECL ldap_escape_filter_elementW( char *src, ULONG srclen, WCHAR *dst, UL
{ {
ULONG len = get_escape_size( src, srclen ); ULONG len = get_escape_size( src, srclen );
TRACE( "(%p, 0x%08x, %p, 0x%08x)\n", src, srclen, dst, dstlen ); TRACE( "(%p, %#lx, %p, %#lx)\n", src, srclen, dst, dstlen );
if (!dst) return len; if (!dst) return len;
...@@ -629,7 +629,7 @@ ULONG CDECL ldap_result( LDAP *ld, ULONG msgid, ULONG all, struct l_timeval *tim ...@@ -629,7 +629,7 @@ ULONG CDECL ldap_result( LDAP *ld, ULONG msgid, ULONG all, struct l_timeval *tim
void *msgU = NULL; void *msgU = NULL;
ULONG ret = ~0u; ULONG ret = ~0u;
TRACE( "(%p, 0x%08x, 0x%08x, %p, %p)\n", ld, msgid, all, timeout, res ); TRACE( "(%p, %#lx, %#lx, %p, %p)\n", ld, msgid, all, timeout, res );
if (ld && res && msgid != ~0u) if (ld && res && msgid != ~0u)
{ {
......
...@@ -395,7 +395,7 @@ static BOOL query_supported_server_ctrls( LDAP *ld ) ...@@ -395,7 +395,7 @@ static BOOL query_supported_server_ctrls( LDAP *ld )
struct ldap_get_values_len_params get_params = { CTX(ld), entry, attrs[0], &ctrls }; struct ldap_get_values_len_params get_params = { CTX(ld), entry, attrs[0], &ctrls };
LDAP_CALL( ldap_get_values_len, &get_params ); LDAP_CALL( ldap_get_values_len, &get_params );
count = LDAP_CALL( ldap_count_values_len, ctrls ); count = LDAP_CALL( ldap_count_values_len, ctrls );
for (i = 0; i < count; i++) TRACE("%u: %s\n", i, debugstr_an( ctrls[i]->bv_val, ctrls[i]->bv_len )); for (i = 0; i < count; i++) TRACE( "%lu: %s\n", i, debugstr_an( ctrls[i]->bv_val, ctrls[i]->bv_len ) );
*(struct bervalU ***)&SERVER_CTRLS(ld) = ctrls; *(struct bervalU ***)&SERVER_CTRLS(ld) = ctrls;
} }
} }
......
...@@ -45,7 +45,7 @@ ULONG CDECL ldap_create_page_controlA( LDAP *ld, ULONG pagesize, struct berval * ...@@ -45,7 +45,7 @@ ULONG CDECL ldap_create_page_controlA( LDAP *ld, ULONG pagesize, struct berval *
ULONG ret; ULONG ret;
LDAPControlW *controlW = NULL; LDAPControlW *controlW = NULL;
TRACE( "(%p, 0x%08x, %p, 0x%02x, %p)\n", ld, pagesize, cookie, critical, control ); TRACE( "(%p, %#lx, %p, 0x%02x, %p)\n", ld, pagesize, cookie, critical, control );
if (!ld || !control || pagesize > INT_MAX) return LDAP_PARAM_ERROR; if (!ld || !control || pagesize > INT_MAX) return LDAP_PARAM_ERROR;
...@@ -129,7 +129,7 @@ static ULONG create_page_control( ULONG pagesize, struct berval *cookie, UCHAR c ...@@ -129,7 +129,7 @@ static ULONG create_page_control( ULONG pagesize, struct berval *cookie, UCHAR c
ULONG CDECL ldap_create_page_controlW( LDAP *ld, ULONG pagesize, struct berval *cookie, UCHAR critical, ULONG CDECL ldap_create_page_controlW( LDAP *ld, ULONG pagesize, struct berval *cookie, UCHAR critical,
LDAPControlW **control ) LDAPControlW **control )
{ {
TRACE( "(%p, 0x%08x, %p, 0x%02x, %p)\n", ld, pagesize, cookie, critical, control ); TRACE( "(%p, %#lx, %p, 0x%02x, %p)\n", ld, pagesize, cookie, critical, control );
if (!ld || !control || pagesize > INT_MAX) return LDAP_PARAM_ERROR; if (!ld || !control || pagesize > INT_MAX) return LDAP_PARAM_ERROR;
return create_page_control( pagesize, cookie, critical, control ); return create_page_control( pagesize, cookie, critical, control );
...@@ -137,7 +137,7 @@ ULONG CDECL ldap_create_page_controlW( LDAP *ld, ULONG pagesize, struct berval * ...@@ -137,7 +137,7 @@ ULONG CDECL ldap_create_page_controlW( LDAP *ld, ULONG pagesize, struct berval *
ULONG CDECL ldap_get_next_page( LDAP *ld, LDAPSearch *search, ULONG pagesize, ULONG *message ) ULONG CDECL ldap_get_next_page( LDAP *ld, LDAPSearch *search, ULONG pagesize, ULONG *message )
{ {
FIXME( "(%p, %p, 0x%08x, %p)\n", ld, search, pagesize, message ); FIXME( "(%p, %p, %#lx, %p)\n", ld, search, pagesize, message );
if (!ld) return ~0u; if (!ld) return ~0u;
return LDAP_NOT_SUPPORTED; return LDAP_NOT_SUPPORTED;
...@@ -148,7 +148,7 @@ ULONG CDECL ldap_get_next_page_s( LDAP *ld, LDAPSearch *search, struct l_timeval ...@@ -148,7 +148,7 @@ ULONG CDECL ldap_get_next_page_s( LDAP *ld, LDAPSearch *search, struct l_timeval
{ {
ULONG ret; ULONG ret;
TRACE( "(%p, %p, %p, %u, %p, %p)\n", ld, search, timeout, pagesize, count, results ); TRACE( "(%p, %p, %p, %lu, %p, %p)\n", ld, search, timeout, pagesize, count, results );
if (!ld || !search || !count || !results) return ~0u; if (!ld || !search || !count || !results) return ~0u;
...@@ -203,7 +203,8 @@ ULONG CDECL ldap_get_paged_count( LDAP *ld, LDAPSearch *search, ULONG *count, LD ...@@ -203,7 +203,8 @@ ULONG CDECL ldap_get_paged_count( LDAP *ld, LDAPSearch *search, ULONG *count, LD
ret = ldap_parse_page_controlW( ld, server_ctrls, count, &search->cookie ); ret = ldap_parse_page_controlW( ld, server_ctrls, count, &search->cookie );
if (ret == LDAP_SUCCESS) if (ret == LDAP_SUCCESS)
TRACE("new search->cookie: %s, count %u\n", debugstr_an(search->cookie->bv_val, search->cookie->bv_len), *count); TRACE( "new search->cookie: %s, count %lu\n",
debugstr_an(search->cookie->bv_val, search->cookie->bv_len), *count );
ldap_controls_freeW( server_ctrls ); ldap_controls_freeW( server_ctrls );
return ret; return ret;
...@@ -292,7 +293,7 @@ LDAPSearch * CDECL ldap_search_init_pageA( LDAP *ld, char *dn, ULONG scope, char ...@@ -292,7 +293,7 @@ LDAPSearch * CDECL ldap_search_init_pageA( LDAP *ld, char *dn, ULONG scope, char
ULONG attrsonly, LDAPControlA **serverctrls, LDAPControlA **clientctrls, ULONG timelimit, ULONG sizelimit, ULONG attrsonly, LDAPControlA **serverctrls, LDAPControlA **clientctrls, ULONG timelimit, ULONG sizelimit,
LDAPSortKeyA **sortkeys ) LDAPSortKeyA **sortkeys )
{ {
FIXME( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08x, %p)\n", ld, debugstr_a(dn), scope, FIXME( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p, %#lx, %#lx, %p)\n", ld, debugstr_a(dn), scope,
debugstr_a(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, sortkeys ); debugstr_a(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, sortkeys );
return NULL; return NULL;
} }
...@@ -304,7 +305,7 @@ LDAPSearch * CDECL ldap_search_init_pageW( LDAP *ld, WCHAR *dn, ULONG scope, WCH ...@@ -304,7 +305,7 @@ LDAPSearch * CDECL ldap_search_init_pageW( LDAP *ld, WCHAR *dn, ULONG scope, WCH
LDAPSearch *search; LDAPSearch *search;
DWORD i, len; DWORD i, len;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08x, %p)\n", ld, debugstr_w(dn), scope, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p, %#lx, %#lx, %p)\n", ld, debugstr_w(dn), scope,
debugstr_w(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, sortkeys ); debugstr_w(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, sortkeys );
if (!(search = calloc( 1, sizeof(*search) ))) if (!(search = calloc( 1, sizeof(*search) )))
......
...@@ -40,7 +40,7 @@ ULONG CDECL ldap_searchA( LDAP *ld, char *base, ULONG scope, char *filter, char ...@@ -40,7 +40,7 @@ ULONG CDECL ldap_searchA( LDAP *ld, char *base, ULONG scope, char *filter, char
ULONG ret = LDAP_NO_MEMORY; ULONG ret = LDAP_NO_MEMORY;
WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly ); TRACE( "(%p, %s, %#lx, %s, %p, %#lx)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly );
if (!ld) return ~0u; if (!ld) return ~0u;
...@@ -83,7 +83,7 @@ exit: ...@@ -83,7 +83,7 @@ exit:
ULONG CDECL ldap_searchW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter, WCHAR **attrs, ULONG attrsonly ) ULONG CDECL ldap_searchW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter, WCHAR **attrs, ULONG attrsonly )
{ {
ULONG ret, msg; ULONG ret, msg;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly ); TRACE( "(%p, %s, %#lx, %s, %p, %#lx)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly );
ret = ldap_search_extW( ld, base, scope, filter, attrs, attrsonly, NULL, NULL, 0, 0, &msg ); ret = ldap_search_extW( ld, base, scope, filter, attrs, attrsonly, NULL, NULL, 0, 0, &msg );
if (ret == LDAP_SUCCESS) return msg; if (ret == LDAP_SUCCESS) return msg;
...@@ -102,7 +102,7 @@ ULONG CDECL ldap_search_extA( LDAP *ld, char *base, ULONG scope, char *filter, c ...@@ -102,7 +102,7 @@ ULONG CDECL ldap_search_extA( LDAP *ld, char *base, ULONG scope, char *filter, c
WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08x, %p)\n", ld, debugstr_a(base), scope, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p, %#lx, %#lx, %p)\n", ld, debugstr_a(base), scope,
debugstr_a(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, message ); debugstr_a(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, message );
if (!ld) return LDAP_PARAM_ERROR; if (!ld) return LDAP_PARAM_ERROR;
...@@ -162,7 +162,7 @@ ULONG CDECL ldap_search_extW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter, ...@@ -162,7 +162,7 @@ ULONG CDECL ldap_search_extW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter,
LDAPControlU **serverctrlsU = NULL, **clientctrlsU = NULL; LDAPControlU **serverctrlsU = NULL, **clientctrlsU = NULL;
struct timevalU timevalU; struct timevalU timevalU;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08x, %p)\n", ld, debugstr_w(base), scope, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p, %#lx, %#lx, %p)\n", ld, debugstr_w(base), scope,
debugstr_w(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, message ); debugstr_w(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, message );
if (!ld) return ~0u; if (!ld) return ~0u;
...@@ -203,7 +203,7 @@ ULONG CDECL ldap_search_ext_sA( LDAP *ld, char *base, ULONG scope, char *filter, ...@@ -203,7 +203,7 @@ ULONG CDECL ldap_search_ext_sA( LDAP *ld, char *base, ULONG scope, char *filter,
WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, %p, 0x%08x, %p)\n", ld, debugstr_a(base), scope, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p, %p, %#lx, %p)\n", ld, debugstr_a(base), scope,
debugstr_a(filter), attrs, attrsonly, serverctrls, clientctrls, timeout, sizelimit, res ); debugstr_a(filter), attrs, attrsonly, serverctrls, clientctrls, timeout, sizelimit, res );
if (!ld || !res) return LDAP_PARAM_ERROR; if (!ld || !res) return LDAP_PARAM_ERROR;
...@@ -262,7 +262,7 @@ ULONG CDECL ldap_search_ext_sW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filte ...@@ -262,7 +262,7 @@ ULONG CDECL ldap_search_ext_sW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filte
struct timevalU timevalU; struct timevalU timevalU;
void *msgU = NULL; void *msgU = NULL;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, %p, 0x%08x, %p)\n", ld, debugstr_w(base), scope, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p, %p, %#lx, %p)\n", ld, debugstr_w(base), scope,
debugstr_w(filter), attrs, attrsonly, serverctrls, clientctrls, timeout, sizelimit, res ); debugstr_w(filter), attrs, attrsonly, serverctrls, clientctrls, timeout, sizelimit, res );
if (!ld || !res) return LDAP_PARAM_ERROR; if (!ld || !res) return LDAP_PARAM_ERROR;
...@@ -320,7 +320,7 @@ ULONG CDECL ldap_search_sA( LDAP *ld, char *base, ULONG scope, char *filter, cha ...@@ -320,7 +320,7 @@ ULONG CDECL ldap_search_sA( LDAP *ld, char *base, ULONG scope, char *filter, cha
ULONG ret = LDAP_NO_MEMORY; ULONG ret = LDAP_NO_MEMORY;
WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs,
attrsonly, res ); attrsonly, res );
if (!ld || !res) return LDAP_PARAM_ERROR; if (!ld || !res) return LDAP_PARAM_ERROR;
...@@ -363,7 +363,7 @@ exit: ...@@ -363,7 +363,7 @@ exit:
ULONG CDECL ldap_search_sW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter, WCHAR **attrs, ULONG attrsonly, ULONG CDECL ldap_search_sW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter, WCHAR **attrs, ULONG attrsonly,
LDAPMessage **res ) LDAPMessage **res )
{ {
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs,
attrsonly, res ); attrsonly, res );
return ldap_search_ext_sW( ld, base, scope, filter, attrs, attrsonly, NULL, NULL, NULL, 0, res ); return ldap_search_ext_sW( ld, base, scope, filter, attrs, attrsonly, NULL, NULL, NULL, 0, res );
} }
...@@ -379,7 +379,7 @@ ULONG CDECL ldap_search_stA( LDAP *ld, const PCHAR base, ULONG scope, const PCHA ...@@ -379,7 +379,7 @@ ULONG CDECL ldap_search_stA( LDAP *ld, const PCHAR base, ULONG scope, const PCHA
ULONG ret = LDAP_NO_MEMORY; ULONG ret = LDAP_NO_MEMORY;
WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs,
attrsonly, timeout, res ); attrsonly, timeout, res );
if (!ld || !res) return LDAP_PARAM_ERROR; if (!ld || !res) return LDAP_PARAM_ERROR;
...@@ -423,7 +423,7 @@ exit: ...@@ -423,7 +423,7 @@ exit:
ULONG CDECL ldap_search_stW( LDAP *ld, const PWCHAR base, ULONG scope, const PWCHAR filter, WCHAR **attrs, ULONG CDECL ldap_search_stW( LDAP *ld, const PWCHAR base, ULONG scope, const PWCHAR filter, WCHAR **attrs,
ULONG attrsonly, struct l_timeval *timeout, LDAPMessage **res ) ULONG attrsonly, struct l_timeval *timeout, LDAPMessage **res )
{ {
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, TRACE( "(%p, %s, %#lx, %s, %p, %#lx, %p, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs,
attrsonly, timeout, res ); attrsonly, timeout, res );
return ldap_search_ext_sW( ld, base, scope, filter, attrs, attrsonly, NULL, NULL, timeout, 0, res ); return ldap_search_ext_sW( ld, base, scope, filter, attrs, attrsonly, NULL, NULL, timeout, 0, res );
} }
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wldap32.dll TESTDLL = wldap32.dll
IMPORTS = wldap32 IMPORTS = wldap32
......
...@@ -41,7 +41,7 @@ static void test_ber_printf(void) ...@@ -41,7 +41,7 @@ static void test_ber_printf(void)
ret = ber_flatten( ber, &bv ); ret = ber_flatten( ber, &bv );
ok( !ret, "got %d\n", ret ); ok( !ret, "got %d\n", ret );
todo_wine ok( bv->bv_len == 12, "got %d\n", bv->bv_len ); todo_wine ok( bv->bv_len == 12, "got %ld\n", bv->bv_len );
if (bv->bv_len == 12) ok( !memcmp( bv->bv_val, "0\x84\x00\x00\x00\x06\x02\x04\xff\xff\xff\xff", 12 ), "got %s\n", if (bv->bv_len == 12) ok( !memcmp( bv->bv_val, "0\x84\x00\x00\x00\x06\x02\x04\xff\xff\xff\xff", 12 ), "got %s\n",
wine_dbgstr_an(bv->bv_val, 12) ); wine_dbgstr_an(bv->bv_val, 12) );
ber_bvfree( bv ); ber_bvfree( bv );
......
...@@ -51,7 +51,7 @@ static void test_ldap_parse_sort_control( LDAP *ld ) ...@@ -51,7 +51,7 @@ static void test_ldap_parse_sort_control( LDAP *ld )
sortkeys[0] = &key; sortkeys[0] = &key;
sortkeys[1] = NULL; sortkeys[1] = NULL;
ret = ldap_create_sort_controlA( ld, sortkeys, 0, &sort ); ret = ldap_create_sort_controlA( ld, sortkeys, 0, &sort );
ok( !ret, "ldap_create_sort_controlA failed 0x%x\n", ret ); ok( !ret, "ldap_create_sort_controlA failed %#lx\n", ret );
ctrls[0] = sort; ctrls[0] = sort;
ctrls[1] = NULL; ctrls[1] = NULL;
...@@ -64,33 +64,33 @@ static void test_ldap_parse_sort_control( LDAP *ld ) ...@@ -64,33 +64,33 @@ static void test_ldap_parse_sort_control( LDAP *ld )
ldap_control_freeA( sort ); ldap_control_freeA( sort );
return; return;
} }
ok( !ret, "ldap_search_ext_sA failed 0x%x\n", ret ); ok( !ret, "ldap_search_ext_sA failed %#lx\n", ret );
ok( res != NULL, "expected res != NULL\n" ); ok( res != NULL, "expected res != NULL\n" );
if (GetProcAddress(GetModuleHandleA("wldap32.dll"), "ber_init")) if (GetProcAddress(GetModuleHandleA("wldap32.dll"), "ber_init"))
{ {
ret = ldap_parse_resultA( NULL, res, &result, NULL, NULL, NULL, &server_ctrls, 1 ); ret = ldap_parse_resultA( NULL, res, &result, NULL, NULL, NULL, &server_ctrls, 1 );
ok( ret == LDAP_PARAM_ERROR, "ldap_parse_resultA failed 0x%x\n", ret ); ok( ret == LDAP_PARAM_ERROR, "ldap_parse_resultA failed %#lx\n", ret );
} }
else else
win_skip("Test would crash on older wldap32 versions\n"); win_skip("Test would crash on older wldap32 versions\n");
result = ~0u; result = ~0u;
ret = ldap_parse_resultA( ld, res, &result, NULL, NULL, NULL, &server_ctrls, 1 ); ret = ldap_parse_resultA( ld, res, &result, NULL, NULL, NULL, &server_ctrls, 1 );
ok( !ret, "ldap_parse_resultA failed 0x%x\n", ret ); ok( !ret, "ldap_parse_resultA failed %#lx\n", ret );
ok( !result, "got 0x%x expected 0\n", result ); ok( !result, "got %#lx expected 0\n", result );
ret = ldap_parse_sort_controlA( NULL, NULL, NULL, NULL ); ret = ldap_parse_sort_controlA( NULL, NULL, NULL, NULL );
ok( ret == LDAP_PARAM_ERROR, "ldap_parse_sort_controlA failed 0x%d\n", ret ); ok( ret == LDAP_PARAM_ERROR, "ldap_parse_sort_controlA failed %#lx\n", ret );
ret = ldap_parse_sort_controlA( ld, NULL, NULL, NULL ); ret = ldap_parse_sort_controlA( ld, NULL, NULL, NULL );
ok( ret == LDAP_CONTROL_NOT_FOUND, "ldap_parse_sort_controlA failed 0x%x\n", ret ); ok( ret == LDAP_CONTROL_NOT_FOUND, "ldap_parse_sort_controlA failed %#lx\n", ret );
ret = ldap_parse_sort_controlA( ld, NULL, &result, NULL ); ret = ldap_parse_sort_controlA( ld, NULL, &result, NULL );
ok( ret == LDAP_CONTROL_NOT_FOUND, "ldap_parse_sort_controlA failed 0x%x\n", ret ); ok( ret == LDAP_CONTROL_NOT_FOUND, "ldap_parse_sort_controlA failed %#lx\n", ret );
ret = ldap_parse_sort_controlA( ld, server_ctrls, &result, NULL ); ret = ldap_parse_sort_controlA( ld, server_ctrls, &result, NULL );
ok( ret == LDAP_CONTROL_NOT_FOUND, "ldap_parse_sort_controlA failed 0x%x\n", ret ); ok( ret == LDAP_CONTROL_NOT_FOUND, "ldap_parse_sort_controlA failed %#lx\n", ret );
ldap_control_freeA( sort ); ldap_control_freeA( sort );
ldap_controls_freeA( server_ctrls ); ldap_controls_freeA( server_ctrls );
...@@ -108,11 +108,11 @@ static void test_ldap_search_extW( LDAP *ld ) ...@@ -108,11 +108,11 @@ static void test_ldap_search_extW( LDAP *ld )
skip("test server can't be reached\n"); skip("test server can't be reached\n");
return; return;
} }
ok( !ret, "ldap_search_extW failed 0x%08x\n", ret ); ok( !ret, "ldap_search_extW failed %#lx\n", ret );
timelimit = 0; timelimit = 0;
ret = ldap_search_extW( ld, base, LDAP_SCOPE_SUBTREE, filter, NULL, 0, NULL, NULL, timelimit, 0, &message ); ret = ldap_search_extW( ld, base, LDAP_SCOPE_SUBTREE, filter, NULL, 0, NULL, NULL, timelimit, 0, &message );
ok( !ret, "ldap_search_extW failed 0x%08x\n", ret ); ok( !ret, "ldap_search_extW failed %#lx\n", ret );
} }
static void test_ldap_set_optionW( LDAP *ld ) static void test_ldap_set_optionW( LDAP *ld )
...@@ -127,10 +127,10 @@ static void test_ldap_set_optionW( LDAP *ld ) ...@@ -127,10 +127,10 @@ static void test_ldap_set_optionW( LDAP *ld )
} }
ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF ); ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF );
ok( !ret || broken(ret == LDAP_PARAM_ERROR) /* nt4, win2k */, "ldap_set_optionW failed 0x%08x\n", ret ); ok( !ret || broken(ret == LDAP_PARAM_ERROR) /* nt4, win2k */, "ldap_set_optionW failed %#lx\n", ret );
ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, (void *)&oldvalue ); ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, (void *)&oldvalue );
ok( !ret, "ldap_set_optionW failed 0x%08x\n", ret ); ok( !ret, "ldap_set_optionW failed %#lx\n", ret );
} }
static void test_ldap_get_optionW( LDAP *ld ) static void test_ldap_get_optionW( LDAP *ld )
...@@ -138,8 +138,8 @@ static void test_ldap_get_optionW( LDAP *ld ) ...@@ -138,8 +138,8 @@ static void test_ldap_get_optionW( LDAP *ld )
ULONG ret, version; ULONG ret, version;
ret = ldap_get_optionW( ld, LDAP_OPT_PROTOCOL_VERSION, &version ); ret = ldap_get_optionW( ld, LDAP_OPT_PROTOCOL_VERSION, &version );
ok( !ret, "ldap_get_optionW failed 0x%08x\n", ret ); ok( !ret, "ldap_get_optionW failed %#lx\n", ret );
ok( version == LDAP_VERSION3, "got %u\n", version ); ok( version == LDAP_VERSION3, "got %lu\n", version );
} }
static void test_ldap_bind_sA( void ) static void test_ldap_bind_sA( void )
...@@ -161,10 +161,10 @@ static void test_ldap_bind_sA( void ) ...@@ -161,10 +161,10 @@ static void test_ldap_bind_sA( void )
} }
ret = ldap_connect( ld, NULL ); ret = ldap_connect( ld, NULL );
ok( !ret, "ldap_connect failed 0x%08x\n", ret ); ok( !ret, "ldap_connect failed %#lx\n", ret );
ret = ldap_bind_sA( ld, (char *)"CN=read-only-admin,DC=example,DC=com", (char *)"password", LDAP_AUTH_SIMPLE ); ret = ldap_bind_sA( ld, (char *)"CN=read-only-admin,DC=example,DC=com", (char *)"password", LDAP_AUTH_SIMPLE );
ok( !ret, "ldap_bind_s failed 0x%08x\n", ret ); ok( !ret, "ldap_bind_s failed %#lx\n", ret );
ldap_unbind( ld ); ldap_unbind( ld );
} }
...@@ -192,7 +192,7 @@ static void test_ldap_server_control( void ) ...@@ -192,7 +192,7 @@ static void test_ldap_server_control( void )
} }
ret = ldap_connect( ld, NULL ); ret = ldap_connect( ld, NULL );
ok( !ret, "ldap_connect failed 0x%08x\n", ret ); ok( !ret, "ldap_connect failed %#lx\n", ret );
/* test setting a not supported server control */ /* test setting a not supported server control */
mask.ldctl_oid = (WCHAR *)L"1.2.840.113556.1.4.801"; mask.ldctl_oid = (WCHAR *)L"1.2.840.113556.1.4.801";
...@@ -202,11 +202,11 @@ static void test_ldap_server_control( void ) ...@@ -202,11 +202,11 @@ static void test_ldap_server_control( void )
ctrls[0] = &mask; ctrls[0] = &mask;
ctrls[1] = NULL; ctrls[1] = NULL;
ret = ldap_set_optionW(ld, LDAP_OPT_SERVER_CONTROLS, ctrls); ret = ldap_set_optionW(ld, LDAP_OPT_SERVER_CONTROLS, ctrls);
ok( ret == LDAP_PARAM_ERROR, "ldap_set_optionW should fail: 0x%x\n", ret ); ok( ret == LDAP_PARAM_ERROR, "ldap_set_optionW should fail: %#lx\n", ret );
res = NULL; res = NULL;
ret = ldap_search_sA( ld, (char *)"OU=scientists,DC=example,DC=com", LDAP_SCOPE_BASE, (char *)"(objectclass=*)", NULL, FALSE, &res ); ret = ldap_search_sA( ld, (char *)"OU=scientists,DC=example,DC=com", LDAP_SCOPE_BASE, (char *)"(objectclass=*)", NULL, FALSE, &res );
ok( !ret, "ldap_search_sA failed 0x%x\n", ret ); ok( !ret, "ldap_search_sA failed %#lx\n", ret );
ok( res != NULL, "expected res != NULL\n" ); ok( res != NULL, "expected res != NULL\n" );
ldap_msgfree( res ); ldap_msgfree( res );
...@@ -242,12 +242,12 @@ static void test_ldap_paged_search(void) ...@@ -242,12 +242,12 @@ static void test_ldap_paged_search(void)
count = 0xdeadbeef; count = 0xdeadbeef;
res = NULL; res = NULL;
ret = ldap_get_next_page_s( ld, search, NULL, 1, &count, &res ); ret = ldap_get_next_page_s( ld, search, NULL, 1, &count, &res );
ok( !ret, "ldap_get_next_page_s failed 0x%x\n", ret ); ok( !ret, "ldap_get_next_page_s failed %#lx\n", ret );
ok( res != NULL, "expected res != NULL\n" ); ok( res != NULL, "expected res != NULL\n" );
ok( count == 0, "got %u\n", count ); ok( count == 0, "got %lu\n", count );
count = ldap_count_entries( ld, res); count = ldap_count_entries( ld, res);
ok( count == 1, "got %u\n", count ); ok( count == 1, "got %lu\n", count );
entry = ldap_first_entry( ld, res); entry = ldap_first_entry( ld, res);
ok( res != NULL, "expected entry != NULL\n" ); ok( res != NULL, "expected entry != NULL\n" );
...@@ -264,9 +264,9 @@ static void test_ldap_paged_search(void) ...@@ -264,9 +264,9 @@ static void test_ldap_paged_search(void)
count = 0xdeadbeef; count = 0xdeadbeef;
res = (void *)0xdeadbeef; res = (void *)0xdeadbeef;
ret = ldap_get_next_page_s( ld, search, NULL, 1, &count, &res ); ret = ldap_get_next_page_s( ld, search, NULL, 1, &count, &res );
ok( ret == LDAP_NO_RESULTS_RETURNED, "got 0x%x\n", ret ); ok( ret == LDAP_NO_RESULTS_RETURNED, "got %#lx\n", ret );
ok( !res, "expected res == NULL\n" ); ok( !res, "expected res == NULL\n" );
ok( count == 0, "got %u\n", count ); ok( count == 0, "got %lu\n", count );
ldap_search_abandon_page( ld, search ); ldap_search_abandon_page( ld, search );
ldap_unbind( ld ); ldap_unbind( ld );
......
Markdown is supported
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