There are 745 modules to be migrated to using long types.
Start by enabling also attribute(format) on msvcrt APIs (for printf and scanf -like APIs) And continue by migration some modules in programs.
FWI, I've scripted the migration. Between 80 and 90% of the modules can be done automatically (ie fully migrated without warnings); for the remaining modules, again 80 to 90% of the warnings are fixed automatically.
The remaining must be done manually. Regular items to be looked into: - "complex" format strings (multi-line, in static variable, embedded inside macros...) - long/int mismatch (in pointer as argument, in proto vs definition of function...). Here the fix must be decided on a case by case basis. - multi-directories modules (like d3d, msvcrt, atl to name a few). Likely, requires migrating several modules at once.
If you're interested at looking into your favorite module, don't hesitate to go back to me (I can provide the raw automated changes if this can help you).
The plan is to start to migrate programs/*. Then likely dlls/*. The [dlls/programs]/tests/* shall wait for Fabian to finish the gcc11 todo fixes.
A+ --
Eric Pouech (15): include/msvcrt: add attribute((format)) to printf and scanf -like APIs programs/attrib: enable compilation with long types programs/cabarc: enable compilation with long types programs/chcp.com: enable compilation with long types programs/cmd: enable compilation with long types programs/conhost: enable compilation with long types programs/[cw]script: enable compilation with long types programs/dxdiag: enable compilation with long types programs/eject: enable compilation with long types programs/explorer: enable compilation with long types programs/fsutil: enable compilation with long types programs/msiexec: enable compilation with long types programs/net: enable compilation with long types programs/netstat: enable compilation with long types programs/ping: enable compilation with long types
dlls/compobj.dll16/compobj.c | 2 +- dlls/crypt32/sip.c | 2 +- dlls/iphlpapi/iphlpapi_main.c | 2 +- dlls/iphlpapi/tests/iphlpapi.c | 4 +- dlls/msdmo/tests/msdmo.c | 2 +- dlls/mshtml/main.c | 2 +- dlls/oleaut32/oleaut.c | 2 +- dlls/oleaut32/typelib.c | 2 +- dlls/rpcrt4/rpcrt4_main.c | 4 +- dlls/shell32/classes.c | 2 +- dlls/shell32/debughlp.c | 2 +- dlls/shell32/shfldr.h | 2 +- dlls/shlwapi/ordinal.c | 2 +- dlls/typelib.dll16/typelib.c | 2 +- dlls/webservices/writer.c | 4 +- include/msvcrt/corecrt.h | 8 +++ include/msvcrt/crtdbg.h | 2 +- include/msvcrt/stdio.h | 90 ++++++++++++++++++++++------------ programs/attrib/Makefile.in | 1 - programs/attrib/attrib.c | 6 +-- programs/cabarc/Makefile.in | 1 - programs/cabarc/cabarc.c | 2 +- programs/chcp.com/Makefile.in | 1 - programs/chcp.com/main.c | 4 +- programs/cmd/Makefile.in | 1 - programs/cmd/builtins.c | 20 ++++---- programs/cmd/directory.c | 4 +- programs/cmd/wcmdmain.c | 14 +++--- programs/conhost/Makefile.in | 1 - programs/conhost/conhost.c | 18 +++---- programs/conhost/window.c | 10 ++-- programs/cscript/Makefile.in | 2 +- programs/dxdiag/Makefile.in | 1 - programs/dxdiag/information.c | 2 +- programs/dxdiag/output.c | 6 +-- programs/eject/Makefile.in | 1 - programs/eject/eject.c | 6 +-- programs/explorer/Makefile.in | 1 - programs/explorer/appbar.c | 2 +- programs/explorer/desktop.c | 52 ++++++++++---------- programs/explorer/explorer.c | 4 +- programs/explorer/systray.c | 2 +- programs/fsutil/Makefile.in | 1 - programs/fsutil/main.c | 2 +- programs/msiexec/Makefile.in | 1 - programs/msiexec/msiexec.c | 12 ++--- programs/msiexec/service.c | 4 +- programs/net/Makefile.in | 1 - programs/net/net.c | 4 +- programs/netstat/Makefile.in | 1 - programs/netstat/netstat.c | 2 +- programs/ping/Makefile.in | 1 - programs/ping/ping_main.c | 2 +- programs/winetest/main.c | 2 +- programs/wscript/Makefile.in | 1 - programs/wscript/arguments.c | 8 +-- programs/wscript/host.c | 10 ++-- programs/wscript/main.c | 6 +-- 58 files changed, 190 insertions(+), 166 deletions(-)
fix a bunch of warnings generated by this patch and the migration of GUID.Data1 to long in ae2693e2c4079edcc719c08abed5ad58ba7aace7
--- dlls/compobj.dll16/compobj.c | 2 - dlls/crypt32/sip.c | 2 - dlls/iphlpapi/iphlpapi_main.c | 2 - dlls/iphlpapi/tests/iphlpapi.c | 4 +- dlls/msdmo/tests/msdmo.c | 2 - dlls/mshtml/main.c | 2 - dlls/oleaut32/oleaut.c | 2 - dlls/oleaut32/typelib.c | 2 - dlls/rpcrt4/rpcrt4_main.c | 4 +- dlls/shell32/classes.c | 2 - dlls/shell32/debughlp.c | 2 - dlls/shell32/shfldr.h | 2 - dlls/shlwapi/ordinal.c | 2 - dlls/typelib.dll16/typelib.c | 2 - dlls/webservices/writer.c | 4 +- include/msvcrt/corecrt.h | 8 ++++ include/msvcrt/crtdbg.h | 2 - include/msvcrt/stdio.h | 90 +++++++++++++++++++++++++++------------- programs/winetest/main.c | 2 - 19 files changed, 88 insertions(+), 50 deletions(-)
diff --git a/dlls/compobj.dll16/compobj.c b/dlls/compobj.dll16/compobj.c index a634ebe6374..831d62d25ee 100644 --- a/dlls/compobj.dll16/compobj.c +++ b/dlls/compobj.dll16/compobj.c @@ -657,7 +657,7 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid) */ INT16 WINAPI StringFromGUID216(REFGUID id, char *str, INT16 cmax) { - static const char format[] = "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"; + static const char format[] = "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"; if (!id || cmax < CHARS_IN_GUID) return 0; sprintf( str, format, id->Data1, id->Data2, id->Data3, id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], diff --git a/dlls/crypt32/sip.c b/dlls/crypt32/sip.c index 3642e94e799..82eb87c16bf 100644 --- a/dlls/crypt32/sip.c +++ b/dlls/crypt32/sip.c @@ -40,7 +40,7 @@ static void CRYPT_guid2wstr( const GUID *guid, LPWSTR wstr ) { char str[40];
- sprintf(str, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + sprintf(str, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] ); diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index c94f869c9f9..949fed1fb3e 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -59,7 +59,7 @@ static const NPI_MODULEID *ip_module_id( USHORT family ) DWORD WINAPI ConvertGuidToStringA( const GUID *guid, char *str, DWORD len ) { if (len < CHARS_IN_GUID) return ERROR_INSUFFICIENT_BUFFER; - sprintf( str, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + sprintf( str, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] ); return ERROR_SUCCESS; diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index c725730c063..be50cc0b476 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1409,7 +1409,7 @@ static void testGetAdaptersInfo(void) GetIfEntry( &row ); ConvertInterfaceIndexToLuid( ptr->Index, &luid ); ConvertInterfaceLuidToGuid( &luid, &guid ); - sprintf( name, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + sprintf( name, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7] ); @@ -1671,7 +1671,7 @@ static void test_GetAdaptersAddresses(void)
status = ConvertInterfaceLuidToGuid(&aa->Luid, &guid); ok(!status, "got %u\n", status); - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + sprintf(buf, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); diff --git a/dlls/msdmo/tests/msdmo.c b/dlls/msdmo/tests/msdmo.c index 41e6d57d2eb..9b261d369fc 100644 --- a/dlls/msdmo/tests/msdmo.c +++ b/dlls/msdmo/tests/msdmo.c @@ -31,7 +31,7 @@ static const GUID GUID_wmp1 = {0x13a7995e,0x7d8f,0x45b4,{0x9c,0x77,0x81,0x92,0x6 static const char *guid_to_string(const GUID *guid) { static char buffer[50]; - sprintf(buffer, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + sprintf(buffer, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index 959d2d66214..f2a255d265a 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -627,7 +627,7 @@ static HRESULT register_server(BOOL do_register)
for(i=0; i < ARRAY_SIZE(pse); i++) { pse[i].pszValue = heap_alloc(39); - sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + sprintf(pse[i].pszValue, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0], clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4], clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]); diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 043face3459..c29e64a4091 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -832,7 +832,7 @@ static HRESULT reg_get_typelib_module(REFIID iid, WCHAR *module, DWORD len) BOOL is_wow64; HKEY ikey;
- sprintf( interfacekey, "Interface\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\Typelib", + sprintf( interfacekey, "Interface\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\Typelib", iid->Data1, iid->Data2, iid->Data3, iid->Data4[0], iid->Data4[1], iid->Data4[2], iid->Data4[3], iid->Data4[4], iid->Data4[5], iid->Data4[6], iid->Data4[7] diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 97b6786feff..7dcc8d815a3 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -3660,7 +3660,7 @@ static BOOL TLB_GUIDFromString(const char *str, GUID *guid) int i; short s;
- if(sscanf(str, "%x-%hx-%hx-%hx", &guid->Data1, &guid->Data2, &guid->Data3, &s) != 4) { + if(sscanf(str, "%lx-%hx-%hx-%hx", &guid->Data1, &guid->Data2, &guid->Data3, &s) != 4) { FIXME("Can't parse guid %s\n", debugstr_guid(guid)); return FALSE; } diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index d5ba8c82c05..a1848ef28e5 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -543,7 +543,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, RPC_CSTR* StringUuid)
if (!Uuid) Uuid = &uuid_nil;
- sprintf( (char*)*StringUuid, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + sprintf( (char*)*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", Uuid->Data1, Uuid->Data2, Uuid->Data3, Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2], Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5], @@ -566,7 +566,7 @@ RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, RPC_WSTR* StringUuid)
if (!Uuid) Uuid = &uuid_nil;
- sprintf(buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + sprintf(buf, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", Uuid->Data1, Uuid->Data2, Uuid->Data3, Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2], Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5], diff --git a/dlls/shell32/classes.c b/dlls/shell32/classes.c index 84784733853..10870b70ab9 100644 --- a/dlls/shell32/classes.c +++ b/dlls/shell32/classes.c @@ -200,7 +200,7 @@ BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LP static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey) { char xriid[50]; - sprintf( xriid, "CLSID\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + sprintf( xriid, "CLSID\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); diff --git a/dlls/shell32/debughlp.c b/dlls/shell32/debughlp.c index a7ae616923a..c988bab481b 100644 --- a/dlls/shell32/debughlp.c +++ b/dlls/shell32/debughlp.c @@ -247,7 +247,7 @@ void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) else if (( riid = _dbg_ILGetGUIDPointer(pidl) )) { if (szOut) - sprintf( szOut, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + sprintf( szOut, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); diff --git a/dlls/shell32/shfldr.h b/dlls/shell32/shfldr.h index e176d82de2f..163bf0517d3 100644 --- a/dlls/shell32/shfldr.h +++ b/dlls/shell32/shfldr.h @@ -61,7 +61,7 @@ BOOL trash_file( const WCHAR *path ) DECLSPEC_HIDDEN;
static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str) { - return sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + return sprintf(str, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index bdd9da0c67b..e35ecd77644 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -461,7 +461,7 @@ INT WINAPI SHStringFromGUIDA(REFGUID guid, LPSTR lpszDest, INT cchMax)
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
- sprintf(xguid, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + sprintf(xguid, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); diff --git a/dlls/typelib.dll16/typelib.c b/dlls/typelib.dll16/typelib.c index 50354a51de2..4787010354c 100644 --- a/dlls/typelib.dll16/typelib.c +++ b/dlls/typelib.dll16/typelib.c @@ -82,7 +82,7 @@ QueryPathOfRegTypeLib16( TRACE("\n");
if (HIWORD(guid)) { - sprintf( typelibkey, "SOFTWARE\Classes\Typelib\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\%d.%d\%x\win16", + sprintf( typelibkey, "SOFTWARE\Classes\Typelib\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\%d.%d\%x\win16", guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7], diff --git a/dlls/webservices/writer.c b/dlls/webservices/writer.c index c9e443b0e80..044351f6094 100644 --- a/dlls/webservices/writer.c +++ b/dlls/webservices/writer.c @@ -1041,7 +1041,7 @@ static ULONG format_datetime( const WS_DATETIME *ptr, unsigned char *buf )
static ULONG format_guid( const GUID *ptr, unsigned char *buf ) { - static const char fmt[] = "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; + static const char fmt[] = "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; return sprintf( (char *)buf, fmt, ptr->Data1, ptr->Data2, ptr->Data3, ptr->Data4[0], ptr->Data4[1], ptr->Data4[2], ptr->Data4[3], ptr->Data4[4], ptr->Data4[5], ptr->Data4[6], ptr->Data4[7] ); @@ -1049,7 +1049,7 @@ static ULONG format_guid( const GUID *ptr, unsigned char *buf )
static ULONG format_urn( const GUID *ptr, unsigned char *buf ) { - static const char fmt[] = "urn:uuid:%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; + static const char fmt[] = "urn:uuid:%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; return sprintf( (char *)buf, fmt, ptr->Data1, ptr->Data2, ptr->Data3, ptr->Data4[0], ptr->Data4[1], ptr->Data4[2], ptr->Data4[3], ptr->Data4[4], ptr->Data4[5], ptr->Data4[6], ptr->Data4[7] ); diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index e61a22dccd7..aba9bc9422e 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -334,4 +334,12 @@ typedef struct threadlocaleinfostruct { #define _THREADLOCALEINFO #endif
+#if !defined(__WINE_USE_MSVCRT) || defined(__MINGW32__) +#define __WINE_CRT_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) +#define __WINE_CRT_SCANF_ATTR(fmt,args) __attribute__((format (scanf,fmt,args))) +#else +#define __WINE_CRT_PRINTF_ATTR(fmt,args) +#define __WINE_CRT_SCANF_ATTR(fmt,args) +#endif + #endif /* __WINE_CORECRT_H */ diff --git a/include/msvcrt/crtdbg.h b/include/msvcrt/crtdbg.h index dc56eb883f5..a8cf739cc53 100644 --- a/include/msvcrt/crtdbg.h +++ b/include/msvcrt/crtdbg.h @@ -88,7 +88,7 @@ extern int _crtDbgFlag;
_ACRTIMP int __cdecl _CrtCheckMemory(void); _ACRTIMP int WINAPIV _CrtDbgReport(int reportType, const char *filename, int linenumber, - const char *moduleName, const char *format, ...); + const char *moduleName, const char *format, ...) __WINE_CRT_PRINTF_ATTR(5, 6); _ACRTIMP int __cdecl _CrtDumpMemoryLeaks(void); _ACRTIMP int __cdecl _CrtSetBreakAlloc(int); _ACRTIMP int __cdecl _CrtSetDbgFlag(int); diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index daefcd03a74..e53929b94bc 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -161,6 +161,7 @@ _ACRTIMP int __cdecl __stdio_common_vsscanf(unsigned __int64,char const*,size_t,
#if defined(_UCRT) && !defined(_NO_CRT_STDIO_INLINE)
+static inline int __cdecl vsnprintf(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0); static inline int __cdecl vsnprintf(char *buffer, size_t size, const char *format, va_list args) { int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, @@ -168,6 +169,7 @@ static inline int __cdecl vsnprintf(char *buffer, size_t size, const char *forma return ret < 0 ? -1 : ret; }
+static inline int __cdecl _vsnprintf(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0); static inline int __cdecl _vsnprintf(char *buffer, size_t size, const char *format, va_list args) { int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, @@ -175,12 +177,14 @@ static inline int __cdecl _vsnprintf(char *buffer, size_t size, const char *form return ret < 0 ? -1 : ret; }
+static inline int __cdecl _vsnprintf_s(char *buffer, size_t size, size_t count, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(4, 0); static inline int __cdecl _vsnprintf_s(char *buffer, size_t size, size_t count, const char *format, va_list args) { int ret = __stdio_common_vsnprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, count, format, NULL, args); return ret < 0 ? -1 : ret; }
+static inline int WINAPIV _snprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) __WINE_CRT_PRINTF_ATTR(4, 5); static inline int WINAPIV _snprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) { int ret; @@ -192,6 +196,7 @@ static inline int WINAPIV _snprintf_s(char *buffer, size_t size, size_t count, c return ret; }
+static inline int __cdecl _vscprintf(const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(1, 0); static inline int __cdecl _vscprintf(const char *format, va_list args) { int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, @@ -199,6 +204,7 @@ static inline int __cdecl _vscprintf(const char *format, va_list args) return ret < 0 ? -1 : ret; }
+static inline int WINAPIV _scprintf(const char *format, ...) __WINE_CRT_PRINTF_ATTR(1, 2); static inline int WINAPIV _scprintf(const char *format, ...) { int ret; @@ -211,6 +217,7 @@ static inline int WINAPIV _scprintf(const char *format, ...) return ret; }
+static inline int __cdecl vsprintf(char *buffer, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(2, 0); static inline int __cdecl vsprintf(char *buffer, const char *format, va_list args) { int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, @@ -218,12 +225,14 @@ static inline int __cdecl vsprintf(char *buffer, const char *format, va_list arg return ret < 0 ? -1 : ret; }
+static inline int __cdecl vsprintf_s(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0); static inline int __cdecl vsprintf_s(char *buffer, size_t size, const char *format, va_list args) { int ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, NULL, args); return ret < 0 ? -1 : ret; }
+static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *format, ...) __WINE_CRT_PRINTF_ATTR(3, 4); static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *format, ...) { int ret; @@ -235,17 +244,20 @@ static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *forma return ret; }
+static inline int __cdecl _vsprintf_p_l(char *buffer, size_t size, const char *format, _locale_t locale, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0); static inline int __cdecl _vsprintf_p_l(char *buffer, size_t size, const char *format, _locale_t locale, va_list args) { int ret = __stdio_common_vsprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, locale, args); return ret < 0 ? -1 : ret; }
+static inline int __cdecl vfprintf(FILE *file, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(2, 0); static inline int __cdecl vfprintf(FILE *file, const char *format, va_list args) { return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, file, format, NULL, args); }
+static inline int WINAPIV fprintf(FILE *file, const char *format, ...) __WINE_CRT_PRINTF_ATTR(2, 3); static inline int WINAPIV fprintf(FILE *file, const char *format, ...) { int ret; @@ -257,11 +269,13 @@ static inline int WINAPIV fprintf(FILE *file, const char *format, ...) return ret; }
+static inline int __cdecl vfprintf_s(FILE *file, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(2, 0); static inline int __cdecl vfprintf_s(FILE *file, const char *format, va_list args) { return __stdio_common_vfprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, file, format, NULL, args); }
+static inline int WINAPIV fprintf_s(FILE *file, const char *format, ...) __WINE_CRT_PRINTF_ATTR(2, 3); static inline int WINAPIV fprintf_s(FILE *file, const char *format, ...) { int ret; @@ -273,11 +287,13 @@ static inline int WINAPIV fprintf_s(FILE *file, const char *format, ...) return ret; }
+static inline int vprintf(const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(1, 0); static inline int vprintf(const char *format, va_list args) { return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, format, NULL, args); }
+static inline int WINAPIV printf(const char *format, ...) __WINE_CRT_PRINTF_ATTR(1, 2); static inline int WINAPIV printf(const char *format, ...) { int ret; @@ -289,11 +305,13 @@ static inline int WINAPIV printf(const char *format, ...) return ret; }
+static inline int vprintf_s(const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(1, 0); static inline int vprintf_s(const char *format, va_list args) { return __stdio_common_vfprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, format, NULL, args); }
+static inline int WINAPIV printf_s(const char *format, ...) __WINE_CRT_PRINTF_ATTR(1, 2); static inline int WINAPIV printf_s(const char *format, ...) { int ret; @@ -305,6 +323,7 @@ static inline int WINAPIV printf_s(const char *format, ...) return ret; }
+static inline int WINAPIV sscanf(const char *buffer, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3); static inline int WINAPIV sscanf(const char *buffer, const char *format, ...) { int ret; @@ -316,6 +335,7 @@ static inline int WINAPIV sscanf(const char *buffer, const char *format, ...) return ret; }
+static inline int WINAPIV sscanf_s(const char *buffer, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3); static inline int WINAPIV sscanf_s(const char *buffer, const char *format, ...) { int ret; @@ -327,6 +347,7 @@ static inline int WINAPIV sscanf_s(const char *buffer, const char *format, ...) return ret; }
+static inline int WINAPIV _snscanf_l(const char *buffer, size_t size, const char *format, _locale_t locale, ...) __WINE_CRT_SCANF_ATTR(3, 5); static inline int WINAPIV _snscanf_l(const char *buffer, size_t size, const char *format, _locale_t locale, ...) { int ret; @@ -338,6 +359,7 @@ static inline int WINAPIV _snscanf_l(const char *buffer, size_t size, const char return ret; }
+static inline int WINAPIV fscanf(FILE *file, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3); static inline int WINAPIV fscanf(FILE *file, const char *format, ...) { int ret; @@ -349,6 +371,7 @@ static inline int WINAPIV fscanf(FILE *file, const char *format, ...) return ret; }
+static inline int WINAPIV fscanf_s(FILE *file, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3); static inline int WINAPIV fscanf_s(FILE *file, const char *format, ...) { int ret; @@ -360,6 +383,7 @@ static inline int WINAPIV fscanf_s(FILE *file, const char *format, ...) return ret; }
+static inline int WINAPIV scanf(const char *format, ...) __WINE_CRT_SCANF_ATTR(1, 2); static inline int WINAPIV scanf(const char *format, ...) { int ret; @@ -371,6 +395,7 @@ static inline int WINAPIV scanf(const char *format, ...) return ret; }
+static inline int WINAPIV scanf_s(const char *format, ...) __WINE_CRT_SCANF_ATTR(1, 2); static inline int WINAPIV scanf_s(const char *format, ...) { int ret; @@ -384,33 +409,35 @@ static inline int WINAPIV scanf_s(const char *format, ...)
#else /* _UCRT && !_NO_CRT_STDIO_INLINE */
-_ACRTIMP int WINAPIV _scprintf(const char *,...); -_ACRTIMP int WINAPIV _snprintf_s(char*,size_t,size_t,const char*,...); -_ACRTIMP int __cdecl _vscprintf(const char*,va_list); -_ACRTIMP int __cdecl _vsnprintf_s(char*,size_t,size_t,const char*,va_list); -_ACRTIMP int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,va_list); -_ACRTIMP int WINAPIV fprintf(FILE*,const char*,...); -_ACRTIMP int WINAPIV fprintf_s(FILE*,const char*,...); -_ACRTIMP int WINAPIV printf(const char*,...); -_ACRTIMP int WINAPIV printf_s(const char*,...); -_ACRTIMP int WINAPIV sprintf_s(char*,size_t,const char*,...); -_ACRTIMP int __cdecl vfprintf(FILE*,const char*,va_list); -_ACRTIMP int __cdecl vfprintf_s(FILE*,const char*,va_list); -_ACRTIMP int __cdecl vprintf(const char*,va_list); -_ACRTIMP int __cdecl vprintf_s(const char*,va_list); -_ACRTIMP int __cdecl vsprintf(char*,const char*,va_list); -_ACRTIMP int __cdecl vsprintf_s(char*,size_t,const char*,va_list); - -_ACRTIMP int __cdecl _vsnprintf(char*,size_t,const char*,va_list); -static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args) { return _vsnprintf(buffer,size,format,args); } - -_ACRTIMP int WINAPIV _snscanf_l(const char*,size_t,const char*,_locale_t,...); -_ACRTIMP int WINAPIV fscanf(FILE*,const char*,...); -_ACRTIMP int WINAPIV fscanf_s(FILE*,const char*,...); -_ACRTIMP int WINAPIV scanf(const char*,...); -_ACRTIMP int WINAPIV scanf_s(const char*,...); -_ACRTIMP int WINAPIV sscanf(const char*,const char*,...); -_ACRTIMP int WINAPIV sscanf_s(const char*,const char*,...); +_ACRTIMP int WINAPIV _scprintf(const char *,...) __WINE_CRT_PRINTF_ATTR(1, 2); +_ACRTIMP int WINAPIV _snprintf_s(char*,size_t,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(4, 5); +_ACRTIMP int __cdecl _vscprintf(const char*,va_list) __WINE_CRT_PRINTF_ATTR(1, 0); +_ACRTIMP int __cdecl _vsnprintf_s(char*,size_t,size_t,const char*,va_list) __WINE_CRT_PRINTF_ATTR(4, 0); +_ACRTIMP int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,va_list) __WINE_CRT_PRINTF_ATTR(3, 0); +_ACRTIMP int WINAPIV fprintf(FILE*,const char*,...) __WINE_CRT_PRINTF_ATTR(2, 3); +_ACRTIMP int WINAPIV fprintf_s(FILE*,const char*,...) __WINE_CRT_PRINTF_ATTR(2, 3); +_ACRTIMP int WINAPIV printf(const char*,...) __WINE_CRT_PRINTF_ATTR(1, 2); +_ACRTIMP int WINAPIV printf_s(const char*,...) __WINE_CRT_PRINTF_ATTR(1, 2); +_ACRTIMP int WINAPIV sprintf_s(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4); +_ACRTIMP int __cdecl vfprintf(FILE*,const char*,va_list) __WINE_CRT_PRINTF_ATTR(2, 0); +_ACRTIMP int __cdecl vfprintf_s(FILE*,const char*,va_list) __WINE_CRT_PRINTF_ATTR(2, 0); +_ACRTIMP int __cdecl vprintf(const char*,va_list) __WINE_CRT_PRINTF_ATTR(1, 0); +_ACRTIMP int __cdecl vprintf_s(const char*,va_list) __WINE_CRT_PRINTF_ATTR(1, 0); +_ACRTIMP int __cdecl vsprintf(char*,const char*,va_list) __WINE_CRT_PRINTF_ATTR(2, 0); +_ACRTIMP int __cdecl vsprintf_s(char*,size_t,const char*,va_list) __WINE_CRT_PRINTF_ATTR(3, 0); + +_ACRTIMP int __cdecl _vsnprintf(char*,size_t,const char*,va_list) __WINE_CRT_PRINTF_ATTR(3, 0); +static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0); +static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args) +{ return _vsnprintf(buffer,size,format,args); } + +_ACRTIMP int WINAPIV _snscanf_l(const char*,size_t,const char*,_locale_t,...) __WINE_CRT_SCANF_ATTR(3, 5); +_ACRTIMP int WINAPIV fscanf(FILE*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3); +_ACRTIMP int WINAPIV fscanf_s(FILE*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3); +_ACRTIMP int WINAPIV scanf(const char*,...) __WINE_CRT_SCANF_ATTR(1, 2); +_ACRTIMP int WINAPIV scanf_s(const char*,...) __WINE_CRT_SCANF_ATTR(1, 2); +_ACRTIMP int WINAPIV sscanf(const char*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3); +_ACRTIMP int WINAPIV sscanf_s(const char*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3);
#endif /* _UCRT && !_NO_CRT_STDIO_INLINE */
@@ -435,6 +462,7 @@ static inline int unlink(const char* path) { return _unlink(path); }
#if !defined(_NO_CRT_STDIO_INLINE)
+static inline int WINAPIV snprintf(char *buffer, size_t size, const char *format, ...) __WINE_CRT_PRINTF_ATTR(3, 4); static inline int WINAPIV snprintf(char *buffer, size_t size, const char *format, ...) { int ret; @@ -446,6 +474,7 @@ static inline int WINAPIV snprintf(char *buffer, size_t size, const char *format return ret; }
+static inline int WINAPIV _snprintf(char *buffer, size_t size, const char *format, ...) __WINE_CRT_PRINTF_ATTR(3, 4); static inline int WINAPIV _snprintf(char *buffer, size_t size, const char *format, ...) { int ret; @@ -457,6 +486,7 @@ static inline int WINAPIV _snprintf(char *buffer, size_t size, const char *forma return ret; }
+static inline int WINAPIV sprintf(char *buffer, const char *format, ...) __WINE_CRT_PRINTF_ATTR(2, 3); static inline int WINAPIV sprintf(char *buffer, const char *format, ...) { int ret; @@ -470,9 +500,9 @@ static inline int WINAPIV sprintf(char *buffer, const char *format, ...)
#else /* !_NO_CRT_STDIO_INLINE */
-_ACRTIMP int WINAPIV snprintf(char*,size_t,const char*,...); -_ACRTIMP int WINAPIV _snprintf(char*,size_t,const char*,...); -_ACRTIMP int WINAPIV sprintf(char*,const char*,...); +_ACRTIMP int WINAPIV snprintf(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4); +_ACRTIMP int WINAPIV _snprintf(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4); +_ACRTIMP int WINAPIV sprintf(char*,const char*,...) __WINE_CRT_PRINTF_ATTR(2, 3);
#endif /* !_NO_CRT_STDIO_INLINE */
diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 3ed514f73e2..3ffb0185052 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -865,7 +865,7 @@ static HMODULE load_com_dll(const char *name, char **path, char *filename)
if(!get_main_clsid(name, &clsid)) return NULL;
- sprintf(keyname, "CLSID\{%08x-%04x-%04x-%02x%2x-%02x%2x%02x%2x%02x%2x}\InprocServer32", + sprintf(keyname, "CLSID\{%08lx-%04x-%04x-%02x%2x-%02x%2x%02x%2x%02x%2x}\InprocServer32", clsid.Data1, clsid.Data2, clsid.Data3, clsid.Data4[0], clsid.Data4[1], clsid.Data4[2], clsid.Data4[3], clsid.Data4[4], clsid.Data4[5], clsid.Data4[6], clsid.Data4[7]);
--- programs/attrib/Makefile.in | 1 - programs/attrib/attrib.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/programs/attrib/Makefile.in b/programs/attrib/Makefile.in index 128ecf91e32..2c2eade6b69 100644 --- a/programs/attrib/Makefile.in +++ b/programs/attrib/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = attrib.exe IMPORTS = user32
diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index f8257461fe2..4344200b3ec 100644 --- a/programs/attrib/attrib.c +++ b/programs/attrib/attrib.c @@ -33,7 +33,7 @@ static WCHAR *ATTRIB_LoadMessage(UINT id) static WCHAR msg[MAXSTRING];
if (!LoadStringW(GetModuleHandleW(NULL), id, msg, ARRAY_SIZE(msg))) { - WINE_FIXME("LoadString failed with %d\n", GetLastError()); + WINE_FIXME("LoadString failed with %ld\n", GetLastError()); lstrcpyW(msg, L"Failed!"); } return msg; @@ -75,7 +75,7 @@ static int WINAPIV ATTRIB_wprintf(const WCHAR *format, ...) MAX_WRITECONSOLE_SIZE/sizeof(*output_bufW), &parms); va_end(parms); if (len == 0 && GetLastError() != ERROR_NO_WORK_DONE) { - WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); + WINE_FIXME("Could not format string: le=%lu, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); return 0; }
@@ -143,7 +143,7 @@ static BOOL ATTRIB_processdirectory(const WCHAR *rootdir, const WCHAR *filespec, WIN32_FIND_DATAW fd; WCHAR flags[] = L" ";
- WINE_TRACE("Processing dir '%s', spec '%s', %d,%x,%x\n", + WINE_TRACE("Processing dir '%s', spec '%s', %d,%lx,%lx\n", wine_dbgstr_w(rootdir), wine_dbgstr_w(filespec), recurse, attrib_set, attrib_clear);
--- programs/cabarc/Makefile.in | 1 - programs/cabarc/cabarc.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/cabarc/Makefile.in b/programs/cabarc/Makefile.in index c0c825500de..769df20457d 100644 --- a/programs/cabarc/Makefile.in +++ b/programs/cabarc/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = cabarc.exe IMPORTS = cabinet
diff --git a/programs/cabarc/cabarc.c b/programs/cabarc/cabarc.c index 3eb28fe9083..c4622e43046 100644 --- a/programs/cabarc/cabarc.c +++ b/programs/cabarc/cabarc.c @@ -299,7 +299,7 @@ static void create_directories( const WCHAR *name ) { *p = 0; if (!CreateDirectoryW( path, NULL )) - WINE_TRACE("Couldn't create directory %s - error: %d\n", wine_dbgstr_w(path), GetLastError()); + WINE_TRACE("Couldn't create directory %s - error: %ld\n", wine_dbgstr_w(path), GetLastError()); *p = '\'; p = wcschr(p+1, '\'); }
--- programs/chcp.com/Makefile.in | 1 - programs/chcp.com/main.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/programs/chcp.com/Makefile.in b/programs/chcp.com/Makefile.in index 7a55d3cf15f..c7037abb10f 100644 --- a/programs/chcp.com/Makefile.in +++ b/programs/chcp.com/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = chcp.com IMPORTS = kernelbase
diff --git a/programs/chcp.com/main.c b/programs/chcp.com/main.c index 31ddba4c137..6c5864d0e19 100644 --- a/programs/chcp.com/main.c +++ b/programs/chcp.com/main.c @@ -56,7 +56,7 @@ static void output_formatstring(const WCHAR *fmt, va_list va_args) fmt, 0, 0, (WCHAR *)&str, 0, &va_args); if (!len && GetLastError() != ERROR_NO_WORK_DONE) { - WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(fmt)); + WINE_FIXME("Could not format string: le=%lu, fmt=%s\n", GetLastError(), wine_dbgstr_w(fmt)); return; } output_writeconsole(str, len); @@ -71,7 +71,7 @@ static void WINAPIV output_message(unsigned int id, ...)
if (!(len = LoadStringW(GetModuleHandleW(NULL), id, (WCHAR *)&fmt, 0))) { - WINE_FIXME("LoadString failed with %d\n", GetLastError()); + WINE_FIXME("LoadString failed with %ld\n", GetLastError()); return; }
--- programs/cmd/Makefile.in | 1 - programs/cmd/builtins.c | 20 ++++++++++---------- programs/cmd/directory.c | 4 ++-- programs/cmd/wcmdmain.c | 14 +++++++------- 4 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/programs/cmd/Makefile.in b/programs/cmd/Makefile.in index 8c8489af727..b3b33aa1413 100644 --- a/programs/cmd/Makefile.in +++ b/programs/cmd/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = cmd.exe IMPORTS = shell32 user32 advapi32
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 2fc7e07f7aa..963a9eaf361 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -344,7 +344,7 @@ void WCMD_choice (const WCHAR * args) { }
if (opt_timeout) - WINE_FIXME("timeout not supported: %c,%d\n", opt_default, opt_timeout); + WINE_FIXME("timeout not supported: %c,%ld\n", opt_default, opt_timeout);
if (have_console) SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), 0); @@ -396,7 +396,7 @@ void WCMD_choice (const WCHAR * args) { SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), oldmode);
errorlevel = (ptr - opt_c) + 1; - WINE_TRACE("answer: %d\n", errorlevel); + WINE_TRACE("answer: %ld\n", errorlevel); heap_free(my_command); return; } @@ -427,12 +427,12 @@ static BOOL WCMD_AppendEOF(WCHAR *filename) OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE) { - WINE_ERR("Failed to open %s (%d)\n", wine_dbgstr_w(filename), GetLastError()); + WINE_ERR("Failed to open %s (%ld)\n", wine_dbgstr_w(filename), GetLastError()); return FALSE; } else { SetFilePointer (h, 0, NULL, FILE_END); if (!WriteFile(h, &eof, 1, &bytes_written, NULL)) { - WINE_ERR("Failed to append EOF to %s (%d)\n", wine_dbgstr_w(filename), GetLastError()); + WINE_ERR("Failed to append EOF to %s (%ld)\n", wine_dbgstr_w(filename), GetLastError()); CloseHandle(h); return FALSE; } @@ -491,7 +491,7 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app in = CreateFileW(srcname, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (in == INVALID_HANDLE_VALUE) { - WINE_ERR("Failed to open %s (%d)\n", wine_dbgstr_w(srcname), GetLastError()); + WINE_ERR("Failed to open %s (%ld)\n", wine_dbgstr_w(srcname), GetLastError()); return FALSE; }
@@ -499,7 +499,7 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app out = CreateFileW(dstname, GENERIC_WRITE, 0, NULL, append?OPEN_EXISTING:CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (out == INVALID_HANDLE_VALUE) { - WINE_ERR("Failed to open %s (%d)\n", wine_dbgstr_w(dstname), GetLastError()); + WINE_ERR("Failed to open %s (%ld)\n", wine_dbgstr_w(dstname), GetLastError()); CloseHandle(in); return FALSE; } @@ -526,12 +526,12 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app if (bytesread) { ok = WriteFile(out, buffer, bytesread, &byteswritten, NULL); if (!ok || byteswritten != bytesread) { - WINE_ERR("Unexpected failure writing to %s, rc=%d\n", + WINE_ERR("Unexpected failure writing to %s, rc=%ld\n", wine_dbgstr_w(dstname), GetLastError()); } } } else { - WINE_ERR("Unexpected failure reading from %s, rc=%d\n", + WINE_ERR("Unexpected failure reading from %s, rc=%ld\n", wine_dbgstr_w(srcname), GetLastError()); } } while (ok && bytesread > 0); @@ -2442,7 +2442,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { if (useNumbers) { WCHAR thisNum[20];
- WINE_TRACE("FOR /L provided range from %d to %d step %d\n", + WINE_TRACE("FOR /L provided range from %ld to %ld step %ld\n", numbers[0], numbers[2], numbers[1]); for (i=numbers[0]; (numbers[1]<0)? i>=numbers[2] : i<=numbers[2]; @@ -4775,7 +4775,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
/* Open a key to HKEY_CLASSES_ROOT for enumerating */ if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"", 0, accessOptions, &key) != ERROR_SUCCESS) { - WINE_FIXME("Unexpected failure opening HKCR key: %d\n", GetLastError()); + WINE_FIXME("Unexpected failure opening HKCR key: %ld\n", GetLastError()); return; }
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index 807f7b386b1..8417687939a 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -536,7 +536,7 @@ static void WCMD_dir_trailer(WCHAR drive) {
driveName[0] = drive; status = GetDiskFreeSpaceExW(driveName, &avail, &total, &freebytes); - WINE_TRACE("Writing trailer for '%s' gave %d(%d)\n", wine_dbgstr_w(driveName), + WINE_TRACE("Writing trailer for '%s' gave %ld(%ld)\n", wine_dbgstr_w(driveName), status, GetLastError());
if (errorlevel==0 && !bare) { @@ -727,7 +727,7 @@ void WCMD_directory (WCHAR *args) p++; } p = p - 1; /* So when step on, move to '/' */ - WINE_TRACE("Result: showattrs %x, bits %x\n", showattrs, attrsbits); + WINE_TRACE("Result: showattrs %lx, bits %lx\n", showattrs, attrsbits); break; default: SetLastError(ERROR_INVALID_PARAMETER); diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 65601348b05..af54b209d83 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -132,7 +132,7 @@ void WINAPIV WCMD_output (const WCHAR *format, ...) { format, 0, 0, (LPWSTR)&string, 0, &ap); va_end(ap); if (len == 0 && GetLastError() != ERROR_NO_WORK_DONE) - WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); + WINE_FIXME("Could not format string: le=%lu, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); else { WCMD_output_asis_len(string, len, GetStdHandle(STD_OUTPUT_HANDLE)); @@ -157,7 +157,7 @@ void WINAPIV WCMD_output_stderr (const WCHAR *format, ...) { format, 0, 0, (LPWSTR)&string, 0, &ap); va_end(ap); if (len == 0 && GetLastError() != ERROR_NO_WORK_DONE) - WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); + WINE_FIXME("Could not format string: le=%lu, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); else { WCMD_output_asis_len(string, len, GetStdHandle(STD_ERROR_HANDLE)); @@ -181,7 +181,7 @@ WCHAR* WINAPIV WCMD_format_string (const WCHAR *format, ...) format, 0, 0, (LPWSTR)&string, 0, &ap); va_end(ap); if (len == 0 && GetLastError() != ERROR_NO_WORK_DONE) { - WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); + WINE_FIXME("Could not format string: le=%lu, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); string = (WCHAR*)LocalAlloc(LMEM_FIXED, 2); *string = 0; } @@ -303,7 +303,7 @@ void WCMD_print_error (void) { status = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, (LPWSTR) &lpMsgBuf, 0, NULL); if (!status) { - WINE_FIXME ("Cannot display message for error %d, status %d\n", + WINE_FIXME ("Cannot display message for error %ld, status %ld\n", error_code, GetLastError()); return; } @@ -1462,7 +1462,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects, GetCurrentProcess(), &h, 0, TRUE, DUPLICATE_SAME_ACCESS) == 0) { - WINE_FIXME("Duplicating handle failed with gle %d\n", GetLastError()); + WINE_FIXME("Duplicating handle failed with gle %ld\n", GetLastError()); } WINE_TRACE("Redirect %d (%p) to %d (%p)\n", handle, GetStdHandle(idx_stdhandles[idx]), idx, h);
@@ -1664,7 +1664,7 @@ WCHAR *WCMD_LoadMessage(UINT id) { static WCHAR msg[2048];
if (!LoadStringW(GetModuleHandleW(NULL), id, msg, ARRAY_SIZE(msg))) { - WINE_FIXME("LoadString failed with %d\n", GetLastError()); + WINE_FIXME("LoadString failed with %ld\n", GetLastError()); lstrcpyW(msg, L"Failed!"); } return msg; @@ -2442,7 +2442,7 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
/* Pre initialize some messages */ lstrcpyW(anykey, WCMD_LoadMessage(WCMD_ANYKEY)); - sprintf(osver, "%d.%d.%d", osv.dwMajorVersion, osv.dwMinorVersion, osv.dwBuildNumber); + sprintf(osver, "%ld.%ld.%ld", osv.dwMajorVersion, osv.dwMinorVersion, osv.dwBuildNumber); cmd = WCMD_format_string(WCMD_LoadMessage(WCMD_VERSION), osver); lstrcpyW(version_string, cmd); LocalFree(cmd);
--- programs/conhost/Makefile.in | 1 - programs/conhost/conhost.c | 18 +++++++++--------- programs/conhost/window.c | 10 +++++----- 3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/programs/conhost/Makefile.in b/programs/conhost/Makefile.in index 69559c668ad..2a407006697 100644 --- a/programs/conhost/Makefile.in +++ b/programs/conhost/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = conhost.exe IMPORTS = user32 gdi32 advapi32 DELAYIMPORTS = comctl32 diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 78f6e345170..52363f72aac 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -158,7 +158,7 @@ static void tty_flush( struct console *console ) TRACE("%s\n", debugstr_an(console->tty_buffer, console->tty_buffer_count)); if (!WriteFile( console->tty_output, console->tty_buffer, console->tty_buffer_count, NULL, NULL )) - WARN( "write failed: %u\n", GetLastError() ); + WARN( "write failed: %lu\n", GetLastError() ); console->tty_buffer_count = 0; }
@@ -176,7 +176,7 @@ static void tty_write( struct console *console, const char *buffer, size_t size { assert( !console->tty_buffer_count ); if (!WriteFile( console->tty_output, buffer, size, NULL, NULL )) - WARN( "write failed: %u\n", GetLastError() ); + WARN( "write failed: %lu\n", GetLastError() ); } }
@@ -457,7 +457,7 @@ static NTSTATUS read_complete( struct console *console, NTSTATUS status, const v status = wine_server_call( req ); } SERVER_END_REQ; - if (status && (console->read_ioctl || status != STATUS_INVALID_HANDLE)) ERR( "failed: %#x\n", status ); + if (status && (console->read_ioctl || status != STATUS_INVALID_HANDLE)) ERR( "failed: %#lx\n", status ); console->signaled = signal; console->read_ioctl = 0; console->pending_read = 0; @@ -468,7 +468,7 @@ static NTSTATUS read_console_input( struct console *console, size_t out_size ) { size_t count = min( out_size / sizeof(INPUT_RECORD), console->record_count );
- TRACE("count %u\n", count); + TRACE("count %Iu\n", count);
read_complete( console, STATUS_SUCCESS, console->records, count * sizeof(*console->records), console->record_count > count ); @@ -1267,7 +1267,7 @@ static NTSTATUS process_console_input( struct console *console )
if (ir.EventType != KEY_EVENT || !ir.Event.KeyEvent.bKeyDown) continue;
- TRACE( "key code=%02x scan=%02x char=%02x state=%08x\n", + TRACE( "key code=%02x scan=%02x char=%02x state=%08lx\n", ir.Event.KeyEvent.wVirtualKeyCode, ir.Event.KeyEvent.wVirtualScanCode, ir.Event.KeyEvent.uChar.UnicodeChar, ir.Event.KeyEvent.dwControlKeyState );
@@ -1634,7 +1634,7 @@ static DWORD WINAPI tty_input( void *param ) unsigned int h = condrv_handle( console->tty_input ); status = NtDeviceIoControlFile( console->server, NULL, NULL, NULL, &io, IOCTL_CONDRV_SETUP_INPUT, &h, sizeof(h), NULL, 0 ); - if (status) ERR( "input setup failed: %#x\n", status ); + if (status) ERR( "input setup failed: %#lx\n", status ); }
event = CreateEventW( NULL, TRUE, FALSE, NULL ); @@ -1691,7 +1691,7 @@ static DWORD WINAPI tty_input( void *param ) LeaveCriticalSection( &console_section ); }
- TRACE( "NtReadFile failed: %#x\n", status ); + TRACE( "NtReadFile failed: %#lx\n", status );
done: EnterCriticalSection( &console_section ); @@ -1701,7 +1701,7 @@ done: unsigned int h = 0; status = NtDeviceIoControlFile( console->server, NULL, NULL, NULL, &io, IOCTL_CONDRV_SETUP_INPUT, &h, sizeof(h), NULL, 0 ); - if (status) ERR( "input restore failed: %#x\n", status ); + if (status) ERR( "input restore failed: %#lx\n", status ); } CloseHandle( console->input_thread ); console->input_thread = NULL; @@ -2628,7 +2628,7 @@ static NTSTATUS process_console_ioctls( struct console *console ) } if (status) { - TRACE( "failed to get next request: %#x\n", status ); + TRACE( "failed to get next request: %#lx\n", status ); return status; }
diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 7ad0d48effd..db04ba120e4 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -110,8 +110,8 @@ static const char *debugstr_config( const struct console_config *config )
static const char *debugstr_logfont( const LOGFONTW *lf, unsigned int ft ) { - return wine_dbg_sprintf( "%s%s%s%s lfHeight=%d lfWidth=%d lfEscapement=%d " - "lfOrientation=%d lfWeight=%d lfItalic=%u lfUnderline=%u " + return wine_dbg_sprintf( "%s%s%s%s lfHeight=%ld lfWidth=%ld lfEscapement=%ld " + "lfOrientation=%ld lfWeight=%ld lfItalic=%u lfUnderline=%u " "lfStrikeOut=%u lfCharSet=%u lfPitchAndFamily=%u lfFaceName=%s", (ft & RASTER_FONTTYPE) ? "raster" : "", (ft & TRUETYPE_FONTTYPE) ? "truetype" : "", @@ -124,8 +124,8 @@ static const char *debugstr_logfont( const LOGFONTW *lf, unsigned int ft )
static const char *debugstr_textmetric( const TEXTMETRICW *tm, unsigned int ft ) { - return wine_dbg_sprintf( "%s%s%s%s tmHeight=%d tmAscent=%d tmDescent=%d " - "tmAveCharWidth=%d tmMaxCharWidth=%d tmWeight=%d " + return wine_dbg_sprintf( "%s%s%s%s tmHeight=%ld tmAscent=%ld tmDescent=%ld " + "tmAveCharWidth=%ld tmMaxCharWidth=%ld tmWeight=%ld " "tmPitchAndFamily=%u tmCharSet=%u", (ft & RASTER_FONTTYPE) ? "raster" : "", (ft & TRUETYPE_FONTTYPE) ? "truetype" : "", @@ -2453,7 +2453,7 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp break; case IDS_SCROLL: case IDS_SEARCH: - FIXME( "Unhandled yet command: %lx\n", wparam ); + FIXME( "Unhandled yet command: %Ix\n", wparam ); break; default: return DefWindowProcW( hwnd, msg, wparam, lparam );
--- programs/cscript/Makefile.in | 2 +- programs/wscript/Makefile.in | 1 - programs/wscript/arguments.c | 8 ++++---- programs/wscript/host.c | 10 +++++----- programs/wscript/main.c | 6 +++--- 5 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/programs/cscript/Makefile.in b/programs/cscript/Makefile.in index 2795a66eeca..d87a28fcc54 100644 --- a/programs/cscript/Makefile.in +++ b/programs/cscript/Makefile.in @@ -1,6 +1,6 @@ MODULE = cscript.exe IMPORTS = uuid shell32 oleaut32 ole32 user32 advapi32 -EXTRADEFS = -DWINE_NO_LONG_TYPES -DCSCRIPT_BUILD +EXTRADEFS = -DCSCRIPT_BUILD PARENTSRC = ../wscript
EXTRADLLFLAGS = -mwindows -municode diff --git a/programs/wscript/Makefile.in b/programs/wscript/Makefile.in index 77d276d6c01..33b2e66d9bc 100644 --- a/programs/wscript/Makefile.in +++ b/programs/wscript/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = wscript.exe IMPORTS = uuid shell32 oleaut32 ole32 user32 advapi32
diff --git a/programs/wscript/arguments.c b/programs/wscript/arguments.c index 7961948b6a5..a97752f8452 100644 --- a/programs/wscript/arguments.c +++ b/programs/wscript/arguments.c @@ -70,7 +70,7 @@ static HRESULT WINAPI Arguments2_GetTypeInfoCount(IArguments2 *iface, UINT *pcti static HRESULT WINAPI Arguments2_GetTypeInfo(IArguments2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { - WINE_TRACE("(%x %x %p\n", iTInfo, lcid, ppTInfo); + WINE_TRACE("(%x %lx %p\n", iTInfo, lcid, ppTInfo);
ITypeInfo_AddRef(arguments_ti); *ppTInfo = arguments_ti; @@ -80,7 +80,7 @@ static HRESULT WINAPI Arguments2_GetTypeInfo(IArguments2 *iface, UINT iTInfo, LC static HRESULT WINAPI Arguments2_GetIDsOfNames(IArguments2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - WINE_TRACE("(%s %p %d %x %p)\n", wine_dbgstr_guid(riid), rgszNames, + WINE_TRACE("(%s %p %d %lx %p)\n", wine_dbgstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
return ITypeInfo_GetIDsOfNames(arguments_ti, rgszNames, cNames, rgDispId); @@ -90,7 +90,7 @@ static HRESULT WINAPI Arguments2_Invoke(IArguments2 *iface, DISPID dispIdMember, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - WINE_TRACE("(%d %p %p)\n", dispIdMember, pDispParams, pVarResult); + WINE_TRACE("(%ld %p %p)\n", dispIdMember, pDispParams, pVarResult);
return ITypeInfo_Invoke(arguments_ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); @@ -98,7 +98,7 @@ static HRESULT WINAPI Arguments2_Invoke(IArguments2 *iface, DISPID dispIdMember,
static HRESULT WINAPI Arguments2_Item(IArguments2 *iface, LONG index, BSTR *out_Value) { - WINE_TRACE("(%d %p)\n", index, out_Value); + WINE_TRACE("(%ld %p)\n", index, out_Value);
if(index<0 || index >= numOfArgs) return E_INVALIDARG; diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 8765dd271f4..bd16b7b4cbe 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -126,7 +126,7 @@ static HRESULT WINAPI Host_GetTypeInfoCount(IHost *iface, UINT *pctinfo) static HRESULT WINAPI Host_GetTypeInfo(IHost *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { - WINE_TRACE("(%x %x %p\n", iTInfo, lcid, ppTInfo); + WINE_TRACE("(%x %lx %p\n", iTInfo, lcid, ppTInfo);
ITypeInfo_AddRef(host_ti); *ppTInfo = host_ti; @@ -136,7 +136,7 @@ static HRESULT WINAPI Host_GetTypeInfo(IHost *iface, UINT iTInfo, LCID lcid, static HRESULT WINAPI Host_GetIDsOfNames(IHost *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - WINE_TRACE("(%s %p %d %x %p)\n", wine_dbgstr_guid(riid), rgszNames, + WINE_TRACE("(%s %p %d %lx %p)\n", wine_dbgstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
return ITypeInfo_GetIDsOfNames(host_ti, rgszNames, cNames, rgDispId); @@ -146,7 +146,7 @@ static HRESULT WINAPI Host_Invoke(IHost *iface, DISPID dispIdMember, REFIID riid LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - WINE_TRACE("(%d %p %p)\n", dispIdMember, pDispParams, pVarResult); + WINE_TRACE("(%ld %p %p)\n", dispIdMember, pDispParams, pVarResult);
return ITypeInfo_Invoke(host_ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); @@ -278,7 +278,7 @@ static HRESULT WINAPI Host_get_Timeout(IHost *iface, LONG *out_Timeout)
static HRESULT WINAPI Host_put_Timeout(IHost *iface, LONG v) { - WINE_FIXME("(%d)\n", v); + WINE_FIXME("(%ld)\n", v); return E_NOTIMPL; }
@@ -396,7 +396,7 @@ static HRESULT WINAPI Host_DisconnectObject(IHost *iface, IDispatch *Object)
static HRESULT WINAPI Host_Sleep(IHost *iface, LONG Time) { - WINE_FIXME("(%d)\n", Time); + WINE_FIXME("(%ld)\n", Time); return E_NOTIMPL; }
diff --git a/programs/wscript/main.c b/programs/wscript/main.c index a7005a9289c..12571181491 100644 --- a/programs/wscript/main.c +++ b/programs/wscript/main.c @@ -81,7 +81,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppunkItem, ITypeInfo **ppti) { - WINE_TRACE("(%s %x %p %p)\n", wine_dbgstr_w(pstrName), dwReturnMask, ppunkItem, ppti); + WINE_TRACE("(%s %lx %p %p)\n", wine_dbgstr_w(pstrName), dwReturnMask, ppunkItem, ppti);
if(lstrcmpW(pstrName, L"WSH") && lstrcmpW(pstrName, L"WScript")) return E_FAIL; @@ -368,13 +368,13 @@ static void run_script(const WCHAR *filename, IActiveScript *script, IActiveScri SCRIPTTEXT_HOSTMANAGESSOURCE|SCRIPTITEM_ISVISIBLE, NULL, NULL); SysFreeString(text); if(FAILED(hres)) { - WINE_FIXME("ParseScriptText failed: %08x\n", hres); + WINE_FIXME("ParseScriptText failed: %08lx\n", hres); return; }
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED); if(FAILED(hres)) - WINE_FIXME("SetScriptState failed: %08x\n", hres); + WINE_FIXME("SetScriptState failed: %08lx\n", hres); }
static BOOL set_host_properties(const WCHAR *prop)
--- programs/dxdiag/Makefile.in | 1 - programs/dxdiag/information.c | 2 +- programs/dxdiag/output.c | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/programs/dxdiag/Makefile.in b/programs/dxdiag/Makefile.in index 9f2f0f19b14..2ea7a084d19 100644 --- a/programs/dxdiag/Makefile.in +++ b/programs/dxdiag/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = dxdiag.exe IMPORTS = dxguid ole32 oleaut32 user32 comctl32
diff --git a/programs/dxdiag/information.c b/programs/dxdiag/information.c index 74fe15f7aec..99c1a6715b2 100644 --- a/programs/dxdiag/information.c +++ b/programs/dxdiag/information.c @@ -190,7 +190,7 @@ struct dxdiag_information *collect_dxdiag_information(BOOL whql_check) &IID_IDxDiagProvider, (void **)&pddp); if (FAILED(hr)) { - WINE_ERR("IDxDiagProvider instance creation failed with 0x%08x\n", hr); + WINE_ERR("IDxDiagProvider instance creation failed with 0x%08lx\n", hr); goto error; }
diff --git a/programs/dxdiag/output.c b/programs/dxdiag/output.c index 95941785c1c..a8eb733ba4b 100644 --- a/programs/dxdiag/output.c +++ b/programs/dxdiag/output.c @@ -85,7 +85,7 @@ static BOOL output_text_field(HANDLE hFile, const char *field_name, DWORD field_
assert(total_len <= sizeof(output_buffer));
- sprintf(sprintf_fmt, "%%%us: ", field_width); + sprintf(sprintf_fmt, "%%%lus: ", field_width); ptr += sprintf(ptr, sprintf_fmt, field_name);
ptr += WideCharToMultiByte(CP_ACP, 0, value, value_lenW, ptr, value_lenA, NULL, NULL); @@ -153,7 +153,7 @@ static BOOL output_text_information(struct dxdiag_information *dxdiag_info, cons NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { - WINE_ERR("File creation failed, last error %u\n", GetLastError()); + WINE_ERR("File creation failed, last error %lu\n", GetLastError()); return FALSE; }
@@ -277,7 +277,7 @@ static BOOL output_xml_information(struct dxdiag_information *dxdiag_info, const &IID_IXMLDOMDocument, (void **)&xmldoc); if (FAILED(hr)) { - WINE_ERR("IXMLDOMDocument instance creation failed with 0x%08x\n", hr); + WINE_ERR("IXMLDOMDocument instance creation failed with 0x%08lx\n", hr); goto error; }
--- programs/eject/Makefile.in | 1 - programs/eject/eject.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/programs/eject/Makefile.in b/programs/eject/Makefile.in index 86704201c2b..76274f66d97 100644 --- a/programs/eject/Makefile.in +++ b/programs/eject/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = eject.exe
EXTRADLLFLAGS = -mconsole diff --git a/programs/eject/eject.c b/programs/eject/eject.c index e6416eacff7..718848bccdb 100644 --- a/programs/eject/eject.c +++ b/programs/eject/eject.c @@ -70,16 +70,16 @@ static BOOL eject_cd( WCHAR drive ) WINE_TRACE( "ejecting %c:\n", (char)drive );
if (!DeviceIoControl( handle, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &result, NULL )) - WINE_WARN( "FSCTL_DISMOUNT_VOLUME failed with err %d\n", GetLastError() ); + WINE_WARN( "FSCTL_DISMOUNT_VOLUME failed with err %ld\n", GetLastError() );
removal.PreventMediaRemoval = FALSE; if (!DeviceIoControl( handle, IOCTL_STORAGE_MEDIA_REMOVAL, &removal, sizeof(removal), NULL, 0, &result, NULL )) - WINE_WARN( "IOCTL_STORAGE_MEDIA_REMOVAL failed with err %d\n", GetLastError() ); + WINE_WARN( "IOCTL_STORAGE_MEDIA_REMOVAL failed with err %ld\n", GetLastError() );
if (!unmount_only) { if (!DeviceIoControl( handle, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &result, NULL )) - WINE_WARN( "IOCTL_STORAGE_EJECT_MEDIA failed with err %d\n", GetLastError() ); + WINE_WARN( "IOCTL_STORAGE_EJECT_MEDIA failed with err %ld\n", GetLastError() ); }
CloseHandle( handle );
--- programs/explorer/Makefile.in | 1 - programs/explorer/appbar.c | 2 +- programs/explorer/desktop.c | 52 +++++++++++++++++++++-------------------- programs/explorer/explorer.c | 4 ++- programs/explorer/systray.c | 2 +- 5 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/programs/explorer/Makefile.in b/programs/explorer/Makefile.in index 8d5cd94957f..5507d747bb1 100644 --- a/programs/explorer/Makefile.in +++ b/programs/explorer/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = explorer.exe IMPORTS = rpcrt4 user32 gdi32 advapi32 DELAYIMPORTS = comctl32 shell32 oleaut32 ole32 shlwapi diff --git a/programs/explorer/appbar.c b/programs/explorer/appbar.c index 01dda7ec835..443927e30f1 100644 --- a/programs/explorer/appbar.c +++ b/programs/explorer/appbar.c @@ -223,7 +223,7 @@ static UINT_PTR handle_appbarmessage(DWORD msg, struct appbar_data_msg *abd) case ABM_WINDOWPOSCHANGED: return TRUE; default: - WINE_FIXME("SHAppBarMessage(%x) unimplemented\n", msg); + WINE_FIXME("SHAppBarMessage(%lx) unimplemented\n", msg); return FALSE; } } diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 6d577dd0fd1..400cc1d560e 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -84,7 +84,7 @@ static HRESULT load_typelib(void) hres = LoadRegTypeLib(&LIBID_SHDocVw, 1, 0, LOCALE_SYSTEM_DEFAULT, &tl); if (FAILED(hres)) { - ERR("LoadRegTypeLib failed: %08x\n", hres); + ERR("LoadRegTypeLib failed: %08lx\n", hres); return hres; }
@@ -107,7 +107,7 @@ static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti); if (FAILED(hres)) { - ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres); + ERR("GetTypeInfoOfGuid(%s) failed: %08lx\n", debugstr_guid(tid_ids[tid]), hres); return hres; }
@@ -467,7 +467,7 @@ static BOOL process_changes( const WCHAR *folder, char *buf ) break;
default: - WARN( "unexpected action %u\n", info->Action ); + WARN( "unexpected action %lu\n", info->Action ); break; } if (!info->NextEntryOffset) break; @@ -623,7 +623,7 @@ static WNDPROC desktop_orig_wndproc; /* window procedure for the desktop window */ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp ) { - WINE_TRACE( "got msg %04x wp %lx lp %lx\n", message, wp, lp ); + WINE_TRACE( "got msg %04x wp %Ix lp %Ix\n", message, wp, lp );
switch(message) { @@ -852,7 +852,7 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid ) strcpy( error, "Make sure that your X server is running and that $DISPLAY is set correctly." ); break; default: - sprintf( error, "Unknown error (%u).", GetLastError() ); + sprintf( error, "Unknown error (%lu).", GetLastError() ); break; } name = next; @@ -897,7 +897,7 @@ static void initialize_display_settings(void) continue; }
- WINE_TRACE( "Device %s current display mode %ux%u %uBits %uHz at %d,%d.\n", + WINE_TRACE( "Device %s current display mode %lux%lu %luBits %luHz at %ld,%ld.\n", wine_dbgstr_w( ddW.DeviceName ), dmW.dmPelsWidth, dmW.dmPelsHeight, dmW.dmBitsPerPel, dmW.dmDisplayFrequency, dmW.u1.s2.dmPosition.x, dmW.u1.s2.dmPosition.y ); @@ -997,7 +997,7 @@ void manage_desktop( WCHAR *arg ) { if (!(desktop = CreateDesktopW( name, NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ))) { - WINE_ERR( "failed to create desktop %s error %d\n", wine_dbgstr_w(name), GetLastError() ); + WINE_ERR( "failed to create desktop %s error %ld\n", wine_dbgstr_w(name), GetLastError() ); ExitProcess( 1 ); } SetThreadDesktop( desktop ); @@ -1122,7 +1122,7 @@ static HRESULT WINAPI shellwindows_GetTypeInfoCount(IShellWindows *iface, UINT * static HRESULT WINAPI shellwindows_GetTypeInfo(IShellWindows *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { - TRACE("%d %d %p\n", iTInfo, lcid, ppTInfo); + TRACE("%d %ld %p\n", iTInfo, lcid, ppTInfo); return get_typeinfo(IShellWindows_tid, ppTInfo); }
@@ -1133,7 +1133,7 @@ static HRESULT WINAPI shellwindows_GetIDsOfNames(IShellWindows *iface, ITypeInfo *typeinfo; HRESULT hr;
- TRACE("%s %p %d %d %p\n", debugstr_guid(riid), rgszNames, cNames, + TRACE("%s %p %d %ld %p\n", debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
if (!rgszNames || cNames == 0 || !rgDispId) @@ -1157,7 +1157,7 @@ static HRESULT WINAPI shellwindows_Invoke(IShellWindows *iface, ITypeInfo *typeinfo; HRESULT hr;
- TRACE("%d %s %d %08x %p %p %p %p\n", dispIdMember, debugstr_guid(riid), + TRACE("%ld %s %ld %08x %p %p %p %p\n", dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IShellWindows_tid, &typeinfo); @@ -1196,7 +1196,7 @@ static HRESULT WINAPI shellwindows_Register(IShellWindows *iface, struct shellwindows *sw = impl_from_IShellWindows(iface); struct window *window;
- TRACE("iface %p, disp %p, hwnd %#x, class %u, cookie %p.\n", iface, disp, hwnd, class, cookie); + TRACE("iface %p, disp %p, hwnd %#lx, class %u, cookie %p.\n", iface, disp, hwnd, class, cookie);
if (!hwnd) return E_POINTER; @@ -1225,7 +1225,7 @@ static HRESULT WINAPI shellwindows_Register(IShellWindows *iface, static HRESULT WINAPI shellwindows_RegisterPending(IShellWindows *iface, LONG threadid, VARIANT *loc, VARIANT *root, int class, LONG *cookie) { - FIXME("0x%x %s %s 0x%x %p\n", threadid, debugstr_variant(loc), debugstr_variant(root), + FIXME("0x%lx %s %s 0x%x %p\n", threadid, debugstr_variant(loc), debugstr_variant(root), class, cookie); return E_NOTIMPL; } @@ -1235,7 +1235,7 @@ static HRESULT WINAPI shellwindows_Revoke(IShellWindows *iface, LONG cookie) struct shellwindows *sw = impl_from_IShellWindows(iface); unsigned int i;
- TRACE("iface %p, cookie %u.\n", iface, cookie); + TRACE("iface %p, cookie %lu.\n", iface, cookie);
EnterCriticalSection(&sw->cs);
@@ -1259,7 +1259,7 @@ static HRESULT WINAPI shellwindows_OnNavigate(IShellWindows *iface, LONG cookie, struct shellwindows *sw = impl_from_IShellWindows(iface); unsigned int i;
- TRACE("iface %p, cookie %u, location %s.\n", iface, cookie, debugstr_variant(location)); + TRACE("iface %p, cookie %lu, location %s.\n", iface, cookie, debugstr_variant(location));
if (V_VT(location) != (VT_ARRAY | VT_UI1)) { @@ -1292,7 +1292,7 @@ static HRESULT WINAPI shellwindows_OnNavigate(IShellWindows *iface, LONG cookie,
static HRESULT WINAPI shellwindows_OnActivated(IShellWindows *iface, LONG cookie, VARIANT_BOOL active) { - FIXME("0x%x 0x%x\n", cookie, active); + FIXME("0x%lx 0x%x\n", cookie, active); return E_NOTIMPL; }
@@ -1343,7 +1343,7 @@ static HRESULT WINAPI shellwindows_FindWindowSW(IShellWindows *iface, VARIANT *l
static HRESULT WINAPI shellwindows_OnCreated(IShellWindows *iface, LONG cookie, IUnknown *punk) { - FIXME("0x%x %p\n", cookie, punk); + FIXME("0x%lx %p\n", cookie, punk); return E_NOTIMPL; }
@@ -1497,7 +1497,7 @@ static HRESULT WINAPI webbrowser_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, L LPTYPEINFO *ppTInfo) { struct shellbrowserwindow *This = impl_from_IWebBrowser2(iface); - TRACE("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo); + TRACE("(%p)->(%d %ld %p)\n", This, iTInfo, lcid, ppTInfo); return get_typeinfo(IWebBrowser2_tid, ppTInfo); }
@@ -1509,7 +1509,7 @@ static HRESULT WINAPI webbrowser_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid, ITypeInfo *typeinfo; HRESULT hr;
- TRACE("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + TRACE("(%p)->(%s %p %d %ld %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId) @@ -1534,7 +1534,7 @@ static HRESULT WINAPI webbrowser_Invoke(IWebBrowser2 *iface, DISPID dispIdMember ITypeInfo *typeinfo; HRESULT hr;
- TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + TRACE("(%p)->(%ld %s %ld %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IWebBrowser2_tid, &typeinfo); @@ -1666,7 +1666,7 @@ static HRESULT WINAPI webbrowser_get_Left(IWebBrowser2 *iface, LONG *pl) static HRESULT WINAPI webbrowser_put_Left(IWebBrowser2 *iface, LONG Left) { struct shellbrowserwindow *This = impl_from_IWebBrowser2(iface); - FIXME("(%p)->(%d)\n", This, Left); + FIXME("(%p)->(%ld)\n", This, Left); return E_NOTIMPL; }
@@ -1680,7 +1680,7 @@ static HRESULT WINAPI webbrowser_get_Top(IWebBrowser2 *iface, LONG *pl) static HRESULT WINAPI webbrowser_put_Top(IWebBrowser2 *iface, LONG Top) { struct shellbrowserwindow *This = impl_from_IWebBrowser2(iface); - FIXME("(%p)->(%d)\n", This, Top); + FIXME("(%p)->(%ld)\n", This, Top); return E_NOTIMPL; }
@@ -1694,7 +1694,7 @@ static HRESULT WINAPI webbrowser_get_Width(IWebBrowser2 *iface, LONG *pl) static HRESULT WINAPI webbrowser_put_Width(IWebBrowser2 *iface, LONG Width) { struct shellbrowserwindow *This = impl_from_IWebBrowser2(iface); - FIXME("(%p)->(%d)\n", This, Width); + FIXME("(%p)->(%ld)\n", This, Width); return E_NOTIMPL; }
@@ -1708,7 +1708,7 @@ static HRESULT WINAPI webbrowser_get_Height(IWebBrowser2 *iface, LONG *pl) static HRESULT WINAPI webbrowser_put_Height(IWebBrowser2 *iface, LONG Height) { struct shellbrowserwindow *This = impl_from_IWebBrowser2(iface); - FIXME("(%p)->(%d)\n", This, Height); + FIXME("(%p)->(%ld)\n", This, Height); return E_NOTIMPL; }
@@ -2223,7 +2223,7 @@ static HRESULT WINAPI shellbrowser_BrowseObject(IShellBrowser *iface, LPCITEMIDL
static HRESULT WINAPI shellbrowser_GetViewStateStream(IShellBrowser *iface, DWORD mode, IStream **stream) { - FIXME("0x%x %p\n", mode, stream); + FIXME("0x%lx %p\n", mode, stream); return E_NOTIMPL; }
@@ -2236,7 +2236,7 @@ static HRESULT WINAPI shellbrowser_GetControlWindow(IShellBrowser *iface, UINT i static HRESULT WINAPI shellbrowser_SendControlMsg(IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret) { - FIXME("%d %d %lx %lx %p\n", id, uMsg, wParam, lParam, pret); + FIXME("%d %d %Ix %Ix %p\n", id, uMsg, wParam, lParam, pret); return E_NOTIMPL; }
@@ -2314,5 +2314,5 @@ static void shellwindows_init(void) &shellwindows_classfactory.classreg);
if (FAILED(hr)) - WARN("Failed to register ShellWindows object: %08x\n", hr); + WARN("Failed to register ShellWindows object: %08lx\n", hr); } diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index cb0d63fb688..8aab7fdc5f1 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -421,7 +421,7 @@ static void make_explorer_window(parameters_struct *params) V_VT(&empty_var) = VT_EMPTY; if (IShellWindows_FindWindowSW(sw, &var, &empty_var, SWC_EXPLORER, &hwnd, 0, &dispatch) == S_OK) { - TRACE("Found window %#x already browsing path %s.\n", hwnd, debugstr_w(path)); + TRACE("Found window %#lx already browsing path %s.\n", hwnd, debugstr_w(path)); SetForegroundWindow((HWND)(LONG_PTR)hwnd); IShellWindows_Release(sw); return; @@ -665,7 +665,7 @@ static LRESULT CALLBACK explorer_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, L = (explorer_info*)GetWindowLongPtrW(hwnd,EXPLORER_INFO_INDEX); IExplorerBrowser *browser = NULL;
- WINE_TRACE("(hwnd=%p,uMsg=%u,wParam=%lx,lParam=%lx)\n",hwnd,uMsg,wParam,lParam); + WINE_TRACE("(hwnd=%p,uMsg=%u,wParam=%Ix,lParam=%Ix)\n",hwnd,uMsg,wParam,lParam); if(info) browser = info->browser; switch(uMsg) diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 0c978451151..5b7216b2904 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -594,7 +594,7 @@ static BOOL handle_incoming(HWND hwndSource, COPYDATASTRUCT *cds) } break; default: - WINE_FIXME("unhandled tray message: %ld\n", cds->dwData); + WINE_FIXME("unhandled tray message: %Id\n", cds->dwData); break; }
--- programs/fsutil/Makefile.in | 1 - programs/fsutil/main.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/fsutil/Makefile.in b/programs/fsutil/Makefile.in index 676e9d593dd..df1c8ac6657 100644 --- a/programs/fsutil/Makefile.in +++ b/programs/fsutil/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = fsutil.exe IMPORTS = user32
diff --git a/programs/fsutil/main.c b/programs/fsutil/main.c index 46deda8a51d..94151ae9b42 100644 --- a/programs/fsutil/main.c +++ b/programs/fsutil/main.c @@ -59,7 +59,7 @@ static int WINAPIV output_string(int msg, ...) va_end(arguments);
if (len == 0 && GetLastError() != NO_ERROR) - WINE_FIXME("Could not format string: le=%u, msg=%d\n", GetLastError(), msg); + WINE_FIXME("Could not format string: le=%lu, msg=%d\n", GetLastError(), msg); else output_write(out, len);
--- programs/msiexec/Makefile.in | 1 - programs/msiexec/msiexec.c | 12 ++++++------ programs/msiexec/service.c | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/programs/msiexec/Makefile.in b/programs/msiexec/Makefile.in index 9aebdbdddf0..e873f7aeaa8 100644 --- a/programs/msiexec/Makefile.in +++ b/programs/msiexec/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = msiexec.exe IMPORTS = msi ole32 advapi32 user32 comctl32
diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c index e9e74f5c19e..71ecc0e590a 100644 --- a/programs/msiexec/msiexec.c +++ b/programs/msiexec/msiexec.c @@ -61,13 +61,13 @@ static void ShowUsage(int ExitCode) *filename = 0; res = GetModuleFileNameW(hmsi, filename, ARRAY_SIZE(filename)); if (!res) - WINE_ERR("GetModuleFileName failed: %d\n", GetLastError()); + WINE_ERR("GetModuleFileName failed: %ld\n", GetLastError());
len = ARRAY_SIZE(msiexec_version); *msiexec_version = 0; res = MsiGetFileVersionW(filename, msiexec_version, &len, NULL, NULL); if (res) - WINE_ERR("MsiGetFileVersion failed with %d\n", res); + WINE_ERR("MsiGetFileVersion failed with %ld\n", res);
/* Return the length of the resource. No typo: The LPWSTR parameter must be a LPWSTR * for this mode */ @@ -413,7 +413,7 @@ static int custom_action_server(const WCHAR *arg) pipe = CreateFileW(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (pipe == INVALID_HANDLE_VALUE) { - ERR("Failed to create custom action server pipe: %u\n", GetLastError()); + ERR("Failed to create custom action server pipe: %lu\n", GetLastError()); return GetLastError(); }
@@ -438,12 +438,12 @@ static int custom_action_server(const WCHAR *arg) thread64 = (DWORD_PTR)thread; if (!WriteFile(pipe, &thread64, sizeof(thread64), &size, NULL) || size != sizeof(thread64)) { - ERR("Failed to write to custom action server pipe: %u\n", GetLastError()); + ERR("Failed to write to custom action server pipe: %lu\n", GetLastError()); CoUninitialize(); return GetLastError(); } } - ERR("Failed to read from custom action server pipe: %u\n", GetLastError()); + ERR("Failed to read from custom action server pipe: %lu\n", GetLastError()); CoUninitialize(); return GetLastError(); } @@ -948,7 +948,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine LogFileName = argvW[i]; if(MsiEnableLogW(LogMode, LogFileName, LogAttributes) != ERROR_SUCCESS) { - fprintf(stderr, "Logging in %s (0x%08x, %u) failed\n", + fprintf(stderr, "Logging in %s (0x%08lx, %lu) failed\n", wine_dbgstr_w(LogFileName), LogMode, LogAttributes); ExitProcess(1); } diff --git a/programs/msiexec/service.c b/programs/msiexec/service.c index 735cd5c0fb0..573b3782473 100644 --- a/programs/msiexec/service.c +++ b/programs/msiexec/service.c @@ -83,7 +83,7 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
static void WINAPI ServiceCtrlHandler(DWORD code) { - WINE_TRACE("%d\n", code); + WINE_TRACE("%ld\n", code);
switch (code) { @@ -93,7 +93,7 @@ static void WINAPI ServiceCtrlHandler(DWORD code) KillService(); break; default: - fprintf(stderr, "Unhandled service control code: %d\n", code); + fprintf(stderr, "Unhandled service control code: %ld\n", code); UpdateSCMStatus(SERVICE_RUNNING, NO_ERROR, 0); break; }
--- programs/net/Makefile.in | 1 - programs/net/net.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/programs/net/Makefile.in b/programs/net/Makefile.in index a4c0f2f238a..eb8e1e48ff3 100644 --- a/programs/net/Makefile.in +++ b/programs/net/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = net.exe IMPORTS = netapi32 user32 advapi32
diff --git a/programs/net/net.c b/programs/net/net.c index a8073956019..f9e64d2e2b9 100644 --- a/programs/net/net.c +++ b/programs/net/net.c @@ -61,7 +61,7 @@ static int output_vprintf(const WCHAR* fmt, va_list va_args)
len = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt, 0, 0, str, ARRAY_SIZE(str), &va_args); if (len == 0 && GetLastError() != ERROR_NO_WORK_DONE) - WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(fmt)); + WINE_FIXME("Could not format string: le=%lu, fmt=%s\n", GetLastError(), wine_dbgstr_w(fmt)); else output_write(str, len); return 0; @@ -184,7 +184,7 @@ static BOOL net_enum_services(void) for(i = 0; i < count; i++) { output_printf(L" %1\n", services[i].lpDisplayName); - WINE_TRACE("service=%s state=%d controls=%x\n", + WINE_TRACE("service=%s state=%ld controls=%lx\n", wine_dbgstr_w(services[i].lpServiceName), services[i].ServiceStatusProcess.dwCurrentState, services[i].ServiceStatusProcess.dwControlsAccepted);
--- programs/netstat/Makefile.in | 1 - programs/netstat/netstat.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/netstat/Makefile.in b/programs/netstat/Makefile.in index 693fde0c1f4..e16d01ba4e9 100644 --- a/programs/netstat/Makefile.in +++ b/programs/netstat/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = netstat.exe IMPORTS = iphlpapi user32 ws2_32
diff --git a/programs/netstat/netstat.c b/programs/netstat/netstat.c index 243fca56055..16238ee097f 100644 --- a/programs/netstat/netstat.c +++ b/programs/netstat/netstat.c @@ -145,7 +145,7 @@ static WCHAR *NETSTAT_load_message(UINT id) { static const WCHAR failedW[] = {'F','a','i','l','e','d','!','\0'};
if (!LoadStringW(GetModuleHandleW(NULL), id, msg, ARRAY_SIZE(msg))) { - WINE_FIXME("LoadString failed with %d\n", GetLastError()); + WINE_FIXME("LoadString failed with %ld\n", GetLastError()); lstrcpyW(msg, failedW); } return msg;
--- programs/ping/Makefile.in | 1 - programs/ping/ping_main.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/ping/Makefile.in b/programs/ping/Makefile.in index 9ac4f6e4a3b..0ed66f470ea 100644 --- a/programs/ping/Makefile.in +++ b/programs/ping/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = ping.exe IMPORTS = ws2_32 iphlpapi
diff --git a/programs/ping/ping_main.c b/programs/ping/ping_main.c index 51246e3f5bf..cf91f051a39 100644 --- a/programs/ping/ping_main.c +++ b/programs/ping/ping_main.c @@ -184,7 +184,7 @@ int __cdecl main(int argc, char** argv) { reply = (ICMP_ECHO_REPLY *) reply_buffer; if (reply->RoundTripTime >= 1) - sprintf(rtt, "=%d", reply->RoundTripTime); + sprintf(rtt, "=%ld", reply->RoundTripTime); else strcpy(rtt, "<1"); printf("Reply from %s: bytes=%d time%sms TTL=%d\n", ip, l,