[PATCH 24/28] dlls/secur32: enable compilation with long types

Eric Pouech eric.pouech at gmail.com
Thu Feb 17 00:12:45 CST 2022


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

---
 dlls/secur32/Makefile.in       |    1 -
 dlls/secur32/lsa.c             |   46 ++++++++++++-------------
 dlls/secur32/negotiate.c       |   26 +++++++-------
 dlls/secur32/schannel.c        |   74 ++++++++++++++++++++--------------------
 dlls/secur32/schannel_gnutls.c |    7 ++--
 dlls/secur32/secur32.c         |   10 +++--
 dlls/secur32/thunks.c          |   32 +++++++++--------
 dlls/secur32/wrapper.c         |   36 ++++++++++---------
 8 files changed, 116 insertions(+), 116 deletions(-)

diff --git a/dlls/secur32/Makefile.in b/dlls/secur32/Makefile.in
index e4c6927656a..5b71cd82417 100644
--- a/dlls/secur32/Makefile.in
+++ b/dlls/secur32/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = secur32.dll
 IMPORTLIB = secur32
 UNIXLIB   = secur32.so
diff --git a/dlls/secur32/lsa.c b/dlls/secur32/lsa.c
index bd3cac4704f..adb8545c4c8 100644
--- a/dlls/secur32/lsa.c
+++ b/dlls/secur32/lsa.c
@@ -75,7 +75,7 @@ NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE lsa_handle, ULONG package_id
 {
     ULONG i;
 
-    TRACE("%p,%u,%p,%u,%p,%p,%p\n", lsa_handle, package_id, in_buffer,
+    TRACE("%p,%lu,%p,%lu,%p,%p,%p\n", lsa_handle, package_id, in_buffer,
         in_buffer_length, out_buffer, out_buffer_length, status);
 
     for (i = 0; i < loaded_packages_count; i++)
@@ -169,7 +169,7 @@ NTSTATUS WINAPI LsaLogonUser(HANDLE LsaHandle, PLSA_STRING OriginName,
         PVOID* ProfileBuffer, PULONG ProfileBufferLength, PLUID LogonId,
         PHANDLE Token, PQUOTA_LIMITS Quotas, PNTSTATUS SubStatus)
 {
-    FIXME("%p %s %d %d %p %d %p %p %p %p %p %p %p %p stub\n", LsaHandle,
+    FIXME("%p %s %d %ld %p %ld %p %p %p %p %p %p %p %p stub\n", LsaHandle,
             debugstr_as(OriginName), LogonType, AuthenticationPackage,
             AuthenticationInformation, AuthenticationInformationLength,
             LocalGroups, SourceContext, ProfileBuffer, ProfileBufferLength,
@@ -192,7 +192,7 @@ static NTSTATUS NTAPI lsa_DeleteLogonSession(LUID *logon_id)
 static NTSTATUS NTAPI lsa_AddCredential(LUID *logon_id, ULONG package_id,
     LSA_STRING *primary_key, LSA_STRING *credentials)
 {
-    FIXME("%p,%u,%s,%s: stub\n", logon_id, package_id,
+    FIXME("%p,%lu,%s,%s: stub\n", logon_id, package_id,
         debugstr_as(primary_key), debugstr_as(credentials));
     return STATUS_NOT_IMPLEMENTED;
 }
@@ -200,20 +200,20 @@ static NTSTATUS NTAPI lsa_AddCredential(LUID *logon_id, ULONG package_id,
 static NTSTATUS NTAPI lsa_GetCredentials(LUID *logon_id, ULONG package_id, ULONG *context,
     BOOLEAN retrieve_all, LSA_STRING *primary_key, ULONG *primary_key_len, LSA_STRING *credentials)
 {
-    FIXME("%p,%#x,%p,%d,%p,%p,%p: stub\n", logon_id, package_id, context,
+    FIXME("%p,%#lx,%p,%d,%p,%p,%p: stub\n", logon_id, package_id, context,
         retrieve_all, primary_key, primary_key_len, credentials);
     return STATUS_NOT_IMPLEMENTED;
 }
 
 static NTSTATUS NTAPI lsa_DeleteCredential(LUID *logon_id, ULONG package_id, LSA_STRING *primary_key)
 {
-    FIXME("%p,%#x,%s: stub\n", logon_id, package_id, debugstr_as(primary_key));
+    FIXME("%p,%#lx,%s: stub\n", logon_id, package_id, debugstr_as(primary_key));
     return STATUS_NOT_IMPLEMENTED;
 }
 
 static void * NTAPI lsa_AllocateLsaHeap(ULONG size)
 {
-    TRACE("%u\n", size);
+    TRACE("%lu\n", size);
     return malloc(size);
 }
 
@@ -225,7 +225,7 @@ static void NTAPI lsa_FreeLsaHeap(void *p)
 
 static NTSTATUS NTAPI lsa_AllocateClientBuffer(PLSA_CLIENT_REQUEST req, ULONG size, void **p)
 {
-    TRACE("%p,%u,%p\n", req, size, p);
+    TRACE("%p,%lu,%p\n", req, size, p);
     *p = malloc(size);
     return *p ? STATUS_SUCCESS : STATUS_NO_MEMORY;
 }
@@ -239,14 +239,14 @@ static NTSTATUS NTAPI lsa_FreeClientBuffer(PLSA_CLIENT_REQUEST req, void *p)
 
 static NTSTATUS NTAPI lsa_CopyToClientBuffer(PLSA_CLIENT_REQUEST req, ULONG size, void *client, void *buf)
 {
-    TRACE("%p,%u,%p,%p\n", req, size, client, buf);
+    TRACE("%p,%lu,%p,%p\n", req, size, client, buf);
     memcpy(client, buf, size);
     return STATUS_SUCCESS;
 }
 
 static NTSTATUS NTAPI lsa_CopyFromClientBuffer(PLSA_CLIENT_REQUEST req, ULONG size, void *buf, void *client)
 {
-    TRACE("%p,%u,%p,%p\n", req, size, buf, client);
+    TRACE("%p,%lu,%p,%p\n", req, size, buf, client);
     memcpy(buf, client, size);
     return STATUS_SUCCESS;
 }
@@ -268,7 +268,7 @@ static LSA_DISPATCH_TABLE lsa_dispatch =
 
 static NTSTATUS NTAPI lsa_RegisterCallback(ULONG callback_id, PLSA_CALLBACK_FUNCTION callback)
 {
-    FIXME("%u,%p: stub\n", callback_id, callback);
+    FIXME("%lu,%p: stub\n", callback_id, callback);
     return STATUS_NOT_IMPLEMENTED;
 }
 
@@ -315,7 +315,7 @@ static SECURITY_STATUS WINAPI lsa_AcquireCredentialsHandleW(
     UNICODE_STRING principal_us;
     LSA_SEC_HANDLE lsa_credential;
 
-    TRACE("%s %s %#x %p %p %p %p %p\n", debugstr_w(principal), debugstr_w(package),
+    TRACE("%s %s %#lx %p %p %p %p %p\n", debugstr_w(principal), debugstr_w(package),
         credentials_use, auth_data, get_key_fn, get_key_arg, credential, ts_expiry);
 
     if (!credential) return SEC_E_INVALID_HANDLE;
@@ -354,7 +354,7 @@ static SECURITY_STATUS WINAPI lsa_AcquireCredentialsHandleA(
     SEC_WINNT_AUTH_IDENTITY_W *auth_dataW = NULL;
     SEC_WINNT_AUTH_IDENTITY_A *id = NULL;
 
-    TRACE("%s %s %#x %p %p %p %p %p\n", debugstr_a(principal), debugstr_a(package),
+    TRACE("%s %s %#lx %p %p %p %p %p\n", debugstr_a(principal), debugstr_a(package),
         credentials_use, auth_data, get_key_fn, get_key_arg, credential, ts_expiry);
 
     if (principal)
@@ -450,7 +450,7 @@ static SECURITY_STATUS WINAPI lsa_InitializeSecurityContextW(
     BOOLEAN mapped_context;
     LSA_SEC_HANDLE new_handle;
 
-    TRACE("%p %p %s %#x %d %d %p %d %p %p %p %p\n", credential, context,
+    TRACE("%p %p %s %#lx %ld %ld %p %ld %p %p %p %p\n", credential, context,
         debugstr_w(target_name), context_req, reserved1, target_data_rep, input,
         reserved2, new_context, output, context_attr, ts_expiry);
 
@@ -496,7 +496,7 @@ static SECURITY_STATUS WINAPI lsa_InitializeSecurityContextA(
     SECURITY_STATUS status;
     SEC_WCHAR *targetW = NULL;
 
-    TRACE("%p %p %s %#x %d %d %p %d %p %p %p %p\n", credential, context,
+    TRACE("%p %p %s %#lx %ld %ld %p %ld %p %p %p %p\n", credential, context,
         debugstr_a(target_name), context_req, reserved1, target_data_rep, input,
         reserved2, new_context, output, context_attr, ts_expiry);
 
@@ -524,7 +524,7 @@ static SECURITY_STATUS WINAPI lsa_AcceptSecurityContext(
     BOOLEAN mapped_context;
     LSA_SEC_HANDLE new_handle;
 
-    TRACE("%p %p %p %#x %#x %p %p %p %p\n", credential, context, input,
+    TRACE("%p %p %p %#lx %#lx %p %p %p %p\n", credential, context, input,
         context_req, target_data_rep, new_context, output, context_attr, ts_expiry);
 
     if (context)
@@ -581,7 +581,7 @@ static SECURITY_STATUS WINAPI lsa_QueryContextAttributesW(CtxtHandle *context, U
 {
     struct lsa_handle *lsa_ctx;
 
-    TRACE("%p %d %p\n", context, attribute, buffer);
+    TRACE("%p %ld %p\n", context, attribute, buffer);
 
     if (!context) return SEC_E_INVALID_HANDLE;
     lsa_ctx = (struct lsa_handle *)context->dwLower;
@@ -622,7 +622,7 @@ static SECURITY_STATUS nego_info_WtoA( const SecPkgContext_NegotiationInfoW *inf
 
 static SECURITY_STATUS WINAPI lsa_QueryContextAttributesA(CtxtHandle *context, ULONG attribute, void *buffer)
 {
-    TRACE("%p %d %p\n", context, attribute, buffer);
+    TRACE("%p %ld %p\n", context, attribute, buffer);
 
     if (!context) return SEC_E_INVALID_HANDLE;
 
@@ -658,7 +658,7 @@ static SECURITY_STATUS WINAPI lsa_QueryContextAttributesA(CtxtHandle *context, U
     X(SECPKG_ATTR_TARGET_INFORMATION);
 #undef X
     default:
-        FIXME( "unknown attribute %u\n", attribute );
+        FIXME( "unknown attribute %lu\n", attribute );
         break;
     }
 
@@ -670,7 +670,7 @@ static SECURITY_STATUS WINAPI lsa_MakeSignature(CtxtHandle *context, ULONG quali
 {
     struct lsa_handle *lsa_ctx;
 
-    TRACE("%p %#x %p %u)\n", context, quality_of_protection, message, message_seq_no);
+    TRACE("%p %#lx %p %lu)\n", context, quality_of_protection, message, message_seq_no);
 
     if (!context) return SEC_E_INVALID_HANDLE;
     lsa_ctx = (struct lsa_handle *)context->dwLower;
@@ -687,7 +687,7 @@ static SECURITY_STATUS WINAPI lsa_VerifySignature(CtxtHandle *context, SecBuffer
 {
     struct lsa_handle *lsa_ctx;
 
-    TRACE("%p %p %u %p)\n", context, message, message_seq_no, quality_of_protection);
+    TRACE("%p %p %lu %p)\n", context, message, message_seq_no, quality_of_protection);
 
     if (!context) return SEC_E_INVALID_HANDLE;
     lsa_ctx = (struct lsa_handle *)context->dwLower;
@@ -704,7 +704,7 @@ static SECURITY_STATUS WINAPI lsa_EncryptMessage(CtxtHandle *context, ULONG qual
 {
     struct lsa_handle *lsa_ctx;
 
-    TRACE("%p %#x %p %u)\n", context, quality_of_protection, message, message_seq_no);
+    TRACE("%p %#lx %p %lu)\n", context, quality_of_protection, message, message_seq_no);
 
     if (!context) return SEC_E_INVALID_HANDLE;
     lsa_ctx = (struct lsa_handle *)context->dwLower;
@@ -721,7 +721,7 @@ static SECURITY_STATUS WINAPI lsa_DecryptMessage(CtxtHandle *context, SecBufferD
 {
     struct lsa_handle *lsa_ctx;
 
-    TRACE("%p %p %u %p)\n", context, message, message_seq_no, quality_of_protection);
+    TRACE("%p %p %lu %p)\n", context, message, message_seq_no, quality_of_protection);
 
     if (!context) return SEC_E_INVALID_HANDLE;
     lsa_ctx = (struct lsa_handle *)context->dwLower;
@@ -835,7 +835,7 @@ static BOOL load_package(const WCHAR *name, struct lsa_package *package, ULONG p
             status = package->lsa_api->InitializePackage(package_id, &lsa_dispatch, NULL, NULL, &package->name);
             if (status == STATUS_SUCCESS)
             {
-                TRACE("%s => %p, name %s, version %#x, api table %p, table count %u\n",
+                TRACE("%s => %p, name %s, version %#lx, api table %p, table count %lu\n",
                     debugstr_w(name), package->mod, debugstr_an(package->name->Buffer, package->name->Length),
                     package->lsa_api_version, package->lsa_api, package->lsa_table_count);
                 package->package_id = package_id;
diff --git a/dlls/secur32/negotiate.c b/dlls/secur32/negotiate.c
index 498ef9ec35a..d01419ce9c7 100644
--- a/dlls/secur32/negotiate.c
+++ b/dlls/secur32/negotiate.c
@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(secur32);
 static SECURITY_STATUS SEC_ENTRY nego_QueryCredentialsAttributesA(
     PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer)
 {
-    FIXME("%p, %u, %p\n", phCredential, ulAttribute, pBuffer);
+    FIXME("%p, %lu, %p\n", phCredential, ulAttribute, pBuffer);
     return SEC_E_UNSUPPORTED_FUNCTION;
 }
 
@@ -46,7 +46,7 @@ static SECURITY_STATUS SEC_ENTRY nego_QueryCredentialsAttributesA(
 static SECURITY_STATUS SEC_ENTRY nego_QueryCredentialsAttributesW(
     PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer)
 {
-    FIXME("%p, %u, %p\n", phCredential, ulAttribute, pBuffer);
+    FIXME("%p, %lu, %p\n", phCredential, ulAttribute, pBuffer);
     return SEC_E_UNSUPPORTED_FUNCTION;
 }
 
@@ -74,7 +74,7 @@ static SECURITY_STATUS SEC_ENTRY nego_AcquireCredentialsHandleW(
     struct sec_handle *cred;
     SecurePackage *package;
 
-    TRACE("%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p\n",
+    TRACE("%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p\n",
           debugstr_w(pszPrincipal), debugstr_w(pszPackage), fCredentialUse,
           pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry);
 
@@ -120,7 +120,7 @@ static SECURITY_STATUS SEC_ENTRY nego_AcquireCredentialsHandleA(
     SEC_WCHAR *user = NULL, *domain = NULL, *passwd = NULL, *package = NULL;
     SEC_WINNT_AUTH_IDENTITY_W *identityW = NULL;
 
-    TRACE("%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p\n",
+    TRACE("%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p\n",
           debugstr_a(pszPrincipal), debugstr_a(pszPackage), fCredentialUse,
           pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry);
 
@@ -199,7 +199,7 @@ static SECURITY_STATUS SEC_ENTRY nego_InitializeSecurityContextW(
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *handle = NULL, *ctxt, *new_ctxt = NULL, *cred = NULL;
 
-    TRACE("%p, %p, %s, 0x%08x, %u, %u, %p, %u, %p, %p, %p, %p\n",
+    TRACE("%p, %p, %s, 0x%08lx, %lu, %lu, %p, %lu, %p, %p, %p, %p\n",
           phCredential, phContext, debugstr_w(pszTargetName), fContextReq,
           Reserved1, TargetDataRep, pInput, Reserved1, phNewContext, pOutput,
           pfContextAttr, ptsExpiry);
@@ -261,7 +261,7 @@ static SECURITY_STATUS SEC_ENTRY nego_InitializeSecurityContextA(
     SECURITY_STATUS ret;
     SEC_WCHAR *target = NULL;
 
-    TRACE("%p, %p, %s, 0x%08x, %u, %u, %p, %u, %p, %p, %p, %p\n",
+    TRACE("%p, %p, %s, 0x%08lx, %lu, %lu, %p, %lu, %p, %p, %p, %p\n",
           phCredential, phContext, debugstr_a(pszTargetName), fContextReq,
           Reserved1, TargetDataRep, pInput, Reserved1, phNewContext, pOutput,
           pfContextAttr, ptsExpiry);
@@ -290,7 +290,7 @@ static SECURITY_STATUS SEC_ENTRY nego_AcceptSecurityContext(
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *handle = NULL, *ctxt, *new_ctxt = NULL, *cred = NULL;
 
-    TRACE("%p, %p, %p, 0x%08x, %u, %p, %p, %p, %p\n", phCredential, phContext,
+    TRACE("%p, %p, %p, 0x%08lx, %lu, %p, %p, %p, %p\n", phCredential, phContext,
           pInput, fContextReq, TargetDataRep, phNewContext, pOutput, pfContextAttr,
           ptsExpiry);
 
@@ -402,7 +402,7 @@ static SECURITY_STATUS SEC_ENTRY nego_QueryContextAttributesW(
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *ctxt;
 
-    TRACE("%p, %u, %p\n", phContext, ulAttribute, pBuffer);
+    TRACE("%p, %lu, %p\n", phContext, ulAttribute, pBuffer);
 
     if (!phContext) return SEC_E_INVALID_HANDLE;
 
@@ -427,7 +427,7 @@ static SECURITY_STATUS SEC_ENTRY nego_QueryContextAttributesA(PCtxtHandle phCont
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *ctxt;
 
-    TRACE("%p, %u, %p\n", phContext, ulAttribute, pBuffer);
+    TRACE("%p, %lu, %p\n", phContext, ulAttribute, pBuffer);
 
     if (!phContext) return SEC_E_INVALID_HANDLE;
 
@@ -478,7 +478,7 @@ static SECURITY_STATUS SEC_ENTRY nego_MakeSignature(PCtxtHandle phContext,
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *ctxt;
 
-    TRACE("%p, 0x%08x, %p, %u\n", phContext, fQOP, pMessage, MessageSeqNo);
+    TRACE("%p, 0x%08lx, %p, %lu\n", phContext, fQOP, pMessage, MessageSeqNo);
 
     if (!phContext) return SEC_E_INVALID_HANDLE;
 
@@ -503,7 +503,7 @@ static SECURITY_STATUS SEC_ENTRY nego_VerifySignature(PCtxtHandle phContext,
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *ctxt;
 
-    TRACE("%p, %p, %u, %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
+    TRACE("%p, %p, %lu, %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
 
     if (!phContext) return SEC_E_INVALID_HANDLE;
 
@@ -547,7 +547,7 @@ static SECURITY_STATUS SEC_ENTRY nego_EncryptMessage(PCtxtHandle phContext,
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *ctxt;
 
-    TRACE("%p, 0x%08x, %p, %u\n", phContext, fQOP, pMessage, MessageSeqNo);
+    TRACE("%p, 0x%08lx, %p, %lu\n", phContext, fQOP, pMessage, MessageSeqNo);
 
     if (!phContext) return SEC_E_INVALID_HANDLE;
 
@@ -572,7 +572,7 @@ static SECURITY_STATUS SEC_ENTRY nego_DecryptMessage(PCtxtHandle phContext,
     SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
     struct sec_handle *ctxt;
 
-    TRACE("%p, %p, %u, %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
+    TRACE("%p, %p, %lu, %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
 
     if (!phContext) return SEC_E_INVALID_HANDLE;
 
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index c4e01c1e2a7..c7d62c47758 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -88,7 +88,7 @@ static ULONG_PTR schan_alloc_handle(void *object, enum schan_handle_type type)
         handle = schan_free_handles;
         if (handle->type != SCHAN_HANDLE_FREE)
         {
-            ERR("Handle %d(%p) is in the free list, but has type %#x.\n", index, handle, handle->type);
+            ERR("Handle %ld(%p) is in the free list, but has type %#x.\n", index, handle, handle->type);
             return SCHAN_INVALID_HANDLE;
         }
         schan_free_handles = handle->object;
@@ -128,7 +128,7 @@ static void *schan_free_handle(ULONG_PTR handle_idx, enum schan_handle_type type
     handle = &schan_handle_table[handle_idx];
     if (handle->type != type)
     {
-        ERR("Handle %ld(%p) is not of type %#x\n", handle_idx, handle, type);
+        ERR("Handle %Id(%p) is not of type %#x\n", handle_idx, handle, type);
         return NULL;
     }
 
@@ -149,7 +149,7 @@ static void *schan_get_object(ULONG_PTR handle_idx, enum schan_handle_type type)
     handle = &schan_handle_table[handle_idx];
     if (handle->type != type)
     {
-        ERR("Handle %ld(%p) is not of type %#x\n", handle_idx, handle, type);
+        ERR("Handle %Id(%p) is not of type %#x\n", handle_idx, handle, type);
         return NULL;
     }
 
@@ -238,7 +238,7 @@ static void read_config(void)
     config_default_disabled_protocols = default_disabled;
     config_read = TRUE;
 
-    TRACE("enabled %x, disabled by default %x\n", config_enabled_protocols, config_default_disabled_protocols);
+    TRACE("enabled %lx, disabled by default %lx\n", config_enabled_protocols, config_default_disabled_protocols);
 }
 
 static SECURITY_STATUS schan_QueryCredentialsAttributes(
@@ -298,7 +298,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryCredentialsAttributesA(
 {
     SECURITY_STATUS ret;
 
-    TRACE("(%p, %d, %p)\n", phCredential, ulAttribute, pBuffer);
+    TRACE("(%p, %ld, %p)\n", phCredential, ulAttribute, pBuffer);
 
     switch (ulAttribute)
     {
@@ -318,7 +318,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryCredentialsAttributesW(
 {
     SECURITY_STATUS ret;
 
-    TRACE("(%p, %d, %p)\n", phCredential, ulAttribute, pBuffer);
+    TRACE("(%p, %ld, %p)\n", phCredential, ulAttribute, pBuffer);
 
     switch (ulAttribute)
     {
@@ -338,19 +338,19 @@ static SECURITY_STATUS get_cert(const SCHANNEL_CRED *cred, CERT_CONTEXT const **
     SECURITY_STATUS status;
     DWORD i;
 
-    TRACE("dwVersion = %u\n", cred->dwVersion);
-    TRACE("cCreds = %u\n", cred->cCreds);
+    TRACE("dwVersion = %lu\n", cred->dwVersion);
+    TRACE("cCreds = %lu\n", cred->cCreds);
     TRACE("paCred = %p\n", cred->paCred);
     TRACE("hRootStore = %p\n", cred->hRootStore);
-    TRACE("cMappers = %u\n", cred->cMappers);
-    TRACE("cSupportedAlgs = %u:\n", cred->cSupportedAlgs);
+    TRACE("cMappers = %lu\n", cred->cMappers);
+    TRACE("cSupportedAlgs = %lu:\n", cred->cSupportedAlgs);
     for (i = 0; i < cred->cSupportedAlgs; i++) TRACE("%08x\n", cred->palgSupportedAlgs[i]);
-    TRACE("grbitEnabledProtocols = %08x\n", cred->grbitEnabledProtocols);
-    TRACE("dwMinimumCipherStrength = %u\n", cred->dwMinimumCipherStrength);
-    TRACE("dwMaximumCipherStrength = %u\n", cred->dwMaximumCipherStrength);
-    TRACE("dwSessionLifespan = %u\n", cred->dwSessionLifespan);
-    TRACE("dwFlags = %08x\n", cred->dwFlags);
-    TRACE("dwCredFormat = %u\n", cred->dwCredFormat);
+    TRACE("grbitEnabledProtocols = %08lx\n", cred->grbitEnabledProtocols);
+    TRACE("dwMinimumCipherStrength = %lu\n", cred->dwMinimumCipherStrength);
+    TRACE("dwMaximumCipherStrength = %lu\n", cred->dwMaximumCipherStrength);
+    TRACE("dwSessionLifespan = %lu\n", cred->dwSessionLifespan);
+    TRACE("dwFlags = %08lx\n", cred->dwFlags);
+    TRACE("dwCredFormat = %lu\n", cred->dwCredFormat);
 
     switch (cred->dwVersion)
     {
@@ -610,7 +610,7 @@ static SECURITY_STATUS SEC_ENTRY schan_AcquireCredentialsHandleA(
  PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
  PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
 {
-    TRACE("(%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p)\n",
+    TRACE("(%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p)\n",
      debugstr_a(pszPrincipal), debugstr_a(pszPackage), fCredentialUse,
      pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry);
     return schan_AcquireCredentialsHandle(fCredentialUse,
@@ -622,7 +622,7 @@ static SECURITY_STATUS SEC_ENTRY schan_AcquireCredentialsHandleW(
  PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
  PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
 {
-    TRACE("(%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p)\n",
+    TRACE("(%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p)\n",
      debugstr_w(pszPrincipal), debugstr_w(pszPackage), fCredentialUse,
      pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry);
     return schan_AcquireCredentialsHandle(fCredentialUse,
@@ -674,7 +674,7 @@ static void dump_buffer_desc(SecBufferDesc *desc)
     for (i = 0; i < desc->cBuffers; ++i)
     {
         SecBuffer *b = &desc->pBuffers[i];
-        TRACE("\tbuffer %u: cbBuffer %d, BufferType %#x pvBuffer %p\n", i, b->cbBuffer, b->BufferType, b->pvBuffer);
+        TRACE("\tbuffer %u: cbBuffer %ld, BufferType %#lx pvBuffer %p\n", i, b->cbBuffer, b->BufferType, b->pvBuffer);
     }
 }
 
@@ -711,7 +711,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
     struct handshake_params params;
     int idx, i;
 
-    TRACE("%p %p %s 0x%08x %d %d %p %d %p %p %p %p\n", phCredential, phContext,
+    TRACE("%p %p %s 0x%08lx %ld %ld %p %ld %p %p %p %p\n", phCredential, phContext,
      debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
      Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
 
@@ -746,7 +746,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
 
         if (!(cred->credential_use & SECPKG_CRED_OUTBOUND))
         {
-            WARN("Invalid credential use %#x\n", cred->credential_use);
+            WARN("Invalid credential use %#lx\n", cred->credential_use);
             return SEC_E_INVALID_HANDLE;
         }
 
@@ -805,7 +805,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
                 struct set_dtls_mtu_params params = { ctx->transport.session, *(WORD *)buffer->pvBuffer };
                 GNUTLS_CALL( set_dtls_mtu, &params );
             }
-            else WARN("invalid buffer size %u\n", buffer->cbBuffer);
+            else WARN("invalid buffer size %lu\n", buffer->cbBuffer);
         }
 
         if (is_dtls_context(ctx))
@@ -843,12 +843,12 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
 
             if (!expected_size)
             {
-                TRACE("Expected at least %lu bytes, but buffer only contains %u bytes.\n",
+                TRACE("Expected at least %Iu bytes, but buffer only contains %lu bytes.\n",
                       max(ctx->header_size + 1, record_size), buffer->cbBuffer);
                 return SEC_E_INCOMPLETE_MESSAGE;
             }
 
-            TRACE("Using expected_size %lu.\n", expected_size);
+            TRACE("Using expected_size %Iu.\n", expected_size);
         }
 
         if (phNewContext) *phNewContext = *phContext;
@@ -925,7 +925,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextA(
     SECURITY_STATUS ret;
     SEC_WCHAR *target_name = NULL;
 
-    TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
+    TRACE("%p %p %s %ld %ld %ld %p %ld %p %p %p %p\n", phCredential, phContext,
      debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
      Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
 
@@ -1020,7 +1020,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
     struct schan_context *ctx;
     SECURITY_STATUS status;
 
-    TRACE("context_handle %p, attribute %#x, buffer %p\n",
+    TRACE("context_handle %p, attribute %#lx, buffer %p\n",
             context_handle, attribute, buffer);
 
     if (!context_handle) return SEC_E_INVALID_HANDLE;
@@ -1041,7 +1041,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
                 unsigned int block_size = GNUTLS_CALL( get_session_cipher_block_size, &params );
                 unsigned int message_size = GNUTLS_CALL( get_max_message_size, &params );
 
-                TRACE("Using header size %lu mac bytes %lu, message size %u, block size %u\n",
+                TRACE("Using header size %Iu mac bytes %Iu, message size %u, block size %u\n",
                       ctx->header_size, mac_size, message_size, block_size);
 
                 /* These are defined by the TLS RFC */
@@ -1163,7 +1163,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
         }
 
         default:
-            FIXME("Unhandled attribute %#x\n", attribute);
+            FIXME("Unhandled attribute %#lx\n", attribute);
             return SEC_E_UNSUPPORTED_FUNCTION;
     }
 }
@@ -1171,7 +1171,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
 static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesA(
         PCtxtHandle context_handle, ULONG attribute, PVOID buffer)
 {
-    TRACE("context_handle %p, attribute %#x, buffer %p\n",
+    TRACE("context_handle %p, attribute %#lx, buffer %p\n",
             context_handle, attribute, buffer);
 
     switch(attribute)
@@ -1201,7 +1201,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesA(
             return schan_QueryContextAttributesW(context_handle, attribute, buffer);
 
         default:
-            FIXME("Unhandled attribute %#x\n", attribute);
+            FIXME("Unhandled attribute %#lx\n", attribute);
             return SEC_E_UNSUPPORTED_FUNCTION;
     }
 }
@@ -1218,7 +1218,7 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle
     char *data;
     int idx;
 
-    TRACE("context_handle %p, quality %d, message %p, message_seq_no %d\n",
+    TRACE("context_handle %p, quality %ld, message %p, message_seq_no %ld\n",
             context_handle, quality, message, message_seq_no);
 
     if (!context_handle) return SEC_E_INVALID_HANDLE;
@@ -1245,14 +1245,14 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle
     params.length = &length;
     status = GNUTLS_CALL( send, &params );
 
-    TRACE("Sent %ld bytes.\n", length);
+    TRACE("Sent %Id bytes.\n", length);
 
     if (length != data_size)
         status = SEC_E_INTERNAL_ERROR;
 
     free(data);
 
-    TRACE("Returning %#x.\n", status);
+    TRACE("Returning %#lx.\n", status);
 
     return status;
 }
@@ -1327,7 +1327,7 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
     int idx;
     unsigned char *buf_ptr;
 
-    TRACE("context_handle %p, message %p, message_seq_no %d, quality %p\n",
+    TRACE("context_handle %p, message %p, message_seq_no %ld, quality %p\n",
             context_handle, message, message_seq_no, quality);
 
     if (!context_handle) return SEC_E_INVALID_HANDLE;
@@ -1344,7 +1344,7 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
     expected_size = ctx->header_size + read_record_size(buf_ptr, ctx->header_size);
     if(buffer->cbBuffer < expected_size)
     {
-        TRACE("Expected %u bytes, but buffer only contains %u bytes\n", expected_size, buffer->cbBuffer);
+        TRACE("Expected %u bytes, but buffer only contains %lu bytes\n", expected_size, buffer->cbBuffer);
         buffer->BufferType = SECBUFFER_MISSING;
         buffer->cbBuffer = expected_size - buffer->cbBuffer;
 
@@ -1373,11 +1373,11 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
     if (status != SEC_E_OK && status != SEC_I_RENEGOTIATE)
     {
         free(data);
-        ERR("Returning %x\n", status);
+        ERR("Returning %lx\n", status);
         return status;
     }
 
-    TRACE("Received %ld bytes\n", received);
+    TRACE("Received %Id bytes\n", received);
 
     memcpy(buf_ptr + ctx->header_size, data, received);
     free(data);
diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c
index b7ffa1822b5..0145c59e0f0 100644
--- a/dlls/secur32/schannel_gnutls.c
+++ b/dlls/secur32/schannel_gnutls.c
@@ -333,7 +333,8 @@ static char *get_buffer(const struct schan_transport *t, struct schan_buffers *s
     }
 
     buffer = &s->desc->pBuffers[s->current_buffer_idx];
-    TRACE("Using buffer %d: cbBuffer %d, BufferType %#x, pvBuffer %p\n", s->current_buffer_idx, buffer->cbBuffer, buffer->BufferType, buffer->pvBuffer);
+    TRACE("Using buffer %d: cbBuffer %d, BufferType %#x, pvBuffer %p\n",
+          s->current_buffer_idx, (unsigned)buffer->cbBuffer, (unsigned)buffer->BufferType, buffer->pvBuffer);
 
     max_count = buffer->cbBuffer - s->offset;
     if (s->limit != ~0UL && s->limit < max_count)
@@ -1044,7 +1045,7 @@ static gnutls_x509_privkey_t get_x509_key(const DATA_BLOB *key_blob)
     if (size < sizeof(BLOBHEADER)) return NULL;
 
     rsakey = (RSAPUBKEY *)(key_blob->pbData + sizeof(BLOBHEADER));
-    TRACE("RSA key bitlen %u pubexp %u\n", rsakey->bitlen, rsakey->pubexp);
+    TRACE("RSA key bitlen %u pubexp %u\n", (unsigned)rsakey->bitlen, (unsigned)rsakey->pubexp);
 
     size -= sizeof(BLOBHEADER) + FIELD_OFFSET(RSAPUBKEY, pubexp);
     set_component(&e, (BYTE *)&rsakey->pubexp, sizeof(rsakey->pubexp), &size);
@@ -1084,7 +1085,7 @@ static gnutls_x509_crt_t get_x509_crt(const CERT_CONTEXT *ctx)
     if (!ctx) return FALSE;
     if (ctx->dwCertEncodingType != X509_ASN_ENCODING)
     {
-        FIXME("encoding type %u not supported\n", ctx->dwCertEncodingType);
+        FIXME("encoding type %u not supported\n", (unsigned)ctx->dwCertEncodingType);
         return NULL;
     }
 
diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c
index 05ec6b1e692..b14fc0e05b7 100644
--- a/dlls/secur32/secur32.c
+++ b/dlls/secur32/secur32.c
@@ -709,7 +709,7 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages,
                     *pkgInfo = package->infoW;
                     if (package->infoW.Name)
                     {
-                        TRACE("Name[%d] = %s\n", i - 1, debugstr_w(package->infoW.Name));
+                        TRACE("Name[%ld] = %s\n", i - 1, debugstr_w(package->infoW.Name));
                         pkgInfo->Name = nextString;
                         lstrcpyW(nextString, package->infoW.Name);
                         nextString += lstrlenW(nextString) + 1;
@@ -718,7 +718,7 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages,
                         pkgInfo->Name = NULL;
                     if (package->infoW.Comment)
                     {
-                        TRACE("Comment[%d] = %s\n", i - 1, debugstr_w(package->infoW.Comment));
+                        TRACE("Comment[%ld] = %s\n", i - 1, debugstr_w(package->infoW.Comment));
                         pkgInfo->Comment = nextString;
                         lstrcpyW(nextString, package->infoW.Comment);
                         nextString += lstrlenW(nextString) + 1;
@@ -732,7 +732,7 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages,
         }
     }
     LeaveCriticalSection(&cs);
-    TRACE("<-- 0x%08x\n", ret);
+    TRACE("<-- 0x%08lx\n", ret);
     return ret;
 }
 
@@ -909,7 +909,7 @@ BOOLEAN WINAPI GetComputerObjectNameW(
     if (ntStatus != STATUS_SUCCESS)
     {
         SetLastError(LsaNtStatusToWinError(ntStatus));
-        WARN("LsaOpenPolicy failed with NT status %u\n", GetLastError());
+        WARN("LsaOpenPolicy failed with NT status %lu\n", GetLastError());
         return FALSE;
     }
 
@@ -919,7 +919,7 @@ BOOLEAN WINAPI GetComputerObjectNameW(
     if (ntStatus != STATUS_SUCCESS)
     {
         SetLastError(LsaNtStatusToWinError(ntStatus));
-        WARN("LsaQueryInformationPolicy failed with NT status %u\n",
+        WARN("LsaQueryInformationPolicy failed with NT status %lu\n",
              GetLastError());
         LsaClose(policyHandle);
         return FALSE;
diff --git a/dlls/secur32/thunks.c b/dlls/secur32/thunks.c
index 7087696ca35..de0fb0a50ec 100644
--- a/dlls/secur32/thunks.c
+++ b/dlls/secur32/thunks.c
@@ -38,7 +38,7 @@ SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleA(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_a(pszPrincipal),
+    TRACE("%s %s %ld %p %p %p %p %p %p\n", debugstr_a(pszPrincipal),
      debugstr_a(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
      pvGetKeyArgument, phCredential, ptsExpiry);
     if (pszPackage)
@@ -77,7 +77,7 @@ SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_w(pszPrincipal),
+    TRACE("%s %s %ld %p %p %p %p %p %p\n", debugstr_w(pszPrincipal),
      debugstr_w(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
      pvGetKeyArgument, phCredential, ptsExpiry);
     if (pszPackage)
@@ -104,7 +104,7 @@ SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phCredential, ulAttribute, pBuffer);
     if (phCredential)
     {
         SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
@@ -132,7 +132,7 @@ SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA(
                             break;
                         }
                         default:
-                            WARN("attribute type %d unknown\n", ulAttribute);
+                            WARN("attribute type %ld unknown\n", ulAttribute);
                             ret = SEC_E_INTERNAL_ERROR;
                     }
                 }
@@ -165,7 +165,7 @@ SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phCredential, ulAttribute, pBuffer);
     if (phCredential)
     {
         SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
@@ -193,7 +193,7 @@ SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW(
                             break;
                         }
                         default:
-                            WARN("attribute type %d unknown\n", ulAttribute);
+                            WARN("attribute type %ld unknown\n", ulAttribute);
                             ret = SEC_E_INTERNAL_ERROR;
                     }
                 }
@@ -218,7 +218,7 @@ SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextA(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
+    TRACE("%p %p %s %ld %ld %ld %p %ld %p %p %p %p\n", phCredential, phContext,
      debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
      Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
     if (phCredential)
@@ -258,7 +258,7 @@ SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
+    TRACE("%p %p %s %ld %ld %ld %p %ld %p %p %p %p\n", phCredential, phContext,
      debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
      Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
     if (phCredential)
@@ -295,7 +295,7 @@ SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsA(PCredHandle hCredentials,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_a(pszPrincipal),
+    TRACE("%p %s %s %ld %p %p %p %p\n", hCredentials, debugstr_a(pszPrincipal),
      debugstr_a(pszPackage), fCredentialUse, pAuthData, pGetKeyFn,
      pvGetKeyArgument, ptsExpiry);
     if (hCredentials)
@@ -335,7 +335,7 @@ SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW(PCredHandle hCredentials,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_w(pszPrincipal),
+    TRACE("%p %s %s %ld %p %p %p %p\n", hCredentials, debugstr_w(pszPrincipal),
      debugstr_w(pszPackage), fCredentialUse, pAuthData, pGetKeyFn,
      pvGetKeyArgument, ptsExpiry);
     if (hCredentials)
@@ -534,7 +534,7 @@ static SECURITY_STATUS thunk_ContextAttributesWToA(SecurePackage *package,
             case SECPKG_ATTR_TARGET_INFORMATION:
                 break;
             default:
-                WARN("attribute type %d unknown\n", ulAttribute);
+                WARN("attribute type %ld unknown\n", ulAttribute);
                 ret = SEC_E_INTERNAL_ERROR;
         }
     }
@@ -548,7 +548,7 @@ SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phContext, ulAttribute, pBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -738,7 +738,7 @@ static SECURITY_STATUS thunk_ContextAttributesAToW(SecurePackage *package,
             case SECPKG_ATTR_TARGET_INFORMATION:
                 break;
             default:
-                WARN("attribute type %d unknown\n", ulAttribute);
+                WARN("attribute type %ld unknown\n", ulAttribute);
                 ret = SEC_E_INTERNAL_ERROR;
         }
     }
@@ -752,7 +752,7 @@ SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phContext, ulAttribute, pBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -782,7 +782,7 @@ SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer);
+    TRACE("%p %ld %p %ld\n", phContext, ulAttribute, pBuffer, cbBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -813,7 +813,7 @@ SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer);
+    TRACE("%p %ld %p %ld\n", phContext, ulAttribute, pBuffer, cbBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
diff --git a/dlls/secur32/wrapper.c b/dlls/secur32/wrapper.c
index e4475069b86..53fea29fcc5 100644
--- a/dlls/secur32/wrapper.c
+++ b/dlls/secur32/wrapper.c
@@ -40,7 +40,7 @@ SECURITY_STATUS WINAPI AcquireCredentialsHandleA(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_a(pszPrincipal),
+    TRACE("%s %s %ld %p %p %p %p %p %p\n", debugstr_a(pszPrincipal),
      debugstr_a(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
      pvGetKeyArgument, phCredential, ptsExpiry);
     if (pszPackage)
@@ -78,7 +78,7 @@ SECURITY_STATUS WINAPI AcquireCredentialsHandleW(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_w(pszPrincipal),
+    TRACE("%s %s %ld %p %p %p %p %p %p\n", debugstr_w(pszPrincipal),
      debugstr_w(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
      pvGetKeyArgument, phCredential, ptsExpiry);
     if (pszPackage)
@@ -136,7 +136,7 @@ SECURITY_STATUS WINAPI QueryCredentialsAttributesA(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phCredential, ulAttribute, pBuffer);
     if (phCredential)
     {
         SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
@@ -164,7 +164,7 @@ SECURITY_STATUS WINAPI QueryCredentialsAttributesW(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phCredential, ulAttribute, pBuffer);
     if (phCredential)
     {
         SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
@@ -196,7 +196,7 @@ SECURITY_STATUS WINAPI InitializeSecurityContextA(
     SECURITY_STATUS ret;
     SecurePackage *package = NULL;
 
-    TRACE("%p %p %s 0x%08x %d %d %p %d %p %p %p %p\n", phCredential, phContext,
+    TRACE("%p %p %s 0x%08lx %ld %ld %p %ld %p %p %p %p\n", phCredential, phContext,
      debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
      Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
 
@@ -235,7 +235,7 @@ SECURITY_STATUS WINAPI InitializeSecurityContextW(
     SECURITY_STATUS ret;
     SecurePackage *package = NULL;
 
-    TRACE("%p %p %s 0x%08x %d %d %p %d %p %p %p %p\n", phCredential, phContext,
+    TRACE("%p %p %s 0x%08lx %ld %ld %p %ld %p %p %p %p\n", phCredential, phContext,
      debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
      Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
 
@@ -271,7 +271,7 @@ SECURITY_STATUS WINAPI AcceptSecurityContext(
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %p %p %d %d %p %p %p %p\n", phCredential, phContext, pInput,
+    TRACE("%p %p %p %ld %ld %p %p %p %p\n", phCredential, phContext, pInput,
      fContextReq, TargetDataRep, phNewContext, pOutput, pfContextAttr,
      ptsExpiry);
     if (phCredential)
@@ -381,7 +381,7 @@ SECURITY_STATUS WINAPI QueryContextAttributesA(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phContext, ulAttribute, pBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -408,7 +408,7 @@ SECURITY_STATUS WINAPI QueryContextAttributesW(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer);
+    TRACE("%p %ld %p\n", phContext, ulAttribute, pBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -487,7 +487,7 @@ SECURITY_STATUS WINAPI MakeSignature(PCtxtHandle phContext, ULONG fQOP,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p %d\n", phContext, fQOP, pMessage, MessageSeqNo);
+    TRACE("%p %ld %p %ld\n", phContext, fQOP, pMessage, MessageSeqNo);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -514,7 +514,7 @@ SECURITY_STATUS WINAPI VerifySignature(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %p %d %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
+    TRACE("%p %p %ld %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -665,7 +665,7 @@ SECURITY_STATUS WINAPI ExportSecurityContext(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p %p\n", phContext, fFlags, pPackedContext, pToken);
+    TRACE("%p %ld %p %p\n", phContext, fFlags, pPackedContext, pToken);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -747,7 +747,7 @@ SECURITY_STATUS WINAPI AddCredentialsA(PCredHandle hCredentials,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_a(pszPrincipal),
+    TRACE("%p %s %s %ld %p %p %p %p\n", hCredentials, debugstr_a(pszPrincipal),
      debugstr_a(pszPackage), fCredentialUse, pAuthData, pGetKeyFn,
      pvGetKeyArgument, ptsExpiry);
     if (hCredentials)
@@ -780,7 +780,7 @@ SECURITY_STATUS WINAPI AddCredentialsW(PCredHandle hCredentials,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_w(pszPrincipal),
+    TRACE("%p %s %s %ld %p %p %p %p\n", hCredentials, debugstr_w(pszPrincipal),
      debugstr_w(pszPackage), fCredentialUse, pAuthData, pGetKeyFn,
      pvGetKeyArgument, ptsExpiry);
     if (hCredentials)
@@ -838,7 +838,7 @@ SECURITY_STATUS WINAPI EncryptMessage(PCtxtHandle phContext, ULONG fQOP,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p %d\n", phContext, fQOP, pMessage, MessageSeqNo);
+    TRACE("%p %ld %p %ld\n", phContext, fQOP, pMessage, MessageSeqNo);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -865,7 +865,7 @@ SECURITY_STATUS WINAPI DecryptMessage(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %p %d %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
+    TRACE("%p %p %ld %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -892,7 +892,7 @@ SECURITY_STATUS WINAPI SetContextAttributesA(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer);
+    TRACE("%p %ld %p %ld\n", phContext, ulAttribute, pBuffer, cbBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;
@@ -919,7 +919,7 @@ SECURITY_STATUS WINAPI SetContextAttributesW(PCtxtHandle phContext,
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer);
+    TRACE("%p %ld %p %ld\n", phContext, ulAttribute, pBuffer, cbBuffer);
     if (phContext)
     {
         SecurePackage *package = (SecurePackage *)phContext->dwUpper;




More information about the wine-devel mailing list