[PATCH 07/17] dlls/adsldp: enable compilation with long types

Eric Pouech eric.pouech at gmail.com
Mon Feb 7 16:10:21 CST 2022


Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 dlls/adsldp/Makefile.in |    1 -
 dlls/adsldp/adsldp.c    |   72 ++++++++++++++++++++++++-----------------------
 dlls/adsldp/schema.c    |    8 +++--
 3 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/dlls/adsldp/Makefile.in b/dlls/adsldp/Makefile.in
index b2809938021..89b6b903013 100644
--- a/dlls/adsldp/Makefile.in
+++ b/dlls/adsldp/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = adsldp.dll
 IMPORTS   = ole32 oleaut32 secur32 activeds uuid
 DELAYIMPORTS = netapi32 wldap32
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
index f564bc6f6cc..c79a77211f3 100644
--- a/dlls/adsldp/adsldp.c
+++ b/dlls/adsldp/adsldp.c
@@ -218,21 +218,21 @@ static HRESULT WINAPI sysinfo_GetTypeInfoCount(IADsADSystemInfo *iface, UINT *co
 
 static HRESULT WINAPI sysinfo_GetTypeInfo(IADsADSystemInfo *iface, UINT index, LCID lcid, ITypeInfo **info)
 {
-    FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
+    FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI sysinfo_GetIDsOfNames(IADsADSystemInfo *iface, REFIID riid, LPOLESTR *names,
                                             UINT count, LCID lcid, DISPID *dispid)
 {
-    FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
+    FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI sysinfo_Invoke(IADsADSystemInfo *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
                                      DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
 {
-    FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
+    FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
           params, result, excepinfo, argerr);
     return E_NOTIMPL;
 }
@@ -515,21 +515,21 @@ static HRESULT WINAPI ldapns_GetTypeInfoCount(IADs *iface, UINT *count)
 
 static HRESULT WINAPI ldapns_GetTypeInfo(IADs *iface, UINT index, LCID lcid, ITypeInfo **info)
 {
-    FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
+    FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI ldapns_GetIDsOfNames(IADs *iface, REFIID riid, LPOLESTR *names,
                                            UINT count, LCID lcid, DISPID *dispid)
 {
-    FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
+    FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI ldapns_Invoke(IADs *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
                                     DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
 {
-    FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
+    FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
           params, result, excepinfo, argerr);
     return E_NOTIMPL;
 }
@@ -626,7 +626,7 @@ static HRESULT WINAPI ldapns_Get(IADs *iface, BSTR name, VARIANT *prop)
                 VARIANT item;
                 LONG idx;
 
-                TRACE("attr %s has %u values\n", debugstr_w(ldap->attrs[i].name), count);
+                TRACE("attr %s has %lu values\n", debugstr_w(ldap->attrs[i].name), count);
 
                 sa = SafeArrayCreateVector(VT_VARIANT, 0, count);
                 if (!sa) return E_OUTOFMEMORY;
@@ -682,7 +682,7 @@ static HRESULT WINAPI ldapns_GetEx(IADs *iface, BSTR name, VARIANT *prop)
 
 static HRESULT WINAPI ldapns_PutEx(IADs *iface, LONG code, BSTR name, VARIANT prop)
 {
-    FIXME("%p,%d,%s,%s: stub\n", iface, code, debugstr_w(name), wine_dbgstr_variant(&prop));
+    FIXME("%p,%ld,%s,%s: stub\n", iface, code, debugstr_w(name), wine_dbgstr_variant(&prop));
     return E_NOTIMPL;
 }
 
@@ -723,7 +723,7 @@ static HRESULT WINAPI ldapns_GetInfoEx(IADs *iface, VARIANT prop, LONG reserved)
     LDAPMessage *res = NULL, *entry;
     BerElement *ber;
 
-    TRACE("%p,%s,%d\n", iface, wine_dbgstr_variant(&prop), reserved);
+    TRACE("%p,%s,%ld\n", iface, wine_dbgstr_variant(&prop), reserved);
 
     free_attributes(ldap);
 
@@ -764,7 +764,7 @@ static HRESULT WINAPI ldapns_GetInfoEx(IADs *iface, VARIANT prop, LONG reserved)
     err = ldap_search_sW(ldap->ld, NULL, LDAP_SCOPE_BASE, (WCHAR *)L"(objectClass=*)", props, FALSE, &res);
     if (err != LDAP_SUCCESS)
     {
-        TRACE("ldap_search_sW error %#x\n", err);
+        TRACE("ldap_search_sW error %#lx\n", err);
         hr = HRESULT_FROM_WIN32(map_ldap_error(err));
         goto exit;
     }
@@ -870,21 +870,21 @@ static HRESULT WINAPI openobj_GetTypeInfoCount(IADsOpenDSObject *iface, UINT *co
 
 static HRESULT WINAPI openobj_GetTypeInfo(IADsOpenDSObject *iface, UINT index, LCID lcid, ITypeInfo **info)
 {
-    FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
+    FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI openobj_GetIDsOfNames(IADsOpenDSObject *iface, REFIID riid, LPOLESTR *names,
                                             UINT count, LCID lcid, DISPID *dispid)
 {
-    FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
+    FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI openobj_Invoke(IADsOpenDSObject *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
                                      DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
 {
-    FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
+    FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
           params, result, excepinfo, argerr);
     return E_NOTIMPL;
 }
@@ -964,12 +964,12 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
     ULONG err, at_single_count = 0, at_multiple_count = 0;
     struct attribute_type *at = NULL;
 
-    TRACE("%p,%s,%s,%p,%08x,%p\n", iface, debugstr_w(path), debugstr_w(user), password, flags, obj);
+    TRACE("%p,%s,%s,%p,%08lx,%p\n", iface, debugstr_w(path), debugstr_w(user), password, flags, obj);
 
     hr = parse_path(path, &host, &port, &object);
     if (hr != S_OK) return hr;
 
-    TRACE("host %s, port %u, object %s\n", debugstr_w(host), port, debugstr_w(object));
+    TRACE("host %s, port %lu, object %s\n", debugstr_w(host), port, debugstr_w(object));
 
     if (host)
     {
@@ -1043,7 +1043,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
             err = ldap_bind_sW(ld, NULL, (WCHAR *)&id, LDAP_AUTH_NEGOTIATE);
             if (err != LDAP_SUCCESS)
             {
-                TRACE("ldap_bind_sW error %#x\n", err);
+                TRACE("ldap_bind_sW error %#lx\n", err);
                 hr = HRESULT_FROM_WIN32(map_ldap_error(err));
                 ldap_unbind(ld);
                 goto fail;
@@ -1054,7 +1054,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
             err = ldap_simple_bind_sW(ld, user, password);
             if (err != LDAP_SUCCESS)
             {
-                TRACE("ldap_simple_bind_sW error %#x\n", err);
+                TRACE("ldap_simple_bind_sW error %#lx\n", err);
                 hr = HRESULT_FROM_WIN32(map_ldap_error(err));
                 ldap_unbind(ld);
                 goto fail;
@@ -1140,7 +1140,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
     HRESULT hr = S_OK;
     DWORD i;
 
-    TRACE("%p,%p,%u\n", iface, prefs, count);
+    TRACE("%p,%p,%lu\n", iface, prefs, count);
 
     for (i = 0; i < count; i++)
     {
@@ -1159,7 +1159,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
             case ADS_SCOPE_BASE:
             case ADS_SCOPE_ONELEVEL:
             case ADS_SCOPE_SUBTREE:
-                TRACE("SEARCH_SCOPE: %d\n", prefs[i].vValue.u.Integer);
+                TRACE("SEARCH_SCOPE: %ld\n", prefs[i].vValue.u.Integer);
                 ldap->search.scope = prefs[i].vValue.u.Integer;
                 prefs[i].dwStatus = ADS_STATUS_S_OK;
                 break;
@@ -1185,7 +1185,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
                 break;
             }
 
-            TRACE("SECURITY_MASK: %08x\n", prefs[i].vValue.u.Integer);
+            TRACE("SECURITY_MASK: %08lx\n", prefs[i].vValue.u.Integer);
             security_mask = prefs[i].vValue.u.Integer;
             if (!security_mask)
                 security_mask = ADS_SECURITY_INFO_OWNER;
@@ -1208,7 +1208,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
             err = ldap_set_optionW(ldap->ld, LDAP_OPT_SERVER_CONTROLS, ctrls);
             if (err != LDAP_SUCCESS)
             {
-                TRACE("ldap_set_option error %#x\n", err);
+                TRACE("ldap_set_option error %#lx\n", err);
                 prefs[i].dwStatus = ADS_STATUS_INVALID_SEARCHPREF;
                 hr = S_ADS_ERRORSOCCURRED;
             }
@@ -1228,7 +1228,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
                 break;
             }
 
-            TRACE("PAGESIZE: %d\n", prefs[i].vValue.u.Integer);
+            TRACE("PAGESIZE: %ld\n", prefs[i].vValue.u.Integer);
             ldap->search.pagesize = prefs[i].vValue.u.Integer;
             prefs[i].dwStatus = ADS_STATUS_S_OK;
             break;
@@ -1241,7 +1241,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
                 break;
             }
 
-            TRACE("CACHE_RESULTS: %d\n", prefs[i].vValue.u.Boolean);
+            TRACE("CACHE_RESULTS: %ld\n", prefs[i].vValue.u.Boolean);
             ldap->search.cache_results = prefs[i].vValue.u.Boolean;
             prefs[i].dwStatus = ADS_STATUS_S_OK;
             break;
@@ -1254,7 +1254,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
                 break;
             }
 
-            TRACE("ATTRIBTYPES_ONLY: %d\n", prefs[i].vValue.u.Boolean);
+            TRACE("ATTRIBTYPES_ONLY: %ld\n", prefs[i].vValue.u.Boolean);
             ldap->search.attribtypes_only = prefs[i].vValue.u.Boolean;
             prefs[i].dwStatus = ADS_STATUS_S_OK;
             break;
@@ -1267,7 +1267,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
                 break;
             }
 
-            TRACE("TOMBSTONE: %d\n", prefs[i].vValue.u.Boolean);
+            TRACE("TOMBSTONE: %ld\n", prefs[i].vValue.u.Boolean);
             ldap->search.tombstone = prefs[i].vValue.u.Boolean;
             prefs[i].dwStatus = ADS_STATUS_S_OK;
             break;
@@ -1291,7 +1291,7 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
     LDAPControlW **ctrls = NULL, *ctrls_a[2], tombstone;
     struct ldap_search_context *ldap_ctx;
 
-    TRACE("%p,%s,%p,%u,%p\n", iface, debugstr_w(filter), names, count, res);
+    TRACE("%p,%s,%p,%lu,%p\n", iface, debugstr_w(filter), names, count, res);
 
     if (!res) return E_ADS_BAD_PARAMETER;
 
@@ -1352,7 +1352,7 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
     heap_free(props);
     if (err != LDAP_SUCCESS)
     {
-        TRACE("ldap_search_sW error %#x\n", err);
+        TRACE("ldap_search_sW error %#lx\n", err);
         if (ldap_ctx->page)
             ldap_search_abandon_page(ldap->ld, ldap_ctx->page);
         heap_free(ldap_ctx);
@@ -1427,7 +1427,7 @@ static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HAND
 
                 if (err != LDAP_NO_RESULTS_RETURNED)
                 {
-                    TRACE("ldap_get_next_page_s error %#x\n", err);
+                    TRACE("ldap_get_next_page_s error %#lx\n", err);
                     return HRESULT_FROM_WIN32(map_ldap_error(err));
                 }
                 /* fall through */
@@ -1561,7 +1561,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
                 FIXME("not recognized boolean value %s\n", debugstr_w(values[i]));
                 col->pADsValues[i].u.Boolean = 0;
             }
-            TRACE("%s => %d\n", debugstr_w(values[i]), col->pADsValues[i].u.Boolean);
+            TRACE("%s => %ld\n", debugstr_w(values[i]), col->pADsValues[i].u.Boolean);
         }
 
         ldap_value_freeW(values);
@@ -1596,7 +1596,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
             else
             {
                 col->pADsValues[i].u.Integer = atol(values[i]->bv_val);
-                TRACE("%s => %d\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), col->pADsValues[i].u.Integer);
+                TRACE("%s => %ld\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), col->pADsValues[i].u.Integer);
             }
         }
 
@@ -1738,7 +1738,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
                 FIXME("wrong DN with binary separator '%c'\n", *p);
             col->pADsValues[i].u.pDNWithBinary->pszDNString = p + 1;
 
-            TRACE("%s => %u,%s,%s\n", debugstr_w(values[i]),
+            TRACE("%s => %lu,%s,%s\n", debugstr_w(values[i]),
                   col->pADsValues[i].u.pDNWithBinary->dwLength,
                   debugstr_an((char *)col->pADsValues[i].u.pDNWithBinary->lpBinaryValue, col->pADsValues[i].u.pDNWithBinary->dwLength),
                   debugstr_w(col->pADsValues[i].u.pDNWithBinary->pszDNString));
@@ -1915,21 +1915,21 @@ static HRESULT WINAPI dirobj_GetObjectInformation(IDirectoryObject *iface, PADS_
 static HRESULT WINAPI dirobj_GetObjectAttributes(IDirectoryObject *iface, LPWSTR *names,
                                                  DWORD count, PADS_ATTR_INFO *attrs, DWORD *count_returned)
 {
-    FIXME("%p,%p,%u,%p,%p: stub\n", iface, names, count, attrs, count_returned);
+    FIXME("%p,%p,%lu,%p,%p: stub\n", iface, names, count, attrs, count_returned);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI dirobj_SetObjectAttributes(IDirectoryObject *iface, PADS_ATTR_INFO attrs,
                                                  DWORD count, DWORD *count_set)
 {
-    FIXME("%p,%p,%u,%p: stub\n", iface, attrs, count, count_set);
+    FIXME("%p,%p,%lu,%p: stub\n", iface, attrs, count, count_set);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI dirobj_CreateDSObject(IDirectoryObject *iface, LPWSTR name,
                                             PADS_ATTR_INFO attrs, DWORD count, IDispatch **obj)
 {
-    FIXME("%p,%s,%p,%u,%p: stub\n", iface, debugstr_w(name), attrs, count, obj);
+    FIXME("%p,%s,%p,%lu,%p: stub\n", iface, debugstr_w(name), attrs, count, obj);
     return E_NOTIMPL;
 }
 
@@ -2032,7 +2032,7 @@ static ULONG WINAPI factory_AddRef(IClassFactory *iface)
     class_factory *factory = impl_from_IClassFactory(iface);
     ULONG ref = InterlockedIncrement(&factory->ref);
 
-    TRACE("(%p) ref %u\n", iface, ref);
+    TRACE("(%p) ref %lu\n", iface, ref);
 
     return ref;
 }
@@ -2042,7 +2042,7 @@ static ULONG WINAPI factory_Release(IClassFactory *iface)
     class_factory *factory = impl_from_IClassFactory(iface);
     ULONG ref = InterlockedDecrement(&factory->ref);
 
-    TRACE("(%p) ref %u\n", iface, ref);
+    TRACE("(%p) ref %lu\n", iface, ref);
 
     if (!ref)
         heap_free(factory);
diff --git a/dlls/adsldp/schema.c b/dlls/adsldp/schema.c
index abf8793b840..7a530cc57e3 100644
--- a/dlls/adsldp/schema.c
+++ b/dlls/adsldp/schema.c
@@ -198,7 +198,7 @@ static WCHAR *parse_name(WCHAR **str, ULONG *name_count)
             tmp_name = parse_name(&p, &dummy);
             if (!tmp_name) break;
 
-            TRACE("NAME[%u] %s\n", *name_count, debugstr_w(tmp_name));
+            TRACE("NAME[%lu] %s\n", *name_count, debugstr_w(tmp_name));
 
             count = wcslen(tmp_name);
 
@@ -368,7 +368,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_m
     err = ldap_search_sW(ld, NULL, LDAP_SCOPE_BASE, (WCHAR *)L"(objectClass=*)", subschema, FALSE, &res);
     if (err != LDAP_SUCCESS)
     {
-        TRACE("ldap_search_sW error %#x\n", err);
+        TRACE("ldap_search_sW error %#lx\n", err);
         return NULL;
     }
 
@@ -382,7 +382,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_m
     err = ldap_search_sW(ld, schema[0], LDAP_SCOPE_BASE, (WCHAR *)L"(objectClass=*)", attribute_types, FALSE, &res);
     if (err != LDAP_SUCCESS)
     {
-        TRACE("ldap_search_sW error %#x\n", err);
+        TRACE("ldap_search_sW error %#lx\n", err);
         ldap_value_freeW(schema);
         return NULL;
     }
@@ -419,7 +419,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_m
                     continue;
                 }
 
-                TRACE("oid %s, name %s, name_count %u, syntax %s, single-value %d\n", debugstr_w(at[count].oid),
+                TRACE("oid %s, name %s, name_count %lu, syntax %s, single-value %d\n", debugstr_w(at[count].oid),
                       debugstr_w(at[count].name), at[count].name_count, debugstr_w(at[count].syntax), at[count].single_value);
 
                 if (at[count].name_count > 1)




More information about the wine-devel mailing list