[PATCH 1/3] wldap32: Build without -DWINE_NO_LONG_TYPES.
Hans Leidekker
hans at codeweavers.com
Tue Feb 15 03:32:48 CST 2022
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
dlls/wldap32/Makefile.in | 1 -
dlls/wldap32/bind.c | 10 +++----
dlls/wldap32/dn.c | 4 +--
dlls/wldap32/error.c | 8 +++---
dlls/wldap32/extended.c | 2 +-
dlls/wldap32/init.c | 20 +++++++-------
dlls/wldap32/main.c | 2 +-
dlls/wldap32/misc.c | 8 +++---
dlls/wldap32/option.c | 2 +-
dlls/wldap32/page.c | 15 +++++-----
dlls/wldap32/search.c | 20 +++++++-------
dlls/wldap32/tests/Makefile.in | 1 -
dlls/wldap32/tests/ber.c | 2 +-
dlls/wldap32/tests/parse.c | 50 +++++++++++++++++-----------------
14 files changed, 72 insertions(+), 73 deletions(-)
diff --git a/dlls/wldap32/Makefile.in b/dlls/wldap32/Makefile.in
index ba60d525ac6..088b1c3abf5 100644
--- a/dlls/wldap32/Makefile.in
+++ b/dlls/wldap32/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wldap32.dll
UNIXLIB = wldap32.so
IMPORTLIB = wldap32
diff --git a/dlls/wldap32/bind.c b/dlls/wldap32/bind.c
index 9dc9b29bac4..160a3d1ed30 100644
--- a/dlls/wldap32/bind.c
+++ b/dlls/wldap32/bind.c
@@ -41,7 +41,7 @@ ULONG CDECL ldap_bindA( LDAP *ld, char *dn, char *cred, ULONG method )
ULONG ret = LDAP_NO_MEMORY;
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;
@@ -81,7 +81,7 @@ ULONG CDECL ldap_bindW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
struct bervalU pwd = { 0, NULL };
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 (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 )
ULONG ret = LDAP_NO_MEMORY;
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;
@@ -162,7 +162,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
char *dnU = NULL, *credU = 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;
@@ -224,7 +224,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
}
else
{
- FIXME( "method %#x not supported\n", method );
+ FIXME( "method %#lx not supported\n", method );
return LDAP_PARAM_ERROR;
}
diff --git a/dlls/wldap32/dn.c b/dlls/wldap32/dn.c
index 40e62fafa1e..d18ff88d9aa 100644
--- a/dlls/wldap32/dn.c
+++ b/dlls/wldap32/dn.c
@@ -96,7 +96,7 @@ char ** CDECL ldap_explode_dnA( char *dn, ULONG notypes )
char **ret;
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;
@@ -130,7 +130,7 @@ WCHAR ** CDECL ldap_explode_dnW( WCHAR *dn, ULONG notypes )
WCHAR **ret = NULL;
char *dnU, **retU;
- TRACE( "(%s, 0x%08x)\n", debugstr_w(dn), notypes );
+ TRACE( "(%s, %#lx)\n", debugstr_w(dn), notypes );
if ((dnU = strWtoU( dn )))
{
diff --git a/dlls/wldap32/error.c b/dlls/wldap32/error.c
index 8b6881bdc90..a72babf830d 100644
--- a/dlls/wldap32/error.c
+++ b/dlls/wldap32/error.c
@@ -67,7 +67,7 @@ char * CDECL ldap_err2stringA( ULONG err )
{
static char buf[256] = "";
- TRACE( "(0x%08x)\n", err );
+ TRACE( "(%#lx)\n", err );
if (err <= LDAP_REFERRAL_LIMIT_EXCEEDED)
LoadStringA( hwldap32, err, buf, 256 );
@@ -97,7 +97,7 @@ WCHAR * CDECL ldap_err2stringW( ULONG err )
{
static WCHAR buf[256] = { 0 };
- TRACE( "(0x%08x)\n", err );
+ TRACE( "(%#lx)\n", err );
if (err <= LDAP_REFERRAL_LIMIT_EXCEEDED)
LoadStringW( hwldap32, err, buf, 256 );
@@ -148,7 +148,7 @@ ULONG CDECL ldap_result2error( LDAP *ld, LDAPMessage *res, ULONG free )
{
int error;
- TRACE( "(%p, %p, 0x%08x)\n", ld, res, free );
+ TRACE( "(%p, %p, %#lx)\n", ld, res, free );
if (ld && res)
{
@@ -289,7 +289,7 @@ static const ULONG errormap[] = {
*/
ULONG CDECL LdapMapErrorToWin32( ULONG err )
{
- TRACE( "(0x%08x)\n", err );
+ TRACE( "(%#lx)\n", err );
if (err >= ARRAY_SIZE( errormap )) return ERROR_DS_GENERIC_ERROR;
return errormap[err];
diff --git a/dlls/wldap32/extended.c b/dlls/wldap32/extended.c
index 85e000f52c1..e693ae034f1 100644
--- a/dlls/wldap32/extended.c
+++ b/dlls/wldap32/extended.c
@@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
*/
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;
return LDAP_SUCCESS;
diff --git a/dlls/wldap32/init.c b/dlls/wldap32/init.c
index e62fd2fe794..bd9c8cb4277 100644
--- a/dlls/wldap32/init.c
+++ b/dlls/wldap32/init.c
@@ -118,10 +118,10 @@ static char *join_hostnames( const char *scheme, char **hostnames, ULONG portnum
{
char *res, *p, *q, **v;
unsigned int i = 0, size = 0;
- static const char sep[] = " ", fmt[] = ":%d";
+ static const char sep[] = " ";
char port[7];
- sprintf( port, fmt, portnumber );
+ sprintf( port, ":%lu", portnumber );
for (v = hostnames; *v; v++)
{
@@ -220,7 +220,7 @@ LDAP * CDECL cldap_openA( char *hostname, ULONG portnumber )
LDAP *ld;
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;
@@ -256,7 +256,7 @@ LDAP * CDECL cldap_openW( WCHAR *hostname, ULONG portnumber )
LDAP *ld = 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 (!(url = urlify_hostnames( "cldap://", hostnameU, portnumber ))) goto exit;
@@ -305,7 +305,7 @@ LDAP * CDECL ldap_initA( const PCHAR hostname, ULONG portnumber )
LDAP *ld;
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;
@@ -342,7 +342,7 @@ LDAP * CDECL ldap_initW( const PWCHAR hostname, ULONG portnumber )
LDAP *ld = 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 (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit;
@@ -365,7 +365,7 @@ LDAP * CDECL ldap_openA( char *hostname, ULONG portnumber )
LDAP *ld;
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;
@@ -401,7 +401,7 @@ LDAP * CDECL ldap_openW( WCHAR *hostname, ULONG portnumber )
LDAP *ld = 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 (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit;
@@ -424,7 +424,7 @@ LDAP * CDECL ldap_sslinitA( char *hostname, ULONG portnumber, int secure )
LDAP *ld;
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;
@@ -462,7 +462,7 @@ LDAP * CDECL ldap_sslinitW( WCHAR *hostname, ULONG portnumber, int secure )
LDAP *ld = 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;
diff --git a/dlls/wldap32/main.c b/dlls/wldap32/main.c
index 375730ddeca..2fffb11f064 100644
--- a/dlls/wldap32/main.c
+++ b/dlls/wldap32/main.c
@@ -34,7 +34,7 @@ unixlib_handle_t ldap_handle = 0;
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)
{
diff --git a/dlls/wldap32/misc.c b/dlls/wldap32/misc.c
index c3821056693..697f1d3ad5e 100644
--- a/dlls/wldap32/misc.c
+++ b/dlls/wldap32/misc.c
@@ -45,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
*/
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;
else
@@ -223,7 +223,7 @@ ULONG CDECL ldap_escape_filter_elementA( char *src, ULONG srclen, char *dst, ULO
{
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 (!src || dstlen < len) return LDAP_PARAM_ERROR;
@@ -251,7 +251,7 @@ ULONG CDECL ldap_escape_filter_elementW( char *src, ULONG srclen, WCHAR *dst, UL
{
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;
@@ -629,7 +629,7 @@ ULONG CDECL ldap_result( LDAP *ld, ULONG msgid, ULONG all, struct l_timeval *tim
void *msgU = NULL;
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)
{
diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c
index d68c3a9981c..efd0d4586b9 100644
--- a/dlls/wldap32/option.c
+++ b/dlls/wldap32/option.c
@@ -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 };
LDAP_CALL( ldap_get_values_len, &get_params );
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;
}
}
diff --git a/dlls/wldap32/page.c b/dlls/wldap32/page.c
index 9f4acbdaa16..e36d0ad5615 100644
--- a/dlls/wldap32/page.c
+++ b/dlls/wldap32/page.c
@@ -45,7 +45,7 @@ ULONG CDECL ldap_create_page_controlA( LDAP *ld, ULONG pagesize, struct berval *
ULONG ret;
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;
@@ -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,
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;
return create_page_control( pagesize, cookie, critical, control );
@@ -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 )
{
- 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;
return LDAP_NOT_SUPPORTED;
@@ -148,7 +148,7 @@ ULONG CDECL ldap_get_next_page_s( LDAP *ld, LDAPSearch *search, struct l_timeval
{
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;
@@ -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 );
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 );
return ret;
@@ -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,
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 );
return NULL;
}
@@ -304,7 +305,7 @@ LDAPSearch * CDECL ldap_search_init_pageW( LDAP *ld, WCHAR *dn, ULONG scope, WCH
LDAPSearch *search;
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 );
if (!(search = calloc( 1, sizeof(*search) )))
diff --git a/dlls/wldap32/search.c b/dlls/wldap32/search.c
index b360ab5366c..a673851b148 100644
--- a/dlls/wldap32/search.c
+++ b/dlls/wldap32/search.c
@@ -40,7 +40,7 @@ ULONG CDECL ldap_searchA( LDAP *ld, char *base, ULONG scope, char *filter, char
ULONG ret = LDAP_NO_MEMORY;
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;
@@ -83,7 +83,7 @@ exit:
ULONG CDECL ldap_searchW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter, WCHAR **attrs, ULONG attrsonly )
{
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 );
if (ret == LDAP_SUCCESS) return msg;
@@ -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;
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 );
if (!ld) return LDAP_PARAM_ERROR;
@@ -162,7 +162,7 @@ ULONG CDECL ldap_search_extW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter,
LDAPControlU **serverctrlsU = NULL, **clientctrlsU = NULL;
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 );
if (!ld) return ~0u;
@@ -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;
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 );
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
struct timevalU timevalU;
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 );
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
ULONG ret = LDAP_NO_MEMORY;
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 );
if (!ld || !res) return LDAP_PARAM_ERROR;
@@ -363,7 +363,7 @@ exit:
ULONG CDECL ldap_search_sW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter, WCHAR **attrs, ULONG attrsonly,
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 );
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
ULONG ret = LDAP_NO_MEMORY;
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 );
if (!ld || !res) return LDAP_PARAM_ERROR;
@@ -423,7 +423,7 @@ exit:
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 )
{
- 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 );
return ldap_search_ext_sW( ld, base, scope, filter, attrs, attrsonly, NULL, NULL, timeout, 0, res );
}
diff --git a/dlls/wldap32/tests/Makefile.in b/dlls/wldap32/tests/Makefile.in
index 7fc7a026023..05fe5b9af6d 100644
--- a/dlls/wldap32/tests/Makefile.in
+++ b/dlls/wldap32/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wldap32.dll
IMPORTS = wldap32
diff --git a/dlls/wldap32/tests/ber.c b/dlls/wldap32/tests/ber.c
index 56d54fa6f5a..64565efbcbe 100644
--- a/dlls/wldap32/tests/ber.c
+++ b/dlls/wldap32/tests/ber.c
@@ -41,7 +41,7 @@ static void test_ber_printf(void)
ret = ber_flatten( ber, &bv );
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",
wine_dbgstr_an(bv->bv_val, 12) );
ber_bvfree( bv );
diff --git a/dlls/wldap32/tests/parse.c b/dlls/wldap32/tests/parse.c
index 8deebcbc6bf..8ed95dd03f2 100644
--- a/dlls/wldap32/tests/parse.c
+++ b/dlls/wldap32/tests/parse.c
@@ -51,7 +51,7 @@ static void test_ldap_parse_sort_control( LDAP *ld )
sortkeys[0] = &key;
sortkeys[1] = NULL;
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[1] = NULL;
@@ -64,33 +64,33 @@ static void test_ldap_parse_sort_control( LDAP *ld )
ldap_control_freeA( sort );
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" );
if (GetProcAddress(GetModuleHandleA("wldap32.dll"), "ber_init"))
{
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
win_skip("Test would crash on older wldap32 versions\n");
result = ~0u;
ret = ldap_parse_resultA( ld, res, &result, NULL, NULL, NULL, &server_ctrls, 1 );
- ok( !ret, "ldap_parse_resultA failed 0x%x\n", ret );
- ok( !result, "got 0x%x expected 0\n", result );
+ ok( !ret, "ldap_parse_resultA failed %#lx\n", ret );
+ ok( !result, "got %#lx expected 0\n", result );
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 );
- 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 );
- 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 );
- 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_controls_freeA( server_ctrls );
@@ -108,11 +108,11 @@ static void test_ldap_search_extW( LDAP *ld )
skip("test server can't be reached\n");
return;
}
- ok( !ret, "ldap_search_extW failed 0x%08x\n", ret );
+ ok( !ret, "ldap_search_extW failed %#lx\n", ret );
timelimit = 0;
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 )
@@ -127,10 +127,10 @@ static void test_ldap_set_optionW( LDAP *ld )
}
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 );
- 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 )
@@ -138,8 +138,8 @@ static void test_ldap_get_optionW( LDAP *ld )
ULONG ret, version;
ret = ldap_get_optionW( ld, LDAP_OPT_PROTOCOL_VERSION, &version );
- ok( !ret, "ldap_get_optionW failed 0x%08x\n", ret );
- ok( version == LDAP_VERSION3, "got %u\n", version );
+ ok( !ret, "ldap_get_optionW failed %#lx\n", ret );
+ ok( version == LDAP_VERSION3, "got %lu\n", version );
}
static void test_ldap_bind_sA( void )
@@ -161,10 +161,10 @@ static void test_ldap_bind_sA( void )
}
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 );
- ok( !ret, "ldap_bind_s failed 0x%08x\n", ret );
+ ok( !ret, "ldap_bind_s failed %#lx\n", ret );
ldap_unbind( ld );
}
@@ -192,7 +192,7 @@ static void test_ldap_server_control( void )
}
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 */
mask.ldctl_oid = (WCHAR *)L"1.2.840.113556.1.4.801";
@@ -202,11 +202,11 @@ static void test_ldap_server_control( void )
ctrls[0] = &mask;
ctrls[1] = NULL;
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;
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" );
ldap_msgfree( res );
@@ -242,12 +242,12 @@ static void test_ldap_paged_search(void)
count = 0xdeadbeef;
res = NULL;
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( count == 0, "got %u\n", count );
+ ok( count == 0, "got %lu\n", count );
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);
ok( res != NULL, "expected entry != NULL\n" );
@@ -264,9 +264,9 @@ static void test_ldap_paged_search(void)
count = 0xdeadbeef;
res = (void *)0xdeadbeef;
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( count == 0, "got %u\n", count );
+ ok( count == 0, "got %lu\n", count );
ldap_search_abandon_page( ld, search );
ldap_unbind( ld );
--
2.30.2
More information about the wine-devel
mailing list