https://git.reactos.org/?p=reactos.git;a=commitdiff;h=efe25648a59d30b89141c…
commit efe25648a59d30b89141ced89ce119ba11fe7cf2
Author: Thamatip Chitpong <tangaming123456(a)outlook.com>
AuthorDate: Sun Aug 28 17:20:17 2022 +0700
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Aug 28 13:20:17 2022 +0300
[SYSDM] General page: Auto-update the system uptime (#4616)
- Also insert curly-brackets for switch-case in GeneralPageProc
- Use correct printf data type for the system uptime
Reviewed-by: Stanislav Motylkov <x86corez(a)gmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
---
dll/cpl/sysdm/general.c | 122 +++++++++++++++++++++++++++++---------------
dll/cpl/sysdm/lang/bg-BG.rc | 2 +-
dll/cpl/sysdm/lang/cs-CZ.rc | 2 +-
dll/cpl/sysdm/lang/da-DK.rc | 2 +-
dll/cpl/sysdm/lang/de-DE.rc | 2 +-
dll/cpl/sysdm/lang/el-GR.rc | 2 +-
dll/cpl/sysdm/lang/en-US.rc | 2 +-
dll/cpl/sysdm/lang/es-ES.rc | 2 +-
dll/cpl/sysdm/lang/fr-FR.rc | 2 +-
dll/cpl/sysdm/lang/he-IL.rc | 2 +-
dll/cpl/sysdm/lang/hu-HU.rc | 2 +-
dll/cpl/sysdm/lang/id-ID.rc | 2 +-
dll/cpl/sysdm/lang/it-IT.rc | 2 +-
dll/cpl/sysdm/lang/ja-JP.rc | 2 +-
dll/cpl/sysdm/lang/nl-NL.rc | 2 +-
dll/cpl/sysdm/lang/no-NO.rc | 2 +-
dll/cpl/sysdm/lang/pl-PL.rc | 2 +-
dll/cpl/sysdm/lang/pt-PT.rc | 2 +-
dll/cpl/sysdm/lang/ro-RO.rc | 2 +-
dll/cpl/sysdm/lang/ru-RU.rc | 2 +-
dll/cpl/sysdm/lang/sk-SK.rc | 2 +-
dll/cpl/sysdm/lang/sq-AL.rc | 2 +-
dll/cpl/sysdm/lang/sv-SE.rc | 2 +-
dll/cpl/sysdm/lang/tr-TR.rc | 2 +-
dll/cpl/sysdm/lang/uk-UA.rc | 2 +-
dll/cpl/sysdm/lang/zh-CN.rc | 2 +-
dll/cpl/sysdm/lang/zh-HK.rc | 2 +-
dll/cpl/sysdm/lang/zh-TW.rc | 2 +-
28 files changed, 109 insertions(+), 67 deletions(-)
diff --git a/dll/cpl/sysdm/general.c b/dll/cpl/sysdm/general.c
index e1b8284d321..e09b4a44b6d 100644
--- a/dll/cpl/sysdm/general.c
+++ b/dll/cpl/sysdm/general.c
@@ -18,6 +18,7 @@
#define ANIM_STEP 2
#define ANIM_TIME 50
+#define ID_SYSUPTIME_UPDATE_TIMER 1
typedef struct _IMGINFO
{
@@ -28,8 +29,13 @@ typedef struct _IMGINFO
INT iBits;
} IMGINFO, *PIMGINFO;
+typedef ULONGLONG (WINAPI *PFGETTICKCOUNT64)(VOID);
+
static PIMGINFO pImgInfo;
static const BLENDFUNCTION BlendFunc = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA};
+static HMODULE hKernel32Vista = NULL;
+static PFGETTICKCOUNT64 pGetTickCount64 = NULL;
+static WCHAR szUptimeFormat[64];
VOID ShowLastWin32Error(HWND hWndOwner)
{
@@ -598,73 +604,85 @@ static VOID GetSystemVersion(HWND hwnd)
HeapFree(GetProcessHeap(), 0, pwszStr);
}
-ULONGLONG GetSecondsQPC(VOID)
+/**
+ * @brief
+ * An equivalent of GetTickCount64, implemented using QueryPerformanceCounter.
+ *
+ * @return
+ * The number of milliseconds that have elapsed since the system was started.
+ */
+static ULONGLONG GetTickCountQPC(VOID)
{
LARGE_INTEGER Counter, Frequency;
QueryPerformanceCounter(&Counter);
QueryPerformanceFrequency(&Frequency);
- return Counter.QuadPart / Frequency.QuadPart;
+ return (Counter.QuadPart * 1000) / Frequency.QuadPart;
}
-ULONGLONG GetSeconds(VOID)
+static VOID GetSystemUptime(HWND hwndDlg)
{
- ULONGLONG (WINAPI * pGetTickCount64)(VOID);
- ULONGLONG Ticks64;
- HMODULE hModule = GetModuleHandleW(L"kernel32.dll");
-
- pGetTickCount64 = (PVOID)GetProcAddress(hModule, "GetTickCount64");
- if (pGetTickCount64)
- {
- return pGetTickCount64() / 1000;
- }
-
- hModule = LoadLibraryW(L"kernel32_vista.dll");
+ HWND hUptimeLabel;
+ ULONGLONG cMilliseconds;
+ ULONG cSeconds;
+ WCHAR szBuf[64];
- if (!hModule)
+ hUptimeLabel = GetDlgItem(hwndDlg, IDC_UPTIME);
+ if (!hUptimeLabel)
{
- return GetSecondsQPC();
+ return;
}
- pGetTickCount64 = (PVOID)GetProcAddress(hModule, "GetTickCount64");
-
if (pGetTickCount64)
{
- Ticks64 = pGetTickCount64() / 1000;
+ cMilliseconds = pGetTickCount64();
}
else
{
- Ticks64 = GetSecondsQPC();
+ cMilliseconds = GetTickCountQPC();
}
-
- FreeLibrary(hModule);
- return Ticks64;
+
+ cSeconds = cMilliseconds / 1000;
+ StringCchPrintfW(szBuf, _countof(szBuf), szUptimeFormat,
+ cSeconds / (60*60*24), // Days
+ (cSeconds / (60*60)) % 24, // Hours
+ (cSeconds / 60) % 60, // Minutes
+ cSeconds % 60); // Seconds
+
+ SetWindowTextW(hUptimeLabel, szBuf);
+
+ /* Set update timer (reset timeout if the timer exists) */
+ SetTimer(hwndDlg, ID_SYSUPTIME_UPDATE_TIMER, 1000 - (cMilliseconds % 1000), NULL);
}
-VOID GetSystemUptime(HWND hwnd)
+static VOID InitSystemUptime(HWND hwndDlg)
{
- HWND hRosUptime;
- WCHAR szBuf[64], szStr[64];
- ULONG cSeconds;
+ HMODULE hKernel32;
- hRosUptime = GetDlgItem(hwnd, IDC_UPTIME);
- if (!hRosUptime)
+ /* Load time format string */
+ if (LoadStringW(hApplet, IDS_UPTIME_FORMAT, szUptimeFormat, _countof(szUptimeFormat))
== 0)
{
return;
}
- if (!LoadStringW(hApplet, IDS_UPTIME_FORMAT, szStr, _countof(szStr)))
+
+ /* Load required DLLs */
+ hKernel32 = GetModuleHandleW(L"kernel32.dll");
+ if (hKernel32)
{
- return;
+ pGetTickCount64 = (PFGETTICKCOUNT64)GetProcAddress(hKernel32,
"GetTickCount64");
+ if (!pGetTickCount64)
+ {
+ hKernel32Vista = LoadLibraryW(L"kernel32_vista.dll");
+ if (hKernel32Vista)
+ {
+ pGetTickCount64 = (PFGETTICKCOUNT64)GetProcAddress(hKernel32Vista,
"GetTickCount64");
+ }
+ }
}
- cSeconds = GetSeconds();
- StringCchPrintfW(szBuf, _countof(szBuf), szStr,
- cSeconds / (60*60*24),
- (cSeconds / (60*60)) % 24,
- (cSeconds / 60) % 60,
- cSeconds % 60);
-
- SetWindowTextW(hRosUptime, szBuf);
+
+ /* Show system uptime and set update timer */
+ GetSystemUptime(hwndDlg);
}
/* Property page dialog callback */
@@ -676,6 +694,7 @@ INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM
wParam, LPARAM
switch (uMsg)
{
case WM_INITDIALOG:
+ {
pImgInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMGINFO));
if (pImgInfo == NULL)
{
@@ -687,14 +706,36 @@ INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM
wParam, LPARAM
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_ROSIMG), GWLP_WNDPROC,
(LONG_PTR)RosImageProc);
GetSystemInformation(hwndDlg);
GetSystemVersion(hwndDlg);
- GetSystemUptime(hwndDlg);
+ InitSystemUptime(hwndDlg);
break;
+ }
case WM_DESTROY:
+ {
+ KillTimer(hwndDlg, ID_SYSUPTIME_UPDATE_TIMER);
+
+ if (hKernel32Vista)
+ {
+ FreeLibrary(hKernel32Vista);
+ }
+
HeapFree(GetProcessHeap(), 0, pImgInfo);
break;
+ }
+
+ case WM_TIMER:
+ {
+ if (wParam == ID_SYSUPTIME_UPDATE_TIMER)
+ {
+ /* Update system uptime */
+ GetSystemUptime(hwndDlg);
+ }
+
+ break;
+ }
case WM_COMMAND:
+ {
if (LOWORD(wParam) == IDC_LICENCE)
{
DialogBox(hApplet, MAKEINTRESOURCE(IDD_LICENCE), hwndDlg,
LicenceDlgProc);
@@ -702,6 +743,7 @@ INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM
wParam, LPARAM
return TRUE;
}
break;
+ }
case WM_DRAWITEM:
{
diff --git a/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc
index 558982bff3d..4a262345e69 100644
--- a/dll/cpl/sysdm/lang/bg-BG.rc
+++ b/dll/cpl/sysdm/lang/bg-BG.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "ПБ памет"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Променлива"
IDS_VALUE "Стойност"
IDS_NO_DUMP "(Няма)"
diff --git a/dll/cpl/sysdm/lang/cs-CZ.rc b/dll/cpl/sysdm/lang/cs-CZ.rc
index 5d833748da6..fee0ea9c048 100644
--- a/dll/cpl/sysdm/lang/cs-CZ.rc
+++ b/dll/cpl/sysdm/lang/cs-CZ.rc
@@ -338,7 +338,7 @@ BEGIN
IDS_PETABYTE "PB RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Proměnná"
IDS_VALUE "Hodnota"
IDS_NO_DUMP "(Není)"
diff --git a/dll/cpl/sysdm/lang/da-DK.rc b/dll/cpl/sysdm/lang/da-DK.rc
index 418896de88b..84bea27b355 100644
--- a/dll/cpl/sysdm/lang/da-DK.rc
+++ b/dll/cpl/sysdm/lang/da-DK.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB of RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variable"
IDS_VALUE "Value"
IDS_NO_DUMP "(None)"
diff --git a/dll/cpl/sysdm/lang/de-DE.rc b/dll/cpl/sysdm/lang/de-DE.rc
index 16528627e51..94faf72da66 100644
--- a/dll/cpl/sysdm/lang/de-DE.rc
+++ b/dll/cpl/sysdm/lang/de-DE.rc
@@ -342,7 +342,7 @@ BEGIN
IDS_PETABYTE "PB RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Tage, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Tage, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variable"
IDS_VALUE "Wert"
IDS_NO_DUMP "(Keine)"
diff --git a/dll/cpl/sysdm/lang/el-GR.rc b/dll/cpl/sysdm/lang/el-GR.rc
index 612d28c8faa..d705729c8c4 100644
--- a/dll/cpl/sysdm/lang/el-GR.rc
+++ b/dll/cpl/sysdm/lang/el-GR.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB μνήμης RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Μεταβλητή"
IDS_VALUE "Τιμή"
IDS_NO_DUMP "(Κανένα)"
diff --git a/dll/cpl/sysdm/lang/en-US.rc b/dll/cpl/sysdm/lang/en-US.rc
index a93d10644e3..55fd0d38b59 100644
--- a/dll/cpl/sysdm/lang/en-US.rc
+++ b/dll/cpl/sysdm/lang/en-US.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB of RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variable"
IDS_VALUE "Value"
IDS_NO_DUMP "(None)"
diff --git a/dll/cpl/sysdm/lang/es-ES.rc b/dll/cpl/sysdm/lang/es-ES.rc
index d2ee506ef7a..0c84e31f48c 100644
--- a/dll/cpl/sysdm/lang/es-ES.rc
+++ b/dll/cpl/sysdm/lang/es-ES.rc
@@ -335,7 +335,7 @@ BEGIN
IDS_PETABYTE "PB de RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variable"
IDS_VALUE "Valor"
IDS_NO_DUMP "(Ninguno)"
diff --git a/dll/cpl/sysdm/lang/fr-FR.rc b/dll/cpl/sysdm/lang/fr-FR.rc
index dc3482478c7..e8a308a0044 100644
--- a/dll/cpl/sysdm/lang/fr-FR.rc
+++ b/dll/cpl/sysdm/lang/fr-FR.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "Po de RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u jours, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu jours, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variable"
IDS_VALUE "Valeur"
IDS_NO_DUMP "(Aucun)"
diff --git a/dll/cpl/sysdm/lang/he-IL.rc b/dll/cpl/sysdm/lang/he-IL.rc
index b23b4629aa2..7aa1b57250d 100644
--- a/dll/cpl/sysdm/lang/he-IL.rc
+++ b/dll/cpl/sysdm/lang/he-IL.rc
@@ -335,7 +335,7 @@ BEGIN
IDS_PETABYTE "PB זיכרון פיזי"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "משתנה"
IDS_VALUE "ערך"
IDS_NO_DUMP "(ללא)"
diff --git a/dll/cpl/sysdm/lang/hu-HU.rc b/dll/cpl/sysdm/lang/hu-HU.rc
index fb1516cf31f..f69277af7f3 100644
--- a/dll/cpl/sysdm/lang/hu-HU.rc
+++ b/dll/cpl/sysdm/lang/hu-HU.rc
@@ -335,7 +335,7 @@ BEGIN
IDS_PETABYTE "PB RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u nap, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu nap, %02lu:%02lu:%02lu"
IDS_VARIABLE "Változó"
IDS_VALUE "Érték"
IDS_NO_DUMP "(nincs)"
diff --git a/dll/cpl/sysdm/lang/id-ID.rc b/dll/cpl/sysdm/lang/id-ID.rc
index 893f9215422..62855c463b9 100644
--- a/dll/cpl/sysdm/lang/id-ID.rc
+++ b/dll/cpl/sysdm/lang/id-ID.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Hari, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Hari, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variabel"
IDS_VALUE "Nilai"
IDS_NO_DUMP "(Tidak ada)"
diff --git a/dll/cpl/sysdm/lang/it-IT.rc b/dll/cpl/sysdm/lang/it-IT.rc
index ae0905d9c76..7fb6788f968 100644
--- a/dll/cpl/sysdm/lang/it-IT.rc
+++ b/dll/cpl/sysdm/lang/it-IT.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB di RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Giorno, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Giorno, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variabile"
IDS_VALUE "Valore"
IDS_NO_DUMP "(None)"
diff --git a/dll/cpl/sysdm/lang/ja-JP.rc b/dll/cpl/sysdm/lang/ja-JP.rc
index 35b92143abb..3400bfd46a9 100644
--- a/dll/cpl/sysdm/lang/ja-JP.rc
+++ b/dll/cpl/sysdm/lang/ja-JP.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "可変"
IDS_VALUE "値"
IDS_NO_DUMP "(なし)"
diff --git a/dll/cpl/sysdm/lang/nl-NL.rc b/dll/cpl/sysdm/lang/nl-NL.rc
index 7cf279ef079..8ae90af4081 100644
--- a/dll/cpl/sysdm/lang/nl-NL.rc
+++ b/dll/cpl/sysdm/lang/nl-NL.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB of RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variable"
IDS_VALUE "Value"
IDS_NO_DUMP "(None)"
diff --git a/dll/cpl/sysdm/lang/no-NO.rc b/dll/cpl/sysdm/lang/no-NO.rc
index 3850664b13b..586db5ad4d7 100644
--- a/dll/cpl/sysdm/lang/no-NO.rc
+++ b/dll/cpl/sysdm/lang/no-NO.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB Systemminne"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variabel"
IDS_VALUE "Verdi"
IDS_NO_DUMP "(Ingen)"
diff --git a/dll/cpl/sysdm/lang/pl-PL.rc b/dll/cpl/sysdm/lang/pl-PL.rc
index bef7fb5ec40..0a2e968336e 100644
--- a/dll/cpl/sysdm/lang/pl-PL.rc
+++ b/dll/cpl/sysdm/lang/pl-PL.rc
@@ -342,7 +342,7 @@ BEGIN
IDS_PETABYTE "PB RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u dni, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu dni, %02lu:%02lu:%02lu"
IDS_VARIABLE "Zmienna"
IDS_VALUE "Wartość"
IDS_NO_DUMP "(Brak)"
diff --git a/dll/cpl/sysdm/lang/pt-PT.rc b/dll/cpl/sysdm/lang/pt-PT.rc
index 6ec4cd443f4..30ff57ff9ea 100644
--- a/dll/cpl/sysdm/lang/pt-PT.rc
+++ b/dll/cpl/sysdm/lang/pt-PT.rc
@@ -337,7 +337,7 @@ BEGIN
IDS_PETABYTE "PB de RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Dias, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Dias, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variável"
IDS_VALUE "Valor"
IDS_NO_DUMP "(Nenhum)"
diff --git a/dll/cpl/sysdm/lang/ro-RO.rc b/dll/cpl/sysdm/lang/ro-RO.rc
index 4047aa40ee9..d9ae4bef0db 100644
--- a/dll/cpl/sysdm/lang/ro-RO.rc
+++ b/dll/cpl/sysdm/lang/ro-RO.rc
@@ -342,7 +342,7 @@ BEGIN
IDS_PETABYTE "Po de memorie"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u zile, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu zile, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variabilă"
IDS_VALUE "Valoare"
IDS_NO_DUMP "(Fără fișier de depanare)"
diff --git a/dll/cpl/sysdm/lang/ru-RU.rc b/dll/cpl/sysdm/lang/ru-RU.rc
index 6477c525a8b..522e7e4a21a 100644
--- a/dll/cpl/sysdm/lang/ru-RU.rc
+++ b/dll/cpl/sysdm/lang/ru-RU.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "Пб ОЗУ"
IDS_MEGAHERTZ "МГц"
IDS_GIGAHERTZ "ГГц"
- IDS_UPTIME_FORMAT "%u дней, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu дней, %02lu:%02lu:%02lu"
IDS_VARIABLE "Переменная"
IDS_VALUE "Значение"
IDS_NO_DUMP "(Нет)"
diff --git a/dll/cpl/sysdm/lang/sk-SK.rc b/dll/cpl/sysdm/lang/sk-SK.rc
index a0d14702b4d..d52cca7a45e 100644
--- a/dll/cpl/sysdm/lang/sk-SK.rc
+++ b/dll/cpl/sysdm/lang/sk-SK.rc
@@ -341,7 +341,7 @@ BEGIN
IDS_PETABYTE "PB pamäte RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Premenná"
IDS_VALUE "Hodnota"
IDS_NO_DUMP "(Žiadne)"
diff --git a/dll/cpl/sysdm/lang/sq-AL.rc b/dll/cpl/sysdm/lang/sq-AL.rc
index 9126bda3707..ab35f18cef2 100644
--- a/dll/cpl/sysdm/lang/sq-AL.rc
+++ b/dll/cpl/sysdm/lang/sq-AL.rc
@@ -333,7 +333,7 @@ BEGIN
IDS_PETABYTE "PB e RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variablë"
IDS_VALUE "Vlera"
IDS_NO_DUMP "(Asnjë)"
diff --git a/dll/cpl/sysdm/lang/sv-SE.rc b/dll/cpl/sysdm/lang/sv-SE.rc
index 15742e83844..b0434a7785e 100644
--- a/dll/cpl/sysdm/lang/sv-SE.rc
+++ b/dll/cpl/sysdm/lang/sv-SE.rc
@@ -335,7 +335,7 @@ BEGIN
IDS_PETABYTE "PB RAM"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Variabel"
IDS_VALUE "Värde"
IDS_NO_DUMP "(None)"
diff --git a/dll/cpl/sysdm/lang/tr-TR.rc b/dll/cpl/sysdm/lang/tr-TR.rc
index e6869383553..a76d4e4d9d9 100644
--- a/dll/cpl/sysdm/lang/tr-TR.rc
+++ b/dll/cpl/sysdm/lang/tr-TR.rc
@@ -335,7 +335,7 @@ BEGIN
IDS_PETABYTE "PB Bellek"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u Gün, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Gün, %02lu:%02lu:%02lu"
IDS_VARIABLE "Değişken"
IDS_VALUE "Değer"
IDS_NO_DUMP "(Yok)"
diff --git a/dll/cpl/sysdm/lang/uk-UA.rc b/dll/cpl/sysdm/lang/uk-UA.rc
index fce6619efea..f184fc359bc 100644
--- a/dll/cpl/sysdm/lang/uk-UA.rc
+++ b/dll/cpl/sysdm/lang/uk-UA.rc
@@ -341,7 +341,7 @@ BEGIN
IDS_PETABYTE "Пб ОЗП"
IDS_MEGAHERTZ "МГц"
IDS_GIGAHERTZ "ГГц"
- IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu"
IDS_VARIABLE "Змінна"
IDS_VALUE "Значення"
IDS_NO_DUMP "(Немає)"
diff --git a/dll/cpl/sysdm/lang/zh-CN.rc b/dll/cpl/sysdm/lang/zh-CN.rc
index 34d97e6ba67..99ac61bac35 100644
--- a/dll/cpl/sysdm/lang/zh-CN.rc
+++ b/dll/cpl/sysdm/lang/zh-CN.rc
@@ -342,7 +342,7 @@ BEGIN
IDS_PETABYTE "PB 内存"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u 天,%02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu 天,%02lu:%02lu:%02lu"
IDS_VARIABLE "变量"
IDS_VALUE "值"
IDS_NO_DUMP "(无)"
diff --git a/dll/cpl/sysdm/lang/zh-HK.rc b/dll/cpl/sysdm/lang/zh-HK.rc
index 70463f98957..6c10f7098ac 100644
--- a/dll/cpl/sysdm/lang/zh-HK.rc
+++ b/dll/cpl/sysdm/lang/zh-HK.rc
@@ -341,7 +341,7 @@ BEGIN
IDS_PETABYTE "PB 記憶體"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u 日, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu 日, %02lu:%02lu:%02lu"
IDS_VARIABLE "變量"
IDS_VALUE "值"
IDS_NO_DUMP "(無)"
diff --git a/dll/cpl/sysdm/lang/zh-TW.rc b/dll/cpl/sysdm/lang/zh-TW.rc
index 6fb147503ce..7332b1d3cd2 100644
--- a/dll/cpl/sysdm/lang/zh-TW.rc
+++ b/dll/cpl/sysdm/lang/zh-TW.rc
@@ -342,7 +342,7 @@ BEGIN
IDS_PETABYTE "PB 記憶體"
IDS_MEGAHERTZ "MHz"
IDS_GIGAHERTZ "GHz"
- IDS_UPTIME_FORMAT "%u 天, %02u:%02u:%02u"
+ IDS_UPTIME_FORMAT "%lu 天, %02lu:%02lu:%02lu"
IDS_VARIABLE "變量"
IDS_VALUE "值"
IDS_NO_DUMP "(無)"