[PATCH] shcore: Build without -DWINE_NO_LONG_TYPES.

Nikolay Sivov nsivov at codeweavers.com
Fri Feb 11 00:46:16 CST 2022


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/shcore/Makefile.in |  1 -
 dlls/shcore/main.c      | 96 ++++++++++++++++++++---------------------
 2 files changed, 46 insertions(+), 51 deletions(-)

diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in
index 084ff0d87c7..7c4d161a558 100644
--- a/dlls/shcore/Makefile.in
+++ b/dlls/shcore/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = shcore.dll
 IMPORTLIB = shcore
 IMPORTS   = user32 gdi32 ole32 advapi32
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
index 633628b4c72..6cc18ad1473 100644
--- a/dlls/shcore/main.c
+++ b/dlls/shcore/main.c
@@ -41,7 +41,7 @@ static IUnknown *process_ref;
 
 BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
 {
-    TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+    TRACE("%p, %lu, %p.\n", instance, reason, reserved);
 
     switch (reason)
     {
@@ -97,7 +97,7 @@ HRESULT WINAPI _IStream_Read(IStream *stream, void *dest, ULONG size)
     ULONG read;
     HRESULT hr;
 
-    TRACE("(%p, %p, %u)\n", stream, dest, size);
+    TRACE("%p, %p, %lu.\n", stream, dest, size);
 
     hr = IStream_Read(stream, dest, size, &read);
     if (SUCCEEDED(hr) && read != size)
@@ -135,7 +135,7 @@ HRESULT WINAPI _IStream_Write(IStream *stream, const void *src, ULONG size)
     ULONG written;
     HRESULT hr;
 
-    TRACE("(%p, %p, %u)\n", stream, src, size);
+    TRACE("%p, %p, %lu.\n", stream, src, size);
 
     hr = IStream_Write(stream, src, size, &written);
     if (SUCCEEDED(hr) && written != size)
@@ -226,22 +226,22 @@ HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
         return E_FAIL;
 
     hr = IUnknown_QueryInterface(obj, &IID_IObjectWithSite, (void **)&objwithsite);
-    TRACE("ObjectWithSite %p, hr %#x.\n", objwithsite, hr);
+    TRACE("ObjectWithSite %p, hr %#lx.\n", objwithsite, hr);
     if (SUCCEEDED(hr))
     {
         hr = IObjectWithSite_SetSite(objwithsite, site);
-        TRACE("SetSite() hr %#x.\n", hr);
+        TRACE("SetSite() hr %#lx.\n", hr);
         IObjectWithSite_Release(objwithsite);
     }
     else
     {
         hr = IUnknown_QueryInterface(obj, &IID_IInternetSecurityManager, (void **)&sec_manager);
-        TRACE("InternetSecurityManager %p, hr %#x.\n", sec_manager, hr);
+        TRACE("InternetSecurityManager %p, hr %#lx.\n", sec_manager, hr);
         if (FAILED(hr))
             return hr;
 
         hr = IInternetSecurityManager_SetSecuritySite(sec_manager, (IInternetSecurityMgrSite *)site);
-        TRACE("SetSecuritySite() hr %#x.\n", hr);
+        TRACE("SetSecuritySite() hr %#lx.\n", hr);
         IInternetSecurityManager_Release(sec_manager);
     }
 
@@ -573,7 +573,7 @@ static ULONG WINAPI shstream_AddRef(IStream *iface)
     struct shstream *stream = impl_from_IStream(iface);
     ULONG refcount = InterlockedIncrement(&stream->refcount);
 
-    TRACE("(%p)->(%u)\n", stream, refcount);
+    TRACE("%p, refcount %lu.\n", iface, refcount);
 
     return refcount;
 }
@@ -583,7 +583,7 @@ static ULONG WINAPI memstream_Release(IStream *iface)
     struct shstream *stream = impl_from_IStream(iface);
     ULONG refcount = InterlockedDecrement(&stream->refcount);
 
-    TRACE("(%p)->(%u)\n", stream, refcount);
+    TRACE("%p, refcount %lu.\n", iface, refcount);
 
     if (!refcount)
     {
@@ -599,7 +599,7 @@ static HRESULT WINAPI memstream_Read(IStream *iface, void *buff, ULONG buff_size
     struct shstream *stream = impl_from_IStream(iface);
     DWORD length;
 
-    TRACE("(%p)->(%p, %u, %p)\n", stream, buff, buff_size, read_len);
+    TRACE("%p, %p, %lu, %p.\n", iface, buff, buff_size, read_len);
 
     if (stream->u.mem.position >= stream->u.mem.length)
     {
@@ -626,7 +626,7 @@ static HRESULT WINAPI memstream_Write(IStream *iface, const void *buff, ULONG bu
     struct shstream *stream = impl_from_IStream(iface);
     DWORD length = stream->u.mem.position + buff_size;
 
-    TRACE("(%p)->(%p, %u, %p)\n", stream, buff, buff_size, written);
+    TRACE("%p, %p, %lu, %p.\n", iface, buff, buff_size, written);
 
     if (length < stream->u.mem.position) /* overflow */
         return STG_E_INSUFFICIENTMEMORY;
@@ -654,7 +654,7 @@ static HRESULT WINAPI memstream_Seek(IStream *iface, LARGE_INTEGER move, DWORD o
     struct shstream *stream = impl_from_IStream(iface);
     LARGE_INTEGER tmp;
 
-    TRACE("(%p)->(%s, %d, %p)\n", stream, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
+    TRACE("%p, %s, %ld, %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
 
     if (origin == STREAM_SEEK_SET)
         tmp = move;
@@ -748,9 +748,7 @@ static HRESULT WINAPI shstream_CopyTo(IStream *iface, IStream *dest, ULARGE_INTE
 
 static HRESULT WINAPI shstream_Commit(IStream *iface, DWORD flags)
 {
-    struct shstream *stream = impl_from_IStream(iface);
-
-    TRACE("(%p, %#x)\n", stream, flags);
+    TRACE("%p, %#lx.\n", iface, flags);
 
     /* Commit is not supported by this stream */
     return E_NOTIMPL;
@@ -790,7 +788,7 @@ static HRESULT WINAPI memstream_Stat(IStream *iface, STATSTG *statstg, DWORD fla
 {
     struct shstream *stream = impl_from_IStream(iface);
 
-    TRACE("(%p, %p, %#x)\n", stream, statstg, flags);
+    TRACE("%p, %p, %#lx.\n", iface, statstg, flags);
 
     memset(statstg, 0, sizeof(*statstg));
     statstg->type = STGTY_STREAM;
@@ -884,7 +882,7 @@ static ULONG WINAPI filestream_Release(IStream *iface)
     struct shstream *stream = impl_from_IStream(iface);
     ULONG refcount = InterlockedDecrement(&stream->refcount);
 
-    TRACE("(%p)->(%u)\n", stream, refcount);
+    TRACE("%p, refcount %lu.\n", iface, refcount);
 
     if (!refcount)
     {
@@ -901,11 +899,11 @@ static HRESULT WINAPI filestream_Read(IStream *iface, void *buff, ULONG size, UL
     struct shstream *stream = impl_from_IStream(iface);
     DWORD read = 0;
 
-    TRACE("(%p, %p, %u, %p)\n", stream, buff, size, read_len);
+    TRACE("%p, %p, %lu, %p.\n", iface, buff, size, read_len);
 
     if (!ReadFile(stream->u.file.handle, buff, size, &read, NULL))
     {
-        WARN("error %d reading file\n", GetLastError());
+        WARN("error %ld reading file\n", GetLastError());
         return S_FALSE;
     }
 
@@ -920,7 +918,7 @@ static HRESULT WINAPI filestream_Write(IStream *iface, const void *buff, ULONG s
     struct shstream *stream = impl_from_IStream(iface);
     DWORD written_len = 0;
 
-    TRACE("(%p, %p, %u, %p)\n", stream, buff, size, written);
+    TRACE("%p, %p, %lu, %p.\n", iface, buff, size, written);
 
     switch (stream->u.file.mode & 0xf)
     {
@@ -945,7 +943,7 @@ static HRESULT WINAPI filestream_Seek(IStream *iface, LARGE_INTEGER move, DWORD
     struct shstream *stream = impl_from_IStream(iface);
     DWORD position;
 
-    TRACE("(%p, %s, %d, %p)\n", stream, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
+    TRACE("%p, %s, %ld, %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
 
     position = SetFilePointer(stream->u.file.handle, move.u.LowPart, NULL, origin);
     if (position == INVALID_SET_FILE_POINTER)
@@ -1031,9 +1029,7 @@ static HRESULT WINAPI filestream_CopyTo(IStream *iface, IStream *dest, ULARGE_IN
 
 static HRESULT WINAPI filestream_Commit(IStream *iface, DWORD flags)
 {
-    struct shstream *stream = impl_from_IStream(iface);
-
-    TRACE("(%p, %#x)\n", stream, flags);
+    TRACE("%p, %#lx.\n", iface, flags);
 
     return S_OK;
 }
@@ -1043,7 +1039,7 @@ static HRESULT WINAPI filestream_Stat(IStream *iface, STATSTG *statstg, DWORD fl
     struct shstream *stream = impl_from_IStream(iface);
     BY_HANDLE_FILE_INFORMATION fi;
 
-    TRACE("(%p, %p, %#x)\n", stream, statstg, flags);
+    TRACE("%p, %p, %#lx.\n", iface, statstg, flags);
 
     if (!statstg)
         return STG_E_INVALIDPOINTER;
@@ -1102,7 +1098,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(const WCHAR *path, DWORD mode, DWORD attri
     struct shstream *stream;
     HANDLE hFile;
 
-    TRACE("(%s, %d, 0x%08X, %d, %p, %p)\n", debugstr_w(path), mode, attributes,
+    TRACE("%s, %ld, %#lx, %d, %p, %p)\n", debugstr_w(path), mode, attributes,
         create, template, ret);
 
     if (!path || !ret || template)
@@ -1180,7 +1176,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(const WCHAR *path, DWORD mode, DWORD attri
  */
 HRESULT WINAPI SHCreateStreamOnFileW(const WCHAR *path, DWORD mode, IStream **stream)
 {
-    TRACE("(%s, %#x, %p)\n", debugstr_w(path), mode, stream);
+    TRACE("%s, %#lx, %p.\n", debugstr_w(path), mode, stream);
 
     if (!path || !stream)
         return E_INVALIDARG;
@@ -1200,7 +1196,7 @@ HRESULT WINAPI SHCreateStreamOnFileA(const char *path, DWORD mode, IStream **str
     HRESULT hr;
     DWORD len;
 
-    TRACE("(%s, %#x, %p)\n", debugstr_a(path), mode, stream);
+    TRACE("%s, %#lx, %p.\n", debugstr_a(path), mode, stream);
 
     if (!path)
         return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND);
@@ -1222,7 +1218,7 @@ static ULONG WINAPI regstream_Release(IStream *iface)
     struct shstream *stream = impl_from_IStream(iface);
     ULONG refcount = InterlockedDecrement(&stream->refcount);
 
-    TRACE("(%p)->(%u)\n", stream, refcount);
+    TRACE("%p, refcount %lu.\n", iface, refcount);
 
     if (!refcount)
     {
@@ -1272,7 +1268,7 @@ IStream * WINAPI SHOpenRegStream2W(HKEY hKey, const WCHAR *subkey, const WCHAR *
     DWORD length = 0;
     LONG ret;
 
-    TRACE("(%p, %s, %s, %#x)\n", hKey, debugstr_w(subkey), debugstr_w(value), mode);
+    TRACE("%p, %s, %s, %#lx.\n", hKey, debugstr_w(subkey), debugstr_w(value), mode);
 
     if (mode == STGM_READ)
         ret = RegOpenKeyExW(hKey, subkey, 0, KEY_READ, &hStrKey);
@@ -1319,7 +1315,7 @@ IStream * WINAPI SHOpenRegStream2A(HKEY hKey, const char *subkey, const char *va
     WCHAR *subkeyW = NULL, *valueW = NULL;
     IStream *stream;
 
-    TRACE("(%p, %s, %s, %#x)\n", hKey, debugstr_a(subkey), debugstr_a(value), mode);
+    TRACE("%p, %s, %s, %#lx.\n", hKey, debugstr_a(subkey), debugstr_a(value), mode);
 
     if (subkey && FAILED(SHStrDupA(subkey, &subkeyW)))
         return NULL;
@@ -1343,7 +1339,7 @@ IStream * WINAPI SHOpenRegStreamA(HKEY hkey, const char *subkey, const char *val
     WCHAR *subkeyW = NULL, *valueW = NULL;
     IStream *stream;
 
-    TRACE("(%p, %s, %s, %#x)\n", hkey, debugstr_a(subkey), debugstr_a(value), mode);
+    TRACE("%p, %s, %s, %#lx.\n", hkey, debugstr_a(subkey), debugstr_a(value), mode);
 
     if (subkey && FAILED(SHStrDupA(subkey, &subkeyW)))
         return NULL;
@@ -1406,7 +1402,7 @@ IStream * WINAPI SHOpenRegStreamW(HKEY hkey, const WCHAR *subkey, const WCHAR *v
 {
     IStream *stream;
 
-    TRACE("(%p, %s, %s, %#x)\n", hkey, debugstr_w(subkey), debugstr_w(value), mode);
+    TRACE("%p, %s, %s, %#lx.\n", hkey, debugstr_w(subkey), debugstr_w(value), mode);
     stream = SHOpenRegStream2W(hkey, subkey, value, mode);
     return stream ? stream : &dummyregstream.IStream_iface;
 }
@@ -1448,7 +1444,7 @@ static ULONG WINAPI threadref_AddRef(IUnknown *iface)
     struct threadref *threadref = threadref_impl_from_IUnknown(iface);
     LONG refcount = InterlockedIncrement(threadref->refcount);
 
-    TRACE("(%p, %d)\n", threadref, refcount);
+    TRACE("%p, refcount %ld.\n", threadref, refcount);
 
     return refcount;
 }
@@ -1458,7 +1454,7 @@ static ULONG WINAPI threadref_Release(IUnknown *iface)
     struct threadref *threadref = threadref_impl_from_IUnknown(iface);
     LONG refcount = InterlockedDecrement(threadref->refcount);
 
-    TRACE("(%p, %d)\n", threadref, refcount);
+    TRACE("%p, refcount %ld.\n", threadref, refcount);
 
     if (!refcount)
         heap_free(threadref);
@@ -1631,7 +1627,7 @@ BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE thread_proc, void *data, DWORD
     struct thread_data thread_data;
     BOOL called = FALSE;
 
-    TRACE("(%p, %p, %#x, %p)\n", thread_proc, data, flags, callback);
+    TRACE("%p, %p, %#lx, %p.\n", thread_proc, data, flags, callback);
 
     thread_data.thread_proc = thread_proc;
     thread_data.callback = callback;
@@ -1953,7 +1949,7 @@ DWORD WINAPI SHCopyKeyA(HKEY hkey_src, const char *subkey, HKEY hkey_dst, DWORD
     WCHAR *subkeyW = NULL;
     DWORD ret;
 
-    TRACE("(%p, %s, %p, %d)\n", hkey_src, debugstr_a(subkey), hkey_dst, reserved);
+    TRACE("%p, %s, %p, %ld.\n", hkey_src, debugstr_a(subkey), hkey_dst, reserved);
 
     if (subkey && FAILED(SHStrDupA(subkey, &subkeyW)))
         return 0;
@@ -1974,7 +1970,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hkey_src, const WCHAR *subkey, HKEY hkey_dst, DWORD
     DWORD max_data_len = 0, i;
     DWORD ret = 0;
 
-    TRACE("(%p, %s, %p, %d)\n", hkey_src, debugstr_w(subkey), hkey_dst, reserved);
+    TRACE("%p, %s, %p, %ld.\n", hkey_src, debugstr_w(subkey), hkey_dst, reserved);
 
     if (!hkey_dst || !hkey_src)
         return ERROR_INVALID_PARAMETER;
@@ -2059,7 +2055,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hkey_src, const WCHAR *subkey, HKEY hkey_dst, DWORD
  */
 LONG WINAPI SHEnumKeyExA(HKEY hkey, DWORD index, char *subkey, DWORD *length)
 {
-    TRACE("(%p, %d, %s, %p)\n", hkey, index, debugstr_a(subkey), length);
+    TRACE("%p, %ld, %s, %p.\n", hkey, index, debugstr_a(subkey), length);
 
     return RegEnumKeyExA(hkey, index, subkey, length, NULL, NULL, NULL, NULL);
 }
@@ -2069,7 +2065,7 @@ LONG WINAPI SHEnumKeyExA(HKEY hkey, DWORD index, char *subkey, DWORD *length)
  */
 LONG WINAPI SHEnumKeyExW(HKEY hkey, DWORD index, WCHAR *subkey, DWORD *length)
 {
-    TRACE("(%p, %d, %s, %p)\n", hkey, index, debugstr_w(subkey), length);
+    TRACE("%p, %ld, %s, %p.\n", hkey, index, debugstr_w(subkey), length);
 
     return RegEnumKeyExW(hkey, index, subkey, length, NULL, NULL, NULL, NULL);
 }
@@ -2080,7 +2076,7 @@ LONG WINAPI SHEnumKeyExW(HKEY hkey, DWORD index, WCHAR *subkey, DWORD *length)
 LONG WINAPI SHEnumValueA(HKEY hkey, DWORD index, char *value, DWORD *length, DWORD *type,
         void *data, DWORD *data_len)
 {
-    TRACE("(%p, %d, %s, %p, %p, %p, %p)\n", hkey, index, debugstr_a(value), length, type, data, data_len);
+    TRACE("%p, %ld, %s, %p, %p, %p, %p.\n", hkey, index, debugstr_a(value), length, type, data, data_len);
 
     return RegEnumValueA(hkey, index, value, length, NULL, type, data, data_len);
 }
@@ -2091,7 +2087,7 @@ LONG WINAPI SHEnumValueA(HKEY hkey, DWORD index, char *value, DWORD *length, DWO
 LONG WINAPI SHEnumValueW(HKEY hkey, DWORD index, WCHAR *value, DWORD *length, DWORD *type,
         void *data, DWORD *data_len)
 {
-    TRACE("(%p, %d, %s, %p, %p, %p, %p)\n", hkey, index, debugstr_w(value), length, type, data, data_len);
+    TRACE("%p, %ld, %s, %p, %p, %p, %p.\n", hkey, index, debugstr_w(value), length, type, data, data_len);
 
     return RegEnumValueW(hkey, index, value, length, NULL, type, data, data_len);
 }
@@ -2270,7 +2266,7 @@ DWORD WINAPI SHRegGetPathA(HKEY hkey, const char *subkey, const char *value, cha
 {
     DWORD length = MAX_PATH;
 
-    TRACE("(%p, %s, %s, %p, %#x)\n", hkey, debugstr_a(subkey), debugstr_a(value), path, flags);
+    TRACE("%p, %s, %s, %p, %#lx.\n", hkey, debugstr_a(subkey), debugstr_a(value), path, flags);
 
     return SHGetValueA(hkey, subkey, value, 0, path, &length);
 }
@@ -2282,7 +2278,7 @@ DWORD WINAPI SHRegGetPathW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, W
 {
     DWORD length = MAX_PATH;
 
-    TRACE("(%p, %s, %s, %p, %d)\n", hkey, debugstr_w(subkey), debugstr_w(value), path, flags);
+    TRACE("%p, %s, %s, %p, %#lx.\n", hkey, debugstr_w(subkey), debugstr_w(value), path, flags);
 
     return SHGetValueW(hkey, subkey, value, 0, path, &length);
 }
@@ -2296,7 +2292,7 @@ DWORD WINAPI SHSetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWO
     DWORD ret = ERROR_SUCCESS, dummy;
     HKEY hsubkey;
 
-    TRACE("(%p, %s, %s, %d, %p, %d)\n", hkey, debugstr_w(subkey), debugstr_w(value),
+    TRACE("%p, %s, %s, %ld, %p, %ld.\n", hkey, debugstr_w(subkey), debugstr_w(value),
             type, data, data_len);
 
     if (subkey && *subkey)
@@ -2323,7 +2319,7 @@ DWORD WINAPI SHSetValueA(HKEY hkey, const char *subkey, const char *value,
     DWORD ret = ERROR_SUCCESS, dummy;
     HKEY hsubkey;
 
-    TRACE("(%p, %s, %s, %d, %p, %d)\n", hkey, debugstr_a(subkey), debugstr_a(value),
+    TRACE("%p, %s, %s, %ld, %p, %ld.\n", hkey, debugstr_a(subkey), debugstr_a(value),
             type, data, data_len);
 
     if (subkey && *subkey)
@@ -2346,7 +2342,7 @@ DWORD WINAPI SHSetValueA(HKEY hkey, const char *subkey, const char *value,
  */
 DWORD WINAPI SHRegSetPathA(HKEY hkey, const char *subkey, const char *value, const char *path, DWORD flags)
 {
-    FIXME("(%p, %s, %s, %s, %#x) - semi-stub\n", hkey, debugstr_a(subkey),
+    FIXME("%p, %s, %s, %s, %#lx - semi-stub\n", hkey, debugstr_a(subkey),
             debugstr_a(value), debugstr_a(path), flags);
 
     /* FIXME: PathUnExpandEnvStringsA() */
@@ -2359,7 +2355,7 @@ DWORD WINAPI SHRegSetPathA(HKEY hkey, const char *subkey, const char *value, con
  */
 DWORD WINAPI SHRegSetPathW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, const WCHAR *path, DWORD flags)
 {
-    FIXME("(%p, %s, %s, %s, %#x) - semi-stub\n", hkey, debugstr_w(subkey),
+    FIXME("%p, %s, %s, %s, %#lx semi-stub\n", hkey, debugstr_w(subkey),
             debugstr_w(value), debugstr_w(path), flags);
 
     /* FIXME: PathUnExpandEnvStringsW(); */
@@ -2404,7 +2400,7 @@ BOOL WINAPI IsOS(DWORD feature)
     platform = osvi.dwPlatformId;
 
 #define ISOS_RETURN(x) \
-    TRACE("(0x%x) ret=%d\n",feature,(x)); \
+    TRACE("(%#lx) ret %d\n",feature,(x)); \
     return (x)
 
     switch(feature)  {
@@ -2502,7 +2498,7 @@ BOOL WINAPI IsOS(DWORD feature)
 
 #undef ISOS_RETURN
 
-    WARN("(0x%x) unknown parameter\n", feature);
+    WARN("(%#lx) unknown parameter\n", feature);
 
     return FALSE;
 }
-- 
2.34.1




More information about the wine-devel mailing list