winecfg: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-07 08:40:37 +01:00 committed by Alexandre Julliard
parent 5686741fce
commit 27aacaa73e
7 changed files with 22 additions and 23 deletions

View File

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winecfg.exe
IMPORTS = uuid comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32

View File

@ -412,7 +412,7 @@ static void apply_speaker_configs(void)
CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)&devenum);
if(FAILED(hr)){
ERR("Unable to create MMDeviceEnumerator: 0x%08x\n", hr);
ERR("Unable to create MMDeviceEnumerator: 0x%08lx\n", hr);
return;
}
@ -423,14 +423,14 @@ static void apply_speaker_configs(void)
hr = IMMDeviceEnumerator_GetDevice(devenum, render_devs[i].id, &dev);
if(FAILED(hr)){
WARN("Could not get MMDevice for %s: 0x%08x\n", wine_dbgstr_w(render_devs[i].id), hr);
WARN("Could not get MMDevice for %s: 0x%08lx\n", wine_dbgstr_w(render_devs[i].id), hr);
continue;
}
hr = IMMDevice_OpenPropertyStore(dev, STGM_WRITE, &ps);
if(FAILED(hr)){
WARN("Could not open property store for %s: 0x%08x\n", wine_dbgstr_w(render_devs[i].id), hr);
WARN("Could not open property store for %s: 0x%08lx\n", wine_dbgstr_w(render_devs[i].id), hr);
IMMDevice_Release(dev);
continue;
}
@ -440,7 +440,7 @@ static void apply_speaker_configs(void)
hr = IPropertyStore_SetValue(ps, &PKEY_AudioEndpoint_PhysicalSpeakers, &pv);
if (FAILED(hr))
WARN("IPropertyStore_SetValue failed for %s: 0x%08x\n", wine_dbgstr_w(render_devs[i].id), hr);
WARN("IPropertyStore_SetValue failed for %s: 0x%08lx\n", wine_dbgstr_w(render_devs[i].id), hr);
IPropertyStore_Release(ps);
IMMDevice_Release(dev);

View File

@ -85,7 +85,7 @@ ULONG drive_available_mask(char letter)
result = ~result;
if (letter) result |= DRIVE_MASK_BIT(letter);
WINE_TRACE("finished drive letter loop with %x\n", result);
WINE_TRACE("finished drive letter loop with %lx\n", result);
return result;
}
@ -97,7 +97,7 @@ BOOL add_drive(char letter, const char *targetpath, const char *device, const WC
if(drives[driveIndex].in_use)
return FALSE;
WINE_TRACE("letter == '%c', unixpath == %s, device == %s, label == %s, serial == %08x, type == %d\n",
WINE_TRACE("letter == '%c', unixpath == %s, device == %s, label == %s, serial == %08lx, type == %ld\n",
letter, wine_dbgstr_a(targetpath), wine_dbgstr_a(device),
wine_dbgstr_w(label), serial, type);
@ -183,7 +183,7 @@ static void set_drive_serial( WCHAR letter, DWORD serial )
HANDLE hFile;
filename[0] = letter;
WINE_TRACE("Putting serial number of %08X into file %s\n", serial, wine_dbgstr_w(filename));
WINE_TRACE("Putting serial number of %08lX into file %s\n", serial, wine_dbgstr_w(filename));
hFile = CreateFileW(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile != INVALID_HANDLE_VALUE)
@ -191,7 +191,7 @@ static void set_drive_serial( WCHAR letter, DWORD serial )
DWORD w;
char buffer[16];
sprintf( buffer, "%X\n", serial );
sprintf( buffer, "%lX\n", serial );
WriteFile(hFile, buffer, strlen(buffer), &w, NULL);
CloseHandle(hFile);
}
@ -204,7 +204,7 @@ static HANDLE open_mountmgr(void)
if ((ret = CreateFileW( MOUNTMGR_DOS_DEVICE_NAME, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
0, 0 )) == INVALID_HANDLE_VALUE)
WINE_ERR( "failed to open mount manager err %u\n", GetLastError() );
WINE_ERR( "failed to open mount manager err %lu\n", GetLastError() );
return ret;
}
@ -315,10 +315,10 @@ void apply_drive_changes(void)
{
set_drive_label( drives[i].letter, drives[i].label );
if (drives[i].in_use) set_drive_serial( drives[i].letter, drives[i].serial );
WINE_TRACE( "set drive %c: to %s type %u\n", 'a' + i,
WINE_TRACE( "set drive %c: to %s type %lu\n", 'a' + i,
wine_dbgstr_a(drives[i].unixpath), drives[i].type );
}
else WINE_WARN( "failed to set drive %c: to %s type %u err %u\n", 'a' + i,
else WINE_WARN( "failed to set drive %c: to %s type %lu err %lu\n", 'a' + i,
wine_dbgstr_a(drives[i].unixpath), drives[i].type, GetLastError() );
HeapFree( GetProcessHeap(), 0, ioctl );
}

View File

@ -463,7 +463,7 @@ static void update_controls(HWND dialog)
set_textW(dialog, IDC_EDIT_LABEL, current_drive->label ? current_drive->label : emptyW);
/* set serial edit text */
sprintf( serial, "%X", current_drive->serial );
sprintf( serial, "%lX", current_drive->serial );
set_text(dialog, IDC_EDIT_SERIAL, serial);
set_text(dialog, IDC_EDIT_DEVICE, current_drive->device);
@ -542,7 +542,7 @@ static void on_edit_changed(HWND dialog, WORD id)
HeapFree(GetProcessHeap(), 0, serial);
current_drive->modified = TRUE;
WINE_TRACE("set serial to %08X\n", current_drive->serial);
WINE_TRACE("set serial to %08lX\n", current_drive->serial);
/* enable the apply button */
SendMessageW(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);

View File

@ -247,7 +247,7 @@ wWinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPWSTR cmdline, int nShow)
GetExitCodeProcess( pi.hProcess, &exit_code );
ExitProcess( exit_code );
}
else WINE_ERR( "failed to restart 64-bit %s, err %d\n", wine_dbgstr_w(filename), GetLastError() );
else WINE_ERR( "failed to restart 64-bit %s, err %ld\n", wine_dbgstr_w(filename), GetLastError() );
Wow64RevertWow64FsRedirection( redir );
}

View File

@ -120,7 +120,7 @@ static WCHAR *get_config_key (HKEY root, const WCHAR *subkey, const WCHAR *name,
}
else
{
WINE_ERR("RegOpenKey failed on wine config key (res=%d)\n", res);
WINE_ERR("RegOpenKey failed on wine config key (res=%ld)\n", res);
}
goto end;
}
@ -133,7 +133,7 @@ static WCHAR *get_config_key (HKEY root, const WCHAR *subkey, const WCHAR *name,
goto end;
} else if (res != ERROR_SUCCESS)
{
WINE_ERR("Couldn't query value's length (res=%d)\n", res);
WINE_ERR("Couldn't query value's length (res=%ld)\n", res);
goto end;
}
@ -164,7 +164,7 @@ static int set_config_key(HKEY root, const WCHAR *subkey, REGSAM access, const W
DWORD res = 1;
HKEY key = NULL;
WINE_TRACE("subkey=%s: name=%s, value=%p, type=%d\n", wine_dbgstr_w(subkey),
WINE_TRACE("subkey=%s: name=%s, value=%p, type=%ld\n", wine_dbgstr_w(subkey),
wine_dbgstr_w(name), value, type);
assert( subkey != NULL );
@ -189,7 +189,7 @@ static int set_config_key(HKEY root, const WCHAR *subkey, REGSAM access, const W
end:
if (key && key != root) RegCloseKey(key);
if (res != 0)
WINE_ERR("Unable to set configuration key %s in section %s, res=%d\n",
WINE_ERR("Unable to set configuration key %s in section %s, res=%ld\n",
wine_dbgstr_w(name), wine_dbgstr_w(subkey), res);
return res;
}
@ -430,13 +430,13 @@ WCHAR **enumerate_values(HKEY root, const WCHAR *path)
else values = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR*));
values[valueslen++] = strdupW(name);
WINE_TRACE("valueslen is now %d\n", valueslen);
WINE_TRACE("valueslen is now %ld\n", valueslen);
i++;
}
}
else
{
WINE_WARN("failed opening registry key %s, res=0x%x\n",
WINE_WARN("failed opening registry key %s, res=0x%lx\n",
wine_dbgstr_w(path), res);
}
@ -610,7 +610,7 @@ BOOL initialize(HINSTANCE hInstance)
DWORD res = RegCreateKeyW(HKEY_CURRENT_USER, WINE_KEY_ROOT, &config_key);
if (res != ERROR_SUCCESS) {
WINE_ERR("RegOpenKey failed on wine config key (%d)\n", res);
WINE_ERR("RegOpenKey failed on wine config key (%ld)\n", res);
return TRUE;
}

View File

@ -245,7 +245,7 @@ static void init_dpi_editbox(HWND hDlg)
updating_ui = TRUE;
dwLogpixels = read_logpixels_reg();
WINE_TRACE("%u\n", dwLogpixels);
WINE_TRACE("%lu\n", dwLogpixels);
SetDlgItemInt(hDlg, IDC_RES_DPIEDIT, dwLogpixels, FALSE);