[ros-diffs] [reactos] 01/01: [SDK][ATL] Fix CWindow::GetWindowText method of BSTR (#3498)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e24d3cc952a4fef29151da15466023f2341c4d2a commit e24d3cc952a4fef29151da15466023f2341c4d2a Author: Katayama Hirofumi MZ AuthorDate: Tue Mar 2 17:50:00 2021 +0900 Commit: GitHub CommitDate: Tue Mar 2 17:50:00 2021 +0900 [SDK][ATL] Fix CWindow::GetWindowText method of BSTR (#3498) - Fix generic text mapping for GetWindowText and GetWindowTextLength functions. - Fix the position. - Fix the length. - Fail elegantly if necessary. CORE-9281 --- sdk/lib/atl/atlwin.h | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h index d8994988d40..2df36b612ee 100644 --- a/sdk/lib/atl/atlwin.h +++ b/sdk/lib/atl/atlwin.h @@ -782,11 +782,14 @@ public: BOOL GetWindowText(BSTR& bstrText) { ATLASSERT(::IsWindow(m_hWnd)); -int length = ::GetWindowTextLength(m_hWnd); -if (!SysReAllocStringLen(&bstrText, NULL, length)) +INT length = ::GetWindowTextLengthW(m_hWnd); +if (!::SysReAllocStringLen(&bstrText, NULL, length)) return FALSE; -::GetWindowText(m_hWnd, (LPTSTR)&bstrText[2], length); -return TRUE; +if (::GetWindowTextW(m_hWnd, bstrText, length + 1)) +return TRUE; +::SysFreeString(bstrText); +bstrText = NULL; +return FALSE; } int GetWindowTextLength() const
[ros-diffs] [reactos] 01/01: [BROWSEUI_APITEST] Strengthen IAutoComplete testcase on extended LV style (#3499)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a0e5c3d862ab07d6ee8c2464caf3354c4acca960 commit a0e5c3d862ab07d6ee8c2464caf3354c4acca960 Author: Katayama Hirofumi MZ AuthorDate: Tue Mar 2 18:05:32 2021 +0900 Commit: GitHub CommitDate: Tue Mar 2 18:05:32 2021 +0900 [BROWSEUI_APITEST] Strengthen IAutoComplete testcase on extended LV style (#3499) Test the extended list-view style of the listview. CORE-9281 --- modules/rostests/apitests/browseui/IAutoComplete.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/modules/rostests/apitests/browseui/IAutoComplete.cpp b/modules/rostests/apitests/browseui/IAutoComplete.cpp index 1bed8ad5369..88e74ccdc37 100644 --- a/modules/rostests/apitests/browseui/IAutoComplete.cpp +++ b/modules/rostests/apitests/browseui/IAutoComplete.cpp @@ -453,6 +453,16 @@ DoTestCaseA(INT x, INT y, INT cx, INT cy, LPCWSTR pszInput, ok(style == LIST_STYLE_2, "style was 0x%08lx\n", style); ok_long(exstyle, 0); ok_long((LONG)id, 0); +#define LIST_EXTENDED_LV_STYLE_1 \ +(LVS_EX_DOUBLEBUFFER | LVS_EX_ONECLICKACTIVATE | \ + LVS_EX_FULLROWSELECT | LVS_EX_TRACKSELECT) // 0x10068 +#define LIST_EXTENDED_LV_STYLE_2 \ +(LVS_EX_ONECLICKACTIVATE | LVS_EX_FULLROWSELECT | \ + LVS_EX_TRACKSELECT) // 0x68 +exstyle = ListView_GetExtendedListViewStyle(hwndList); +ok(exstyle == LIST_EXTENDED_LV_STYLE_1 /* Win10 */ || + exstyle == LIST_EXTENDED_LV_STYLE_2 /* WinXP/Win2k3 */, + "exstyle was 0x%08lx\n", exstyle); // no more controls hwndNone = GetNextWindow(hwndList, GW_HWNDNEXT);
[ros-diffs] [reactos] 01/03: [SDK] Properly put assembly debug info into .debug_frame section
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7fb6030e0568e952f32a724e490a0dbad4b0e8f6 commit 7fb6030e0568e952f32a724e490a0dbad4b0e8f6 Author: Jérôme Gardou AuthorDate: Tue Mar 2 12:58:21 2021 +0100 Commit: Jérôme Gardou CommitDate: Tue Mar 2 14:36:38 2021 +0100 [SDK] Properly put assembly debug info into .debug_frame section For some reason, the default is to put it into .eh_frame where objcopy & al happily ignore them --- sdk/include/asm/asm.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/include/asm/asm.inc b/sdk/include/asm/asm.inc index b3b265ef4f3..d13b06e8ead 100644 --- a/sdk/include/asm/asm.inc +++ b/sdk/include/asm/asm.inc @@ -235,6 +235,9 @@ ENDM /* Force intel syntax */ .intel_syntax noprefix +/* Put dwarf debug info in the .dwarf_debug section, which will be properly stripped */ +.cfi_sections .debug_frame + .altmacro /* Explicit radix in GAS syntax */
[ros-diffs] [reactos] 02/03: [SDK:INCLUDE] Define KTRAP_FRAME_CS
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c100a13c2939e87521314bb6bf5858b9a18aa6b commit 6c100a13c2939e87521314bb6bf5858b9a18aa6b Author: Jérôme Gardou AuthorDate: Tue Mar 2 13:01:50 2021 +0100 Commit: Jérôme Gardou CommitDate: Tue Mar 2 14:36:46 2021 +0100 [SDK:INCLUDE] Define KTRAP_FRAME_CS --- sdk/include/asm/ks386.template.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/include/asm/ks386.template.h b/sdk/include/asm/ks386.template.h index f7dba6c3460..cf581712b17 100644 --- a/sdk/include/asm/ks386.template.h +++ b/sdk/include/asm/ks386.template.h @@ -627,6 +627,7 @@ OFFSET(KTRAP_FRAME_EBX, KTRAP_FRAME, Ebx), OFFSET(KTRAP_FRAME_EBP, KTRAP_FRAME, Ebp), OFFSET(KTRAP_FRAME_ERROR_CODE, KTRAP_FRAME, ErrCode), OFFSET(KTRAP_FRAME_EIP, KTRAP_FRAME, Eip), +OFFSET(KTRAP_FRAME_CS, KTRAP_FRAME, SegCs), OFFSET(KTRAP_FRAME_EFLAGS, KTRAP_FRAME, EFlags), OFFSET(KTRAP_FRAME_ESP, KTRAP_FRAME, HardwareEsp), OFFSET(KTRAP_FRAME_SS, KTRAP_FRAME, HardwareSegSs),
[ros-diffs] [reactos] 03/03: [NTOS:KE] Generate proper frame info for trap handler in GCC builds
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4e4c475658977e7ef923262fe4b5bb2b56ab commit 4e4c475658977e7ef923262fe4b5bb2b56ab Author: Jérôme Gardou AuthorDate: Tue Mar 2 13:03:37 2021 +0100 Commit: Jérôme Gardou CommitDate: Tue Mar 2 14:37:39 2021 +0100 [NTOS:KE] Generate proper frame info for trap handler in GCC builds CORE-8531 --- ntoskrnl/include/internal/i386/asmmacro.S | 23 +++ ntoskrnl/ke/i386/trap.s | 2 ++ 2 files changed, 25 insertions(+) diff --git a/ntoskrnl/include/internal/i386/asmmacro.S b/ntoskrnl/include/internal/i386/asmmacro.S index 543ce3f1bc4..4a3dd56d623 100644 --- a/ntoskrnl/include/internal/i386/asmmacro.S +++ b/ntoskrnl/include/internal/i386/asmmacro.S @@ -217,6 +217,29 @@ set_sane_segs: mov [esp + KTRAP_FRAME_DEBUGEIP], eax mov [esp + KTRAP_FRAME_DEBUGEBP], ebp mov ebp, esp + +/* Tell GDB what just happened */ +CFI_DEF_CFA_REGISTER ebp +CFI_ADJUST_CFA_OFFSET FrameSize +CFI_REL_OFFSET ss, KTRAP_FRAME_SS +CFI_REL_OFFSET gs, KTRAP_FRAME_GS +CFI_REL_OFFSET fs, KTRAP_FRAME_FS +CFI_REL_OFFSET es, KTRAP_FRAME_ES +CFI_REL_OFFSET ds, KTRAP_FRAME_DS +CFI_REL_OFFSET cs, KTRAP_FRAME_CS + +CFI_REL_OFFSET edi, KTRAP_FRAME_EDI +CFI_REL_OFFSET esi, KTRAP_FRAME_ESI +CFI_REL_OFFSET ebx, KTRAP_FRAME_EBX +CFI_REL_OFFSET ebp, KTRAP_FRAME_EBP +CFI_REL_OFFSET eip, KTRAP_FRAME_EIP +CFI_REL_OFFSET esp, KTRAP_FRAME_ESP + +if (NOT (Flags AND KI_NONVOLATILES_ONLY)) +CFI_REL_OFFSET eax, KTRAP_FRAME_EAX +CFI_REL_OFFSET ecx, KTRAP_FRAME_ECX +CFI_REL_OFFSET edx, KTRAP_FRAME_EDX +endif #endif /* Set parameter 1 (ECX) to point to the frame */ diff --git a/ntoskrnl/ke/i386/trap.s b/ntoskrnl/ke/i386/trap.s index 2f8070725d5..c4b2e168c54 100644 --- a/ntoskrnl/ke/i386/trap.s +++ b/ntoskrnl/ke/i386/trap.s @@ -125,6 +125,7 @@ ALIGN 4 EXTERN @KiInterruptTemplateHandler@8:PROC PUBLIC _KiInterruptTemplate _KiInterruptTemplate: +CFI_STARTPROC KiEnterTrap KI_PUSH_FAKE_ERROR_CODE PUBLIC _KiInterruptTemplate2ndDispatch _KiInterruptTemplate2ndDispatch: @@ -135,6 +136,7 @@ _KiInterruptTemplateObject: jmp eax PUBLIC _KiInterruptTemplateDispatch _KiInterruptTemplateDispatch: +CFI_ENDPROC EXTERN @KiSystemServiceHandler@8:PROC PUBLIC _KiSystemService
[ros-diffs] [reactos] 01/01: [WS2_32] Fix error handling on non-existing registry keys
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7320c989fe71a0e44db8cfcdae245e123f156426 commit 7320c989fe71a0e44db8cfcdae245e123f156426 Author: Jérôme Gardou AuthorDate: Tue Mar 2 14:38:36 2021 +0100 Commit: Jérôme Gardou CommitDate: Tue Mar 2 14:39:22 2021 +0100 [WS2_32] Fix error handling on non-existing registry keys --- dll/win32/ws2_32/src/dcatalog.c | 11 +++ dll/win32/ws2_32/src/nscatalo.c | 11 +++ 2 files changed, 22 insertions(+) diff --git a/dll/win32/ws2_32/src/dcatalog.c b/dll/win32/ws2_32/src/dcatalog.c index d91ec564349..c53e6c4faec 100644 --- a/dll/win32/ws2_32/src/dcatalog.c +++ b/dll/win32/ws2_32/src/dcatalog.c @@ -59,6 +59,17 @@ WsTcOpen(IN PTCATALOG Catalog, &RegType, NULL, &RegSize); +if (ErrorCode != ERROR_SUCCESS) +{ +DPRINT1("Failed to get protocol catalog name: %d.\n", ErrorCode); +return FALSE; +} + +if (RegType != REG_SZ) +{ +DPRINT1("Protocol catalog name is not a string (Type %d).\n", RegType); +return FALSE; +} CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize); diff --git a/dll/win32/ws2_32/src/nscatalo.c b/dll/win32/ws2_32/src/nscatalo.c index 6d32a4c8b7c..fe4d9cb28cf 100644 --- a/dll/win32/ws2_32/src/nscatalo.c +++ b/dll/win32/ws2_32/src/nscatalo.c @@ -58,6 +58,17 @@ WsNcOpen(IN PNSCATALOG Catalog, &RegType, NULL, &RegSize); +if (ErrorCode != ERROR_SUCCESS) +{ +DPRINT1("Failed to get namespace catalog name: %d.\n", ErrorCode); +return FALSE; +} + +if (RegType != REG_SZ) +{ +DPRINT1("Namespace catalog name is not a string (Type %d).\n", RegType); +return FALSE; +} CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize);
[ros-diffs] [reactos] 01/01: [ADVAPI32] In RegSetValueExW, do not fail if we fault when checking for ending NUL character
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=42b94e728a5e4046a4363cea0722625a600a5321 commit 42b94e728a5e4046a4363cea0722625a600a5321 Author: Jérôme Gardou AuthorDate: Tue Mar 2 15:39:25 2021 +0100 Commit: Jérôme Gardou CommitDate: Tue Mar 2 15:42:21 2021 +0100 [ADVAPI32] In RegSetValueExW, do not fail if we fault when checking for ending NUL character --- dll/win32/advapi32/reg/reg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dll/win32/advapi32/reg/reg.c b/dll/win32/advapi32/reg/reg.c index b3e08e18907..36aa3b867ae 100644 --- a/dll/win32/advapi32/reg/reg.c +++ b/dll/win32/advapi32/reg/reg.c @@ -4933,8 +4933,7 @@ RegSetValueExW( } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { -ClosePredefKey(KeyHandle); -return ERROR_NOACCESS; +/* Do not fail if we fault where we were told not to go */ } _SEH2_END; }
[ros-diffs] [reactos] 01/01: [NTDLL_APITEST] Ensure that some noticeable time has passed since process creation to fix a flaky test.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ec9f3d82b0300bb59e115d2a58a29c1612315d8b commit ec9f3d82b0300bb59e115d2a58a29c1612315d8b Author: Colin Finck AuthorDate: Sat Feb 20 17:39:23 2021 +0100 Commit: Colin Finck CommitDate: Tue Mar 2 19:32:20 2021 +0100 [NTDLL_APITEST] Ensure that some noticeable time has passed since process creation to fix a flaky test. --- modules/rostests/apitests/ntdll/NtQueryInformationProcess.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c b/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c index 94a07f17589..777f8f36810 100644 --- a/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c +++ b/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c @@ -119,7 +119,6 @@ Test_ProcessTimes(void) sizeof(KERNEL_USER_TIMES), NULL); ok_hex(Status, STATUS_SUCCESS); -ros_skip_flaky ok(Times1.CreateTime.QuadPart < TestStartTime.QuadPart, "CreateTime is %I64u, expected < %I64u\n", Times1.CreateTime.QuadPart, TestStartTime.QuadPart); ok(Times1.CreateTime.QuadPart > TestStartTime.QuadPart - 1LL, @@ -327,6 +326,9 @@ START_TEST(NtQueryInformationProcess) { NTSTATUS Status; +/* Make sure that some time has passed since process creation, even if the resolution of our NtQuerySystemTime is low. */ +Sleep(1); + Status = NtQuerySystemTime(&TestStartTime); ok_hex(Status, STATUS_SUCCESS);
[ros-diffs] [reactos] 01/01: [SHELL32] Determine if the FS is of type FATX (#3398)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9536f44c81776636a033d5e875e7e0b2dc7e7cbb commit 9536f44c81776636a033d5e875e7e0b2dc7e7cbb Author: George Bișoc AuthorDate: Tue Mar 2 19:37:31 2021 +0100 Commit: GitHub CommitDate: Tue Mar 2 19:37:31 2021 +0100 [SHELL32] Determine if the FS is of type FATX (#3398) FATX is listed as a filesystem for format within the list but it's classed out from current proposed filesystems, thus spamming the debug output and not allowing to actually format a storage drive with this FS. CORE-17272 --- dll/win32/shell32/dialogs/drive.cpp | 43 + 1 file changed, 43 insertions(+) diff --git a/dll/win32/shell32/dialogs/drive.cpp b/dll/win32/shell32/dialogs/drive.cpp index 126dc0da211..6c6b0f39590 100644 --- a/dll/win32/shell32/dialogs/drive.cpp +++ b/dll/win32/shell32/dialogs/drive.cpp @@ -81,6 +81,27 @@ GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNum else return FALSE; } +else if (!wcsicmp(szFs, L"FATX")) +{ +if (TotalNumberOfBytes->QuadPart <= (16 * 1024 * 1024)) +ClusterSize = 2048; +else if (TotalNumberOfBytes->QuadPart <= (32 * 1024 * 1024)) +ClusterSize = 512; +else if (TotalNumberOfBytes->QuadPart <= (64 * 1024 * 1024)) +ClusterSize = 1024; +else if (TotalNumberOfBytes->QuadPart <= (128 * 1024 * 1024)) +ClusterSize = 2048; +else if (TotalNumberOfBytes->QuadPart <= (256 * 1024 * 1024)) +ClusterSize = 4096; +else if (TotalNumberOfBytes->QuadPart <= (8192LL * 1024LL * 1024LL)) +ClusterSize = 2048; +else if (TotalNumberOfBytes->QuadPart <= (16384LL * 1024LL * 1024LL)) +ClusterSize = 8192; +else if (TotalNumberOfBytes->QuadPart <= (32768LL * 1024LL * 1024LL)) +ClusterSize = 16384; +else +return FALSE; +} else if (!wcsicmp(szFs, L"NTFS")) { if (TotalNumberOfBytes->QuadPart <= (512 * 1024 * 1024)) @@ -252,6 +273,28 @@ InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0); EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE); } +else if (!wcsicmp(wszBuf, L"FATX")) +{ +if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes)) +{ +TRACE("FATX supports drives smaller than 1G (FATX16) and up to 32G (FATX32), current size -> %lu\n", TotalNumberOfBytes.QuadPart); +SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); +return; +} + +if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf))) +{ +hDlgCtrl = GetDlgItem(hwndDlg, 28680); +SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); +lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); +if (lIndex != CB_ERR) +SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); +SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); +} + +SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0); +EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE); +} else if (!wcsicmp(wszBuf, L"NTFS")) { if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
[ros-diffs] [reactos] 01/01: [NTOS:PS] Implement PS_QUOTA_TYPE and let the quota code use it (#3389)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6170b574f0fb00460da7a3e547cec7e9fa41b621 commit 6170b574f0fb00460da7a3e547cec7e9fa41b621 Author: George Bișoc AuthorDate: Tue Mar 2 20:09:58 2021 +0100 Commit: GitHub CommitDate: Tue Mar 2 20:09:58 2021 +0100 [NTOS:PS] Implement PS_QUOTA_TYPE and let the quota code use it (#3389) This will replace the PoolIndex variable and as such we'll only be using the PS_QUOTA_TYPE enumeration, as Windows does. Both QuotaEntry, QuotaUsage and QuotaPeak depend explicitly or implicitly on this enumeration. Further details about this enum can be found in the following articles. https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ps/psquota/type.htm?tx=68,143 https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ps/psquota/block.htm?tx=68,142,143 https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/ps/eprocess/index.htm (see QuotaPeak and QuotaUsage) --- ntoskrnl/ex/sysinfo.c | 12 +-- ntoskrnl/ps/query.c | 12 +-- ntoskrnl/ps/quota.c | 52 ++- sdk/include/ndk/pstypes.h | 23 ++--- 4 files changed, 56 insertions(+), 43 deletions(-) diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c index ffb8ddc906d..f02f0a1cce1 100644 --- a/ntoskrnl/ex/sysinfo.c +++ b/ntoskrnl/ex/sysinfo.c @@ -1025,12 +1025,12 @@ QSI_DEF(SystemProcessInformation) SpiCurrent->PageFaultCount = Process->Vm.PageFaultCount; SpiCurrent->PeakWorkingSetSize = Process->Vm.PeakWorkingSetSize; SpiCurrent->WorkingSetSize = Process->Vm.WorkingSetSize; -SpiCurrent->QuotaPeakPagedPoolUsage = Process->QuotaPeak[0]; -SpiCurrent->QuotaPagedPoolUsage = Process->QuotaUsage[0]; -SpiCurrent->QuotaPeakNonPagedPoolUsage = Process->QuotaPeak[1]; -SpiCurrent->QuotaNonPagedPoolUsage = Process->QuotaUsage[1]; -SpiCurrent->PagefileUsage = Process->QuotaUsage[2]; -SpiCurrent->PeakPagefileUsage = Process->QuotaPeak[2]; +SpiCurrent->QuotaPeakPagedPoolUsage = Process->QuotaPeak[PsPagedPool]; +SpiCurrent->QuotaPagedPoolUsage = Process->QuotaUsage[PsPagedPool]; +SpiCurrent->QuotaPeakNonPagedPoolUsage = Process->QuotaPeak[PsNonPagedPool]; +SpiCurrent->QuotaNonPagedPoolUsage = Process->QuotaUsage[PsNonPagedPool]; +SpiCurrent->PagefileUsage = Process->QuotaUsage[PsPageFile]; +SpiCurrent->PeakPagefileUsage = Process->QuotaPeak[PsPageFile]; SpiCurrent->PrivatePageCount = Process->CommitCharge; ThreadInfo = (PSYSTEM_THREAD_INFORMATION)(SpiCurrent + 1); diff --git a/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c index 60f440ab9bc..cad72c4d60a 100644 --- a/ntoskrnl/ps/query.c +++ b/ntoskrnl/ps/query.c @@ -460,12 +460,12 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, VmCounters->PageFaultCount = Process->Vm.PageFaultCount; VmCounters->PeakWorkingSetSize = Process->Vm.PeakWorkingSetSize; VmCounters->WorkingSetSize = Process->Vm.WorkingSetSize; -VmCounters->QuotaPeakPagedPoolUsage = Process->QuotaPeak[0]; -VmCounters->QuotaPagedPoolUsage = Process->QuotaUsage[0]; -VmCounters->QuotaPeakNonPagedPoolUsage = Process->QuotaPeak[1]; -VmCounters->QuotaNonPagedPoolUsage = Process->QuotaUsage[1]; -VmCounters->PagefileUsage = Process->QuotaUsage[2] << PAGE_SHIFT; -VmCounters->PeakPagefileUsage = Process->QuotaPeak[2] << PAGE_SHIFT; +VmCounters->QuotaPeakPagedPoolUsage = Process->QuotaPeak[PsPagedPool]; +VmCounters->QuotaPagedPoolUsage = Process->QuotaUsage[PsPagedPool]; +VmCounters->QuotaPeakNonPagedPoolUsage = Process->QuotaPeak[PsNonPagedPool]; +VmCounters->QuotaNonPagedPoolUsage = Process->QuotaUsage[PsNonPagedPool]; +VmCounters->PagefileUsage = Process->QuotaUsage[PsPageFile] << PAGE_SHIFT; +VmCounters->PeakPagefileUsage = Process->QuotaPeak[PsPageFile] << PAGE_SHIFT; //VmCounters->PrivateUsage = Process->CommitCharge << PAGE_SHIFT; // diff --git a/ntoskrnl/ps/quota.c b/ntoskrnl/ps/quota.c index 6d3751090ca..0645654a320 100644 --- a/ntoskrnl/ps/quota.c +++ b/ntoskrnl/ps/quota.c @@ -28,38 +28,36 @@ static KSPIN_LOCK PspQuotaLock; /* * Private helper to charge the specified process quota. - * ReturnsSTATUS_QUOTA_EXCEEDED on quota limit check failure. - * Updates QuotaPeak as needed for specified PoolIndex. - * TODO: Research and possibly add (the undocumented) enum type PS_QUOTA_TYPE - * to replace UCHAR for 'PoolIndex'. + * Returns STATUS_QUOTA_EXCEEDED on quota limit check failure. + * Updates QuotaPeak as ne
[ros-diffs] [reactos] 01/01: [RTL_VISTA] CMakeLists.txt: Fix 'rtl' copypasta (#3489)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e898c9e0df17e1742c6ca362b7710174f61af3f0 commit e898c9e0df17e1742c6ca362b7710174f61af3f0 Author: Serge Gautherie <32623169+sergegauthe...@users.noreply.github.com> AuthorDate: Tue Mar 2 19:06:17 2021 +0100 Commit: GitHub CommitDate: Tue Mar 2 19:06:17 2021 +0100 [RTL_VISTA] CMakeLists.txt: Fix 'rtl' copypasta (#3489) Addendum to 6119239. --- sdk/lib/rtl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/rtl/CMakeLists.txt b/sdk/lib/rtl/CMakeLists.txt index 65bf915b45d..1fe48a7817c 100644 --- a/sdk/lib/rtl/CMakeLists.txt +++ b/sdk/lib/rtl/CMakeLists.txt @@ -122,5 +122,5 @@ list(APPEND SOURCE_VISTA ) add_library(rtl_vista ${SOURCE_VISTA}) -add_pch(rtl rtl_vista.h SOURCE_VISTA) +add_pch(rtl_vista rtl_vista.h SOURCE_VISTA) add_dependencies(rtl_vista psdk)
[ros-diffs] [reactos] 01/01: [SHELL32] Improve Polish [pl-PL] translation (#3494)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=27ca352d2bb192384153f8da9f1f76f2750e18f1 commit 27ca352d2bb192384153f8da9f1f76f2750e18f1 Author: Piotr Hetnarowicz <40692062+pit...@users.noreply.github.com> AuthorDate: Tue Mar 2 19:09:53 2021 +0100 Commit: GitHub CommitDate: Tue Mar 2 19:09:53 2021 +0100 [SHELL32] Improve Polish [pl-PL] translation (#3494) --- dll/win32/shell32/lang/pl-PL.rc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index 67eb0a140b0..49802558c64 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -1,7 +1,7 @@ /* * Updated by Saibamen (July, 2015) * Updated by BlackDragonDv (January, 2018) - * Updated by Piotr Hetnarowicz (August, 2020) + * Updated by Piotr Hetnarowicz (February, 2021) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -505,11 +505,11 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL IDB_DLG_BG, IDC_STATIC, "STATIC", SS_BITMAP | SS_REALSIZECONTROL, 0, 0, 208, 122 CONTROL IDB_REACTOS_FLAG, IDC_STATIC, "STATIC", SS_BITMAP, 176, 1, 32, 26 -PUSHBUTTON "&Switch User", IDC_SWITCH_USER_BUTTON, 55, 46, 22, 20, BS_OWNERDRAW | WS_DISABLED | WS_GROUP +PUSHBUTTON "&Przełącz użytkownika", IDC_SWITCH_USER_BUTTON, 55, 46, 22, 20, BS_OWNERDRAW | WS_DISABLED | WS_GROUP PUSHBUTTON "&Wyloguj", IDC_LOG_OFF_BUTTON, 132, 46, 22, 20, BS_OWNERDRAW PUSHBUTTON "Anuluj", IDCANCEL, 162, 103, 40, 12, WS_GROUP | BS_FLAT LTEXT "Wylogowywanie z systemu ReactOS", IDC_LOG_OFF_TEXT_STATIC, 4, 7, 170, 19 -CTEXT "Switch User", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 +CTEXT "Przełącz użytkownika", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 CTEXT "Wyloguj", IDC_LOG_OFF_STATIC, 118, 70, 51, 11 END @@ -1030,8 +1030,8 @@ BEGIN IDS_SYSTEMFOLDER "Folder systemowy" /* For IDD_LOG_OFF_FANCY */ -IDS_LOG_OFF_DESC "Closes your programs and ends your ReactOS session." -IDS_SWITCH_USER_DESC "Lets another user log on while your programs and files remain open.\r\n\r\n(You can also switch users by pressing the Windows logo key + L.)" +IDS_LOG_OFF_DESC "Zamyka programy i kończy sesję systemu ReactOS." +IDS_SWITCH_USER_DESC "Umożliwia innemu użytkownikowi zalogowanie się, podczas gdy Twoje programy i pliki są otwarte.\r\n\r\n(Możesz także przełączać użytkowników naciskając klawisze logo + L.)" IDS_LOG_OFF_TITLE "Wyloguj" IDS_SWITCH_USER_TITLE "Switch User" END
[ros-diffs] [reactos] 01/01: [SOLITAIRE] Update Polish [pl-PL] translation (#3496)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fa0c63bc4824ec8c6e850ca54b486003d96b5eb8 commit fa0c63bc4824ec8c6e850ca54b486003d96b5eb8 Author: Piotr Hetnarowicz <40692062+pit...@users.noreply.github.com> AuthorDate: Tue Mar 2 19:10:26 2021 +0100 Commit: GitHub CommitDate: Tue Mar 2 19:10:26 2021 +0100 [SOLITAIRE] Update Polish [pl-PL] translation (#3496) --- base/applications/games/solitaire/lang/pl-PL.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/applications/games/solitaire/lang/pl-PL.rc b/base/applications/games/solitaire/lang/pl-PL.rc index af7615ff881..1cc70b5f4df 100644 --- a/base/applications/games/solitaire/lang/pl-PL.rc +++ b/base/applications/games/solitaire/lang/pl-PL.rc @@ -6,6 +6,7 @@ *Updated by Saibamen - Adam Stachowicz (saibamen...@gmail.com) (Apr, 2011) *UTF-8 conversion by Caemyr (May, 2011) *updated by Wojciech Kozłowski (wojo...@gmail.com) (April, 2014) + *Updated by Piotr Hetnarowicz (March, 2021) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -73,7 +74,7 @@ BEGIN BEGIN MENUITEM "&Rozdaj\tF2", IDM_GAME_NEW MENUITEM SEPARATOR -MENUITEM "&Undo", IDM_GAME_UNDO, GRAYED +MENUITEM "&Cofnij", IDM_GAME_UNDO, GRAYED MENUITEM "&Talia...", IDM_GAME_DECK MENUITEM "&Opcje...", IDM_GAME_OPTIONS MENUITEM SEPARATOR
[ros-diffs] [reactos] 02/02: [CMAKE] Use remove_target_compile_option when disabling manually enabled warnings
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fc2b105e5d86c49b66570eb481dc9ed8caede5ae commit fc2b105e5d86c49b66570eb481dc9ed8caede5ae Author: Victor Perevertkin AuthorDate: Wed Mar 3 04:54:37 2021 +0300 Commit: Victor Perevertkin CommitDate: Wed Mar 3 06:04:25 2021 +0300 [CMAKE] Use remove_target_compile_option when disabling manually enabled warnings --- base/applications/wordpad/CMakeLists.txt | 2 +- base/services/nfsd/CMakeLists.txt | 2 +- dll/3rdparty/libtirpc/CMakeLists.txt | 4 +++- dll/win32/comctl32/CMakeLists.txt | 4 ++-- dll/win32/dbghelp/CMakeLists.txt | 5 +++-- .../apitests/compiler/ms/seh/CMakeLists.txt| 22 +++--- modules/rostests/winetests/d3dx9_36/CMakeLists.txt | 2 +- modules/rostests/winetests/kernel32/CMakeLists.txt | 2 +- modules/rostests/winetests/user32/CMakeLists.txt | 2 +- 9 files changed, 24 insertions(+), 21 deletions(-) diff --git a/base/applications/wordpad/CMakeLists.txt b/base/applications/wordpad/CMakeLists.txt index 759331f3546..6d007eafa85 100644 --- a/base/applications/wordpad/CMakeLists.txt +++ b/base/applications/wordpad/CMakeLists.txt @@ -20,5 +20,5 @@ add_cd_file(TARGET wordpad DESTINATION reactos/system32 FOR all) if(MSVC) # Disable warning C4477 (printf format warnings) -target_compile_options(wordpad PRIVATE /wd4477) +remove_target_compile_option(wordpad "/we4477") endif() diff --git a/base/services/nfsd/CMakeLists.txt b/base/services/nfsd/CMakeLists.txt index 5726c898cb6..d5f5dbd913c 100644 --- a/base/services/nfsd/CMakeLists.txt +++ b/base/services/nfsd/CMakeLists.txt @@ -50,7 +50,7 @@ add_executable(nfsd ${SOURCE} nfsd.rc) if(MSVC AND (NOT USE_CLANG_CL)) # Disable warning C4477 (printf format warnings) -target_compile_options(nfsd PRIVATE "/wd4477") +remove_target_compile_option(nfsd "/we4477") else() # FIXME: Tons of warnings. target_compile_options(nfsd PRIVATE "-w") diff --git a/dll/3rdparty/libtirpc/CMakeLists.txt b/dll/3rdparty/libtirpc/CMakeLists.txt index 0ef4cc49132..d2d97f2cb73 100644 --- a/dll/3rdparty/libtirpc/CMakeLists.txt +++ b/dll/3rdparty/libtirpc/CMakeLists.txt @@ -96,8 +96,10 @@ add_library(libtirpc MODULE if(MSVC) # error C4133: '=': incompatible types - from 'char *' to 'int32_t *' remove_target_compile_option(libtirpc "/we4133") +# Disable warning C4313 (format string conflicts) +remove_target_compile_option(libtirpc "/we4313") # Disable warning C4477 (printf format warnings) -target_compile_options(libtirpc PRIVATE /wd4313) +remove_target_compile_option(libtirpc "/we4477") if (NOT USE_CLANG_CL) remove_target_compile_option(libtirpc "/we4101") target_compile_options(libtirpc PRIVATE /wd4101 /wd4133 /wd4473 /wd4477) diff --git a/dll/win32/comctl32/CMakeLists.txt b/dll/win32/comctl32/CMakeLists.txt index 60c571c58ed..6675e8f3500 100644 --- a/dll/win32/comctl32/CMakeLists.txt +++ b/dll/win32/comctl32/CMakeLists.txt @@ -64,9 +64,9 @@ add_library(comctl32 MODULE rsrc.rc ${CMAKE_CURRENT_BINARY_DIR}/comctl32.def) -if (MSVC) +if(MSVC) # Disable warning C4477 (printf format warnings) -target_compile_options(comctl32 PRIVATE /wd4477) +remove_target_compile_option(comctl32 "/we4477") endif() set_module_type(comctl32 win32dll UNICODE) diff --git a/dll/win32/dbghelp/CMakeLists.txt b/dll/win32/dbghelp/CMakeLists.txt index b72e79e7584..ab1edd17410 100644 --- a/dll/win32/dbghelp/CMakeLists.txt +++ b/dll/win32/dbghelp/CMakeLists.txt @@ -80,7 +80,8 @@ else() add_pch(dbghelp precomp.h SOURCE) add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all) -if (MSVC) -target_compile_options(dbghelp PRIVATE /wd4477) +if(MSVC) +# Disable warning C4477 (printf format warnings) +remove_target_compile_option(dbghelp "/we4477") endif() endif() diff --git a/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt b/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt index 1ad102959fc..34da6e3e4bc 100644 --- a/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt +++ b/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt @@ -1,15 +1,4 @@ -if(MSVC) -add_compile_options("/wd4189") # error C4189: 'Index2': local variable is initialized but not referenced -add_compile_options("/wd4197") # warning C4197: 'volatile LONG': top-level volatile in cast is ignored -add_compile_options("/wd4532") # warning C4532: 'break': jump out of __finally block has undefined behavior during termination handling -else() -add_compile_options("-Wno-format") -add_compile_options("-Wno-implicit-function-declaration") -add_compile_options("-Wno-unused-label") -add_compile_options("-Wno-unused-variable") -endif() - foreach(num RANGE 1 9) list(APPEND SOURCE seh000${num}.c) set_source_files_properties(seh000${num}.c PROPERTI
[ros-diffs] [reactos] 01/02: [GITHUB] Choose LLVM version manually
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b410220f39a64445447814b7b29e177f31acb319 commit b410220f39a64445447814b7b29e177f31acb319 Author: Victor Perevertkin AuthorDate: Wed Mar 3 05:08:12 2021 +0300 Commit: Victor Perevertkin CommitDate: Wed Mar 3 06:03:01 2021 +0300 [GITHUB] Choose LLVM version manually --- .github/workflows/build.yml | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 398ea95c2b2..30d0b98fced 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,11 +64,17 @@ jobs: wget https://svn.reactos.org/storage/vperevertkin/rosbe-ci.tar.zst mkdir ${{github.workspace}}/rosbe tar -I zstd -xvf rosbe-ci.tar.zst --directory ${{github.workspace}}/rosbe + - name: Set LLVM version +run: | + echo "LLVM_VERSION=11" >> $GITHUB_ENV + - name: Install LLVM +run: | + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh $LLVM_VERSION - name: Install other packages run: | sudo apt install ccache - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" - sudo apt install clang-11 - uses: actions/checkout@v2 with: path: src @@ -88,7 +94,7 @@ jobs: - name: Configure run: | mkdir build - echo 'cd ${{github.workspace}}/build && cmake ${{github.workspace}}/src -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-clang.cmake -DARCH:STRING=i386 -DENABLE_CCACHE=1 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DCLANG_VERSION=11' > commands + echo 'cd ${{github.workspace}}/build && cmake ${{github.workspace}}/src -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-clang.cmake -DARCH:STRING=i386 -DENABLE_CCACHE=1 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DCLANG_VERSION=${{env.LLVM_VERSION}}' > commands ${{github.workspace}}/rosbe/RosBE.sh < commands - name: Build run: |
[ros-diffs] [reactos] 01/01: [DEVMGR][NETID] Update PT translation (#3487)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6e40a961459c699687e205147caec3c871284cae commit 6e40a961459c699687e205147caec3c871284cae Author: Jose Carlos Jesus AuthorDate: Wed Mar 3 03:18:15 2021 + Commit: GitHub CommitDate: Wed Mar 3 04:18:15 2021 +0100 [DEVMGR][NETID] Update PT translation (#3487) And readjust objects size to fit all text in Driver tab. --- dll/win32/devmgr/lang/pt-PT.rc | 112 - dll/win32/netid/lang/pt-PT.rc | 22 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/dll/win32/devmgr/lang/pt-PT.rc b/dll/win32/devmgr/lang/pt-PT.rc index 1394979736a..b4299a91deb 100644 --- a/dll/win32/devmgr/lang/pt-PT.rc +++ b/dll/win32/devmgr/lang/pt-PT.rc @@ -1,4 +1,4 @@ -/* Brazilian Portuguese translation by Marcelo Zamperetti, 2007-07-21 */ +/* Portuguese (PT) translation by Jose Jesus zecarlos1...@hotmail.com 25-2-2021 */ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL @@ -8,7 +8,7 @@ BEGIN IDS_TYPE "Tipo" IDS_MANUFACTURER "Fabricante: %1" IDS_LOCATION "Local: %1" -IDS_STATUS "Status do Dispositivo: %1" +IDS_STATUS "Estado do Dispositivo: %1" IDS_UNKNOWN "Desconhecido" IDS_LOCATIONSTR "Local %1!u! (%2)" IDS_DEVCODE " (Código %1!u!)" @@ -16,17 +16,17 @@ BEGIN IDS_ENABLEDEVICE "Usar este dispositivo (activar)" IDS_DISABLEDEVICE "Não usar este dispositivo (desactivar)" IDS_UNKNOWNDEVICE "Dispositivo desconhecido" -IDS_NODRIVERLOADED "Nenhum driver está instalado para este dispositivo." +IDS_NODRIVERLOADED "Nenhum controlador instalado para este dispositivo." IDS_DEVONPARENT "em %1" IDS_TROUBLESHOOTDEV "&Resolução de problemas..." IDS_ENABLEDEV "&Activar Dispositivo" -IDS_REINSTALLDRV "Re&instalar Driver" +IDS_REINSTALLDRV "Re&instalar controlador" IDS_PROPERTIES "P&ropriedades" -IDS_UPDATEDRV "Ac&tualizar Driver..." +IDS_UPDATEDRV "Ac&tualizar controlador..." IDS_REBOOT "Reiniciar o &Computador..." IDS_NOTAVAILABLE "Não disponível" IDS_NOTDIGITALLYSIGNED "Sem assinatura digital" -IDS_NODRIVERS "Nenhum arquivo de driver é necessário ou foi carregado para este dispositivo." +IDS_NODRIVERS "Nenhum controlador é necessário ou foi carregado para este dispositivo." IDS_RESOURCE_COLUMN "Tipo de recurso" IDS_SETTING_COLUMN "Definições" IDS_RESOURCE_MEMORY_RANGE "Faixa de memória" @@ -40,59 +40,59 @@ STRINGTABLE BEGIN IDS_DEV_NO_PROBLEM "Este dispositivo está a funcionar correctamente." IDS_DEV_NOT_CONFIGURED "Este dispositivo não está correctamente configurado." -IDS_DEV_DEVLOADER_FAILED "O ReactOS não pôde carregar o driver para este dispositivo porque o computador está a reportar dois tipos de barramento %1." -IDS_DEV_DEVLOADER_FAILED2 "O(s) carregadore(es) do dispositivo %1 não pôde/puderam carregar o driver do dispositivo para este dispositivo." -IDS_DEV_OUT_OF_MEMORY "O driver para este dispositivo pode estar danificado, ou seu sistema com pouca memória ou insuficiência de outros recursos." -IDS_DEV_ENTRY_IS_WRONG_TYPE "Este dispositivo não está funcionando correctamente porque um de seus drivers pode estar danificado, ou seu registo pode estar danificado." -IDS_DEV_LACKED_ARBITRATOR "O driver para este dispositivo requisitou um recurso que o ReactOS não sabe como manusear." +IDS_DEV_DEVLOADER_FAILED "O ReactOS não pôde carregar o controlador para este dispositivo porque o computador está a reportar dois tipos de barramento %1." +IDS_DEV_DEVLOADER_FAILED2 "O(s) carregadore(es) do dispositivo %1 não pôde/puderam carregar o controlador para este dispositivo." +IDS_DEV_OUT_OF_MEMORY "O controlador para este dispositivo pode estar danificado, ou o sistema com pouca memória ou insuficiência de outros recursos." +IDS_DEV_ENTRY_IS_WRONG_TYPE "Este dispositivo não está a funcionar correctamente porque um de seus controladores pode estar danificado, ou o registo pode estar danificado." +IDS_DEV_LACKED_ARBITRATOR "O controlador para este dispositivo requisitou um recurso que o ReactOS não sabe como manusear." IDS_DEV_BOOT_CONFIG_CONFLICT "Outro dispositivo está a usar os recursos que este dispositivo necessita." -IDS_DEV_FAILED_FILTER "Os drivers para este dispositivo precisam ser reinstalados." -IDS_DEV_DEVLOADER_NOT_FOUND "Este dispositivo não está a funcionar correctamente porque o ReactOS não pôde carregar o arquivo %1 que carrega os drivers para o dispositivo." -IDS_DEV_DEVLOADER_NOT_FOUND2 "Este dispositivo não está a funcionar correctamente porque o arquivo %1 que carrega os drivers para este dispositivo está danificado." -IDS_DEV_DEVLOADER_NOT_FOUND3 "Falha no dispositivo: tente mudar o driver para este dispositivo. Se isto não funcionar, consulte a documentação do seu hardware." -IDS_DEV_INVALID_DATA "Este dispositivo não está a funcionar correctamente porque a BIOS do seu
[ros-diffs] [reactos] 01/01: [BOOTMGFW] Disable EFI bootloader compilation
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3bde2740df9104480cb93def48db15d52340c34f commit 3bde2740df9104480cb93def48db15d52340c34f Author: Victor Perevertkin AuthorDate: Wed Mar 3 04:59:12 2021 +0300 Commit: Victor Perevertkin CommitDate: Wed Mar 3 06:27:07 2021 +0300 [BOOTMGFW] Disable EFI bootloader compilation Don't pretend we are supporting UEFI, we are not --- boot/CMakeLists.txt | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/boot/CMakeLists.txt b/boot/CMakeLists.txt index 727f75a7fff..fbc839db4b0 100644 --- a/boot/CMakeLists.txt +++ b/boot/CMakeLists.txt @@ -15,9 +15,11 @@ else() message(FATAL_ERROR "Unknown ARCH '" ${ARCH} "', cannot generate a valid UEFI boot filename.") endif() +# FIXME: this command creates a dummy EFI partition, add EFI/BOOT/boot${EFI_PLATFORM_ID}.efi file +# once ReactOS supports UEFI add_custom_target(efisys -COMMAND native-fatten ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin -format 2880 EFIBOOT -boot ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat.bin -mkdir EFI -mkdir EFI/BOOT -add $ EFI/BOOT/boot${EFI_PLATFORM_ID}.efi -DEPENDS native-fatten fat bootmgfw +COMMAND native-fatten ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin -format 2880 EFIBOOT -boot ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat.bin -mkdir EFI -mkdir EFI/BOOT +DEPENDS native-fatten fat VERBATIM) @@ -164,4 +166,4 @@ add_cd_file(TARGET efisys FILE ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin DESTINATIO add_subdirectory(freeldr) add_subdirectory(bootdata) -add_subdirectory(environ) +# add_subdirectory(environ)
[ros-diffs] [reactos] 01/01: [CMAKE] target_compile_definitions() calls: Remove (now) useless '-D' (#3490)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=55b93aecdc1f881b9291428189c625ff1def6774 commit 55b93aecdc1f881b9291428189c625ff1def6774 Author: Serge Gautherie <32623169+sergegauthe...@users.noreply.github.com> AuthorDate: Wed Mar 3 04:16:02 2021 +0100 Commit: GitHub CommitDate: Wed Mar 3 04:16:02 2021 +0100 [CMAKE] target_compile_definitions() calls: Remove (now) useless '-D' (#3490) Documented as automatically removed, since CMake 3.12.4 at least. https://cmake.org/cmake/help/v3.12/command/target_compile_definitions.html --- dll/directx/wine/d3dx9_36/d3dx9.cmake | 2 +- modules/rosapps/applications/fraginator/CMakeLists.txt | 2 +- modules/rostests/winetests/d3dx9_36/CMakeLists.txt | 2 +- sdk/lib/rossym/CMakeLists.txt | 2 +- sdk/tools/mkhive/CMakeLists.txt| 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/d3dx9.cmake b/dll/directx/wine/d3dx9_36/d3dx9.cmake index 082c03e5201..2354a5b4ed7 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9.cmake +++ b/dll/directx/wine/d3dx9_36/d3dx9.cmake @@ -45,5 +45,5 @@ function(add_d3dx9_target __version) add_pch(${module} ../d3dx9_36/precomp.h "${PCH_SKIP_SOURCE}") add_cd_file(TARGET ${module} DESTINATION reactos/system32 FOR all) -target_compile_definitions(${module} PRIVATE -DD3DX_SDK_VERSION=${__version} -D__WINESRC__ -Dcopysignf=_copysignf) +target_compile_definitions(${module} PRIVATE D3DX_SDK_VERSION=${__version} __WINESRC__ copysignf=_copysignf) endfunction() diff --git a/modules/rosapps/applications/fraginator/CMakeLists.txt b/modules/rosapps/applications/fraginator/CMakeLists.txt index 17d7d28037c..77d46795308 100644 --- a/modules/rosapps/applications/fraginator/CMakeLists.txt +++ b/modules/rosapps/applications/fraginator/CMakeLists.txt @@ -19,7 +19,7 @@ add_cd_file(TARGET frag DESTINATION reactos/system32 FOR all) add_executable(unfrag ${UNFRAG_SOURCE}) target_link_libraries(unfrag cppstl) set_target_cpp_properties(unfrag WITH_EXCEPTIONS) -target_compile_definitions(unfrag PRIVATE "_CUI_") +target_compile_definitions(unfrag PRIVATE _CUI_) set_module_type(unfrag win32cui UNICODE) add_importlibs(unfrag advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET unfrag DESTINATION reactos/system32 FOR all) diff --git a/modules/rostests/winetests/d3dx9_36/CMakeLists.txt b/modules/rostests/winetests/d3dx9_36/CMakeLists.txt index 1f4156ce271..3761ad27697 100644 --- a/modules/rostests/winetests/d3dx9_36/CMakeLists.txt +++ b/modules/rostests/winetests/d3dx9_36/CMakeLists.txt @@ -13,7 +13,7 @@ add_executable(d3dx9_36_winetest xfile.c testlist.c rsrc.rc) -target_compile_definitions(d3dx9_36_winetest PRIVATE -DUSE_WINE_TODOS -D__WINESRC__ -Disnan=_isnan) +target_compile_definitions(d3dx9_36_winetest PRIVATE USE_WINE_TODOS __WINESRC__ isnan=_isnan) if(MSVC) # Disable warning C4477 (printf format warnings) remove_target_compile_option(d3dx9_36_winetest "/we4477") diff --git a/sdk/lib/rossym/CMakeLists.txt b/sdk/lib/rossym/CMakeLists.txt index e04cdbdedb2..e70b87bb512 100644 --- a/sdk/lib/rossym/CMakeLists.txt +++ b/sdk/lib/rossym/CMakeLists.txt @@ -13,4 +13,4 @@ list(APPEND SOURCE zwfile.c) add_library(rossym ${SOURCE}) add_dependencies(rossym psdk bugcodes) -target_compile_definitions(rossym INTERFACE "-D__ROS_ROSSYM__") +target_compile_definitions(rossym INTERFACE __ROS_ROSSYM__) diff --git a/sdk/tools/mkhive/CMakeLists.txt b/sdk/tools/mkhive/CMakeLists.txt index eb840ba9dab..da2560165dc 100644 --- a/sdk/tools/mkhive/CMakeLists.txt +++ b/sdk/tools/mkhive/CMakeLists.txt @@ -9,7 +9,7 @@ list(APPEND SOURCE add_host_tool(mkhive ${SOURCE}) target_include_directories(mkhive PRIVATE ${REACTOS_SOURCE_DIR}/sdk/lib/rtl) -target_compile_definitions(mkhive PRIVATE -DMKHIVE_HOST) +target_compile_definitions(mkhive PRIVATE MKHIVE_HOST) if(NOT MSVC) target_compile_options(mkhive PRIVATE "-fshort-wchar") endif()
[ros-diffs] [reactos] 01/14: [CMAKE] Use ASM_MASM language when building with MSVC toolchain
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=41130ab5c6a9173a5bac7ef2d6ea7e33c385cedd commit 41130ab5c6a9173a5bac7ef2d6ea7e33c385cedd Author: Jérôme Gardou AuthorDate: Thu Jan 21 10:20:21 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [CMAKE] Use ASM_MASM language when building with MSVC toolchain CORE-17423 --- CMakeLists.txt | 7 ++- sdk/cmake/Compiler/VISUAL-ASM.cmake | 2 -- sdk/cmake/msvc.cmake| 39 - toolchain-msvc.cmake| 8 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5795482d782..99488e38702 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,7 +213,12 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to endif() # Activate support for assembly source files -enable_language(ASM) +if (MSVC) +set(CMAKE_ASM_MASM_SOURCE_FILE_EXTENSIONS s;S) +enable_language(ASM_MASM) +else() +enable_language(ASM) +endif() # Activate language support for resource files enable_language(RC) diff --git a/sdk/cmake/Compiler/VISUAL-ASM.cmake b/sdk/cmake/Compiler/VISUAL-ASM.cmake deleted file mode 100644 index 0f8019a8e80..000 --- a/sdk/cmake/Compiler/VISUAL-ASM.cmake +++ /dev/null @@ -1,2 +0,0 @@ - -set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S) diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake index 3b70fd92744..abd935821a4 100644 --- a/sdk/cmake/msvc.cmake +++ b/sdk/cmake/msvc.cmake @@ -187,15 +187,16 @@ if(MSVC_IDE) add_definitions(/DLANGUAGE_EN_US) else() set(CMAKE_RC_COMPILE_OBJECT " /nologo ${I18N_DEFS} /fo ") -if(ARCH STREQUAL "arm") -set(CMAKE_ASM_COMPILE_OBJECT -"cl ${cl_includes_flag} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /D__ASM__ /D_USE_ML /EP /c > .tmp" -" -nologo -o .tmp") -else() -set(CMAKE_ASM_COMPILE_OBJECT -"cl ${cl_includes_flag} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /D__ASM__ /D_USE_ML /EP /c > .tmp" -" /nologo /Cp /Fo /c /Ta .tmp") -endif() +endif() + +if(ARCH STREQUAL "arm") +set(CMAKE_ASM_MASM_COMPILE_OBJECT +"cl ${cl_includes_flag} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /D__ASM__ /D_USE_ML /EP /c > .tmp" +" -nologo -o .tmp") +else() +set(CMAKE_ASM_MASM_COMPILE_OBJECT +"cl ${cl_includes_flag} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /D__ASM__ /D_USE_ML /EP /c > .tmp" +" /nologo /Cp /Fo /c /Ta .tmp") endif() if(_VS_ANALYZE_) @@ -214,9 +215,9 @@ elseif(_PREFAST_) endif() set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY}) -set(CMAKE_ASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY}) +set(CMAKE_ASM_MASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY}) set(CMAKE_RC_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_MODULE}) -set(CMAKE_ASM_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_MODULE}) +set(CMAKE_ASM_MASM_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_MODULE}) set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY}) function(set_entrypoint _module _entrypoint) @@ -264,12 +265,6 @@ function(set_module_type_toolchain MODULE TYPE) endfunction() -if(ARCH STREQUAL "arm") -set(CMAKE_STUB_ASM_COMPILE_OBJECT " -nologo -o ") -else() -set(CMAKE_STUB_ASM_COMPILE_OBJECT " /nologo /Cp /Fo /c /Ta ") -endif() - function(add_delay_importlibs _module) get_target_property(_module_type ${_module} TYPE) if(_module_type STREQUAL "STATIC_LIBRARY") @@ -304,9 +299,9 @@ function(generate_import_lib _libname _dllname _spec_file) # Compile the generated asm stub file if(ARCH STREQUAL "arm") -set(_asm_stub_command ${CMAKE_ASM_COMPILER} -nologo -o ${_asm_stubs_file}.obj ${_asm_stubs_file}) +set(_asm_stub_command ${CMAKE_ASM_MASM_COMPILER} -nologo -o ${_asm_stubs_file}.obj ${_asm_stubs_file}) else() -set(_asm_stub_command ${CMAKE_ASM_COMPILER} /nologo /Cp /Fo${_asm_stubs_file}.obj /c /Ta ${_asm_stubs_file}) +set(_asm_stub_command ${CMAKE_ASM_MASM_COMPILER} /nologo /Cp /Fo${_asm_stubs_file}.obj /c /Ta ${_asm_stubs_file}) endif() add_custom_command( OUTPUT ${_asm_stubs_file}.obj @@ -459,9 +454,9 @@ macro(add_asm_files _target) endif() endforeach() if(ARCH STREQUAL "arm") -set(_pp_asm_compile_command ${CMAKE_ASM_COMPILER} -nologo -o ${_object_file} ${_preprocessed_asm_file}) +set(_pp_asm_compile_command ${CMAKE_ASM_MASM_COMPILER} -nologo -o ${_object_file} ${_preprocessed_asm_file}) else() -
[ros-diffs] [reactos] 02/14: [CMAKE] Preprocess the ASM files but let msbuild handle their actual compilation
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c68739e56610c5e7877e313662b178bec79437a8 commit c68739e56610c5e7877e313662b178bec79437a8 Author: Jérôme Gardou AuthorDate: Fri Jan 22 11:28:11 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [CMAKE] Preprocess the ASM files but let msbuild handle their actual compilation CORE-17423 --- CMakeLists.txt | 1 - sdk/cmake/msvc.cmake | 62 +--- toolchain-msvc.cmake | 2 ++ 3 files changed, 27 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99488e38702..d090b2f79c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,7 +214,6 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to # Activate support for assembly source files if (MSVC) -set(CMAKE_ASM_MASM_SOURCE_FILE_EXTENSIONS s;S) enable_language(ASM_MASM) else() enable_language(ASM) diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake index abd935821a4..33fdbea00f0 100644 --- a/sdk/cmake/msvc.cmake +++ b/sdk/cmake/msvc.cmake @@ -189,14 +189,13 @@ else() set(CMAKE_RC_COMPILE_OBJECT " /nologo ${I18N_DEFS} /fo ") endif() -if(ARCH STREQUAL "arm") -set(CMAKE_ASM_MASM_COMPILE_OBJECT -"cl ${cl_includes_flag} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /D__ASM__ /D_USE_ML /EP /c > .tmp" -" -nologo -o .tmp") -else() -set(CMAKE_ASM_MASM_COMPILE_OBJECT -"cl ${cl_includes_flag} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /D__ASM__ /D_USE_ML /EP /c > .tmp" -" /nologo /Cp /Fo /c /Ta .tmp") +# We don't putbecause this is handled in add_asm_files macro +if (NOT MSVC_IDE) +if(ARCH STREQUAL "arm") +set(CMAKE_ASM_MASM_COMPILE_OBJECT " -nologo -o ") +else() +set(CMAKE_ASM_MASM_COMPILE_OBJECT " /nologo /Cp /Fo /c /Ta ") +endif() endif() if(_VS_ANALYZE_) @@ -437,37 +436,26 @@ function(allow_warnings __module) endfunction() macro(add_asm_files _target) -if(MSVC_IDE) -get_defines(_directory_defines) -get_includes(_directory_includes) -get_directory_property(_defines COMPILE_DEFINITIONS) -foreach(_source_file ${ARGN}) -get_filename_component(_source_file_base_name ${_source_file} NAME_WE) -get_filename_component(_source_file_full_path ${_source_file} ABSOLUTE) -set(_preprocessed_asm_file ${CMAKE_CURRENT_BINARY_DIR}/asm/${_source_file_base_name}_${_target}.tmp) -set(_object_file ${CMAKE_CURRENT_BINARY_DIR}/asm/${_source_file_base_name}_${_target}.obj) -get_source_file_property(_defines_semicolon_list ${_source_file_full_path} COMPILE_DEFINITIONS) -unset(_source_file_defines) -foreach(_define ${_defines_semicolon_list}) -if(NOT ${_define} STREQUAL "NOTFOUND") -list(APPEND _source_file_defines -D${_define}) -endif() -endforeach() -if(ARCH STREQUAL "arm") -set(_pp_asm_compile_command ${CMAKE_ASM_MASM_COMPILER} -nologo -o ${_object_file} ${_preprocessed_asm_file}) -else() -set(_pp_asm_compile_command ${CMAKE_ASM_MASM_COMPILER} /nologo /Cp /Fo${_object_file} /c /Ta ${_preprocessed_asm_file}) +get_defines(_directory_defines) +get_includes(_directory_includes) +get_directory_property(_defines COMPILE_DEFINITIONS) +foreach(_source_file ${ARGN}) +get_filename_component(_source_file_base_name ${_source_file} NAME_WE) +get_filename_component(_source_file_full_path ${_source_file} ABSOLUTE) +set(_preprocessed_asm_file ${CMAKE_CURRENT_BINARY_DIR}/asm/${_source_file_base_name}_${_target}.asm) +get_source_file_property(_defines_semicolon_list ${_source_file_full_path} COMPILE_DEFINITIONS) +unset(_source_file_defines) +foreach(_define ${_defines_semicolon_list}) +if(NOT ${_define} STREQUAL "NOTFOUND") +list(APPEND _source_file_defines -D${_define}) endif() -add_custom_command( -OUTPUT ${_preprocessed_asm_file} ${_object_file} -COMMAND cl /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm ${_directory_includes} ${_source_file_defines} ${_directory_defines} /D__ASM__ /D_USE_ML /EP /c ${_source_file_full_path} > ${_preprocessed_asm_file} && ${_pp_asm_compile_command} -DEPENDS ${_source_file_full_path}) -set_source_files_properties(${_object_file} PROPERTIES EXTERNAL_OBJECT TRUE) -list(APPEND ${_target} ${_object_file}) endforeach() -else() -list(APPEND ${_target} ${ARGN}) -endif() +add_custom_command( +OUTPUT ${
[ros-diffs] [reactos] 03/14: [CMAKE] Disable policy CMP0091 and set /MT flag explicitly for Visual Studio generator
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49000c6471cd79745a36a8cadf33eeebc50ed9a4 commit 49000c6471cd79745a36a8cadf33eeebc50ed9a4 Author: Jérôme Gardou AuthorDate: Fri Jan 22 12:11:34 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [CMAKE] Disable policy CMP0091 and set /MT flag explicitly for Visual Studio generator --- CMakeLists.txt | 13 + toolchain-msvc.cmake | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d090b2f79c0..fcd92b5512a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,13 @@ endif() include(CMakeDependentOption) +# CMAKE_CROSSCOMPILING and MSVC_IDE are not set until project() is called, so let's test this instead +if ((DEFINED CMAKE_TOOLCHAIN_FILE) AND (CMAKE_GENERATOR MATCHES "Visual Studio.*")) +# Do not use MSVC_RUNTIME_LIBRARY target property. We use our own flags instead +message(WARNING "Setting policy CMP0091 to OLD behaviour") +cmake_policy(SET CMP0091 OLD) +endif() + project(REACTOS) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -120,6 +127,12 @@ else() # Print build type message("-- Build Type: ${CMAKE_BUILD_TYPE}") +# Always add /MT in VS CMAKE_GENERATOR +if (MSVC_IDE) +add_compile_options("/MT") +endif() + + # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment diff --git a/toolchain-msvc.cmake b/toolchain-msvc.cmake index dbb901ae874..2aae2edbdd4 100644 --- a/toolchain-msvc.cmake +++ b/toolchain-msvc.cmake @@ -64,7 +64,6 @@ else() set(CMAKE_ASM_MASM_FLAGS_INIT "/Cp") endif() - set(CMAKE_C_STANDARD_LIBRARIES "" CACHE INTERNAL "") set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_LIST_DIR}/overrides-msvc.cmake")
[ros-diffs] [reactos] 04/14: [GITHUB] Add MSBUILD CI action
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3885ad87ca80a322e4663f8d1d06d1506be8ed09 commit 3885ad87ca80a322e4663f8d1d06d1506be8ed09 Author: Jérôme Gardou AuthorDate: Wed Jan 27 09:46:27 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [GITHUB] Add MSBUILD CI action --- .github/workflows/build.yml | 26 ++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30d0b98fced..434286208c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -228,3 +228,29 @@ jobs: with: name: reactos-msvc-amd64-${{github.sha}} path: build/livecd.iso + + build-msbuild-i386: +name: MSBuild (i386) +runs-on: windows-latest +steps: +- name: Install Flex and Bison + run: | +curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z +7z x flexbison.7z -O${{github.workspace}}\bin +echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append +echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append +echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append +- name: Add CL to PATH + uses: ilammy/msvc-dev-cmd@v1 + with: +arch: amd64_x86 +- uses: actions/checkout@v2 + with: +path: src +- name: Configure + run: | +mkdir build +cd build +cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src +- name: Build + run: cmake --build ${{github.workspace}}\build --target bootcd --target livecd
[ros-diffs] [reactos] 05/14: [BOOTMGFW] Explicitly disable dynamic base
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3476cdae7722cb0defee1de63a61d56fc7390c77 commit 3476cdae7722cb0defee1de63a61d56fc7390c77 Author: Jérôme Gardou AuthorDate: Tue Feb 2 16:04:13 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [BOOTMGFW] Explicitly disable dynamic base CORE-17423 --- boot/environ/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/environ/CMakeLists.txt b/boot/environ/CMakeLists.txt index 05aa5b81ef9..9c4d5dcd96f 100644 --- a/boot/environ/CMakeLists.txt +++ b/boot/environ/CMakeLists.txt @@ -85,7 +85,7 @@ if(MSVC) if(ARCH STREQUAL "arm") add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER") else() -add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER /FIXED") +add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER /DYNAMICBASE:NO /FIXED") endif() else() add_target_link_flags(bootmgfw "-Wl,--strip-all,--exclude-all-symbols")
[ros-diffs] [reactos] 06/14: [SHLWAPI] Use an object library to separate C & C++ compilation units
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=93d741c3f41f190e9f3dabb8c5c753e71731bc7f commit 93d741c3f41f190e9f3dabb8c5c753e71731bc7f Author: Jérôme Gardou AuthorDate: Tue Feb 2 16:18:04 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [SHLWAPI] Use an object library to separate C & C++ compilation units CORE-17423 --- dll/win32/shlwapi/CMakeLists.txt | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dll/win32/shlwapi/CMakeLists.txt b/dll/win32/shlwapi/CMakeLists.txt index 076aaa4dcd6..af8ec781824 100644 --- a/dll/win32/shlwapi/CMakeLists.txt +++ b/dll/win32/shlwapi/CMakeLists.txt @@ -27,21 +27,28 @@ list(APPEND SOURCE url.c) list(APPEND PCH_SKIP_SOURCE -autocomp.cpp wsprintf.c ${CMAKE_CURRENT_BINARY_DIR}/shlwapi_stubs.c) add_library(shlwapi MODULE ${SOURCE} ${PCH_SKIP_SOURCE} +$ shlwapi.rc ${CMAKE_CURRENT_BINARY_DIR}/shlwapi.def) # our C++ atlbase.h conflicts with the one from wine, so only use wine includes for C -target_include_directories(shlwapi BEFORE PRIVATE $<$:${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine>) +# Unfortunately, we can't use different includes for C & C++ in VS generator, so use an object library to achieve this +target_include_directories(shlwapi BEFORE PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) + +add_library(shlwapi_autocomp OBJECT autocomp.cpp) +target_link_libraries(shlwapi_autocomp PRIVATE atl_classes) +target_compile_definitions(shlwapi_autocomp PRIVATE $) +target_compile_options(shlwapi_autocomp PRIVATE $) +add_dependencies(shlwapi_autocomp psdk) set_module_type(shlwapi win32dll UNICODE) -target_link_libraries(shlwapi uuid wine cpprt atl_classes) +target_link_libraries(shlwapi uuid wine cpprt) add_delay_importlibs(shlwapi userenv oleaut32 ole32 comdlg32 mpr mlang urlmon shell32 winmm version) add_importlibs(shlwapi user32 gdi32 advapi32 wininet msvcrt kernel32 ntdll) add_pch(shlwapi precomp.h "${PCH_SKIP_SOURCE}")
[ros-diffs] [reactos] 07/14: [CMAKE] Get rid of add_object_library
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49286a6225b8dda6600cf0728b64691e1c97f68b commit 49286a6225b8dda6600cf0728b64691e1c97f68b Author: Jérôme Gardou AuthorDate: Tue Feb 2 16:33:15 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [CMAKE] Get rid of add_object_library It's not needed anymore --- hal/halx86/CMakeLists.txt | 30 ++ hal/halx86/acpi.cmake | 5 + hal/halx86/apic.cmake | 2 +- hal/halx86/generic.cmake| 2 +- hal/halx86/legacy.cmake | 6 +- hal/halx86/pc98.cmake | 6 ++ hal/halx86/pic.cmake| 2 +- hal/halx86/up.cmake | 2 +- hal/halx86/xbox.cmake | 7 ++- sdk/cmake/CMakeMacros.cmake | 10 -- 10 files changed, 16 insertions(+), 56 deletions(-) diff --git a/hal/halx86/CMakeLists.txt b/hal/halx86/CMakeLists.txt index e56a791d8da..68d13839dae 100644 --- a/hal/halx86/CMakeLists.txt +++ b/hal/halx86/CMakeLists.txt @@ -15,30 +15,12 @@ function(add_hal _halname) spec2def(${_halname}.dll ../hal.spec ADD_IMPORTLIB) # Create the actual target -if(NOT MSVC) -foreach(_component ${_haldata_COMPONENTS}) -list(APPEND _haldata_SOURCES "$") -endforeach() -add_library(${_halname} MODULE -${_haldata_SOURCES} -${CMAKE_CURRENT_BINARY_DIR}/hal.def) -else() -foreach(_component ${_haldata_COMPONENTS}) -list(APPEND _haldata_LIBS "lib_hal_${_component}") -endforeach() -add_library(${_halname} MODULE -${_haldata_SOURCES} -${CMAKE_CURRENT_BINARY_DIR}/hal.def) -target_link_libraries(${_halname} ${_haldata_LIBS}) -endif() - -if(${_halname} STREQUAL "halpc98") -target_compile_definitions(lib_hal_pc98 PRIVATE SARCH_PC98) -endif() - -if(${_halname} STREQUAL "halxbox") -target_compile_definitions(lib_hal_xbox PRIVATE SARCH_XBOX) -endif() +foreach(_component ${_haldata_COMPONENTS}) +list(APPEND _haldata_SOURCES "$") +endforeach() +add_library(${_halname} MODULE +${_haldata_SOURCES} +${CMAKE_CURRENT_BINARY_DIR}/hal.def) if(${_halname} STREQUAL "hal") target_link_libraries(${_halname} libcntpr arbiter) diff --git a/hal/halx86/acpi.cmake b/hal/halx86/acpi.cmake index af08c9fc18f..acc856a0b72 100644 --- a/hal/halx86/acpi.cmake +++ b/hal/halx86/acpi.cmake @@ -5,10 +5,7 @@ list(APPEND HAL_ACPI_SOURCE acpi/busemul.c legacy/bus/pcibus.c) -add_object_library(lib_hal_acpi ${HAL_ACPI_SOURCE}) +add_library(lib_hal_acpi OBJECT ${HAL_ACPI_SOURCE}) add_dependencies(lib_hal_acpi bugcodes xdk) #add_pch(lib_hal_acpi include/hal.h) -if(MSVC) -target_link_libraries(lib_hal_acpi lib_hal_generic) -endif() diff --git a/hal/halx86/apic.cmake b/hal/halx86/apic.cmake index 6349e726af0..9c0139e3504 100644 --- a/hal/halx86/apic.cmake +++ b/hal/halx86/apic.cmake @@ -11,5 +11,5 @@ list(APPEND HAL_APIC_SOURCE apic/tsc.c) add_asm_files(lib_hal_apic_asm ${HAL_APIC_ASM_SOURCE}) -add_object_library(lib_hal_apic ${HAL_APIC_SOURCE} ${lib_hal_apic_asm}) +add_library(lib_hal_apic OBJECT ${HAL_APIC_SOURCE} ${lib_hal_apic_asm}) add_dependencies(lib_hal_apic asm) diff --git a/hal/halx86/generic.cmake b/hal/halx86/generic.cmake index 19eb850164b..4948e111fb6 100644 --- a/hal/halx86/generic.cmake +++ b/hal/halx86/generic.cmake @@ -24,5 +24,5 @@ if(ARCH STREQUAL "i386") endif() add_asm_files(lib_hal_generic_asm ${HAL_GENERIC_ASM_SOURCE}) -add_object_library(lib_hal_generic ${HAL_GENERIC_SOURCE} ${lib_hal_generic_asm}) +add_library(lib_hal_generic OBJECT ${HAL_GENERIC_SOURCE} ${lib_hal_generic_asm}) add_dependencies(lib_hal_generic asm) diff --git a/hal/halx86/legacy.cmake b/hal/halx86/legacy.cmake index d60be7f5938..2f487748524 100644 --- a/hal/halx86/legacy.cmake +++ b/hal/halx86/legacy.cmake @@ -11,10 +11,6 @@ list(APPEND HAL_LEGACY_SOURCE legacy/halpnpdd.c legacy/halpcat.c) -add_object_library(lib_hal_legacy ${HAL_LEGACY_SOURCE}) +add_library(lib_hal_legacy OBJECT ${HAL_LEGACY_SOURCE}) add_dependencies(lib_hal_legacy bugcodes xdk) #add_pch(lib_hal_legacy include/hal.h) - -if(MSVC) -target_link_libraries(lib_hal_legacy lib_hal_generic) -endif() diff --git a/hal/halx86/pc98.cmake b/hal/halx86/pc98.cmake index fd51a9851b9..9f04972a212 100644 --- a/hal/halx86/pc98.cmake +++ b/hal/halx86/pc98.cmake @@ -48,10 +48,8 @@ list(APPEND HAL_PC98_SOURCE legacy/halpcat.c) add_asm_files(lib_hal_pc98_asm ${HAL_PC98_ASM_SOURCE}) -add_object_library(lib_hal_pc98 ${HAL_PC98_SOURCE} ${lib_hal_pc98_asm}) +add_library(lib_hal_pc98 OBJECT ${HAL_PC98_SOURCE} ${lib_hal_pc98_asm}) add_dependencies(lib_hal_pc98 bugcodes xdk asm) #add_pch(lib_hal_pc98 pc98/halpc98.h) -if(MSVC) -target_link_libraries(lib_hal_pc98) -endif() +target_compile_definitions(lib_hal_pc98 PRIVATE SARCH_PC98) diff --git a/hal/halx86/pic.cmake b/hal/halx8
[ros-diffs] [reactos] 08/14: [CRT] Declare strlen & wcslen as _CRTIMP
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97d4cb6ee085b59a76c0e2174a66c2b074076086 commit 97d4cb6ee085b59a76c0e2174a66c2b074076086 Author: Jérôme Gardou AuthorDate: Tue Feb 2 17:59:42 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [CRT] Declare strlen & wcslen as _CRTIMP --- sdk/include/crt/string.h | 1 + sdk/include/crt/wchar.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sdk/include/crt/string.h b/sdk/include/crt/string.h index 3249254c947..caeb23fcdc9 100644 --- a/sdk/include/crt/string.h +++ b/sdk/include/crt/string.h @@ -150,6 +150,7 @@ extern "C" { _In_z_ const char *_Str1, _In_z_ const char *_Str2); + _CRTIMP size_t __cdecl strlen( diff --git a/sdk/include/crt/wchar.h b/sdk/include/crt/wchar.h index eadde09cfbd..309bed76cef 100644 --- a/sdk/include/crt/wchar.h +++ b/sdk/include/crt/wchar.h @@ -1929,6 +1929,7 @@ _CRTIMP int __cdecl iswblank(wint_t _C); _In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_Control); + _CRTIMP size_t __cdecl wcslen(
[ros-diffs] [reactos] 09/14: [CMAKE] Explicitly declare libcntpr as a static lib
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2306c83e5c4d5f23f8618abd6cf2ccec7fe5b963 commit 2306c83e5c4d5f23f8618abd6cf2ccec7fe5b963 Author: Jérôme Gardou AuthorDate: Tue Feb 2 19:21:06 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [CMAKE] Explicitly declare libcntpr as a static lib --- sdk/lib/crt/libcntpr.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/crt/libcntpr.cmake b/sdk/lib/crt/libcntpr.cmake index f15f60367b1..e91db0896cc 100644 --- a/sdk/lib/crt/libcntpr.cmake +++ b/sdk/lib/crt/libcntpr.cmake @@ -240,7 +240,7 @@ endif() set_source_files_properties(${LIBCNTPR_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "NO_RTL_INLINES;_NTSYSTEM_;_NTDLLBUILD_;_LIBCNT_;__CRT__NO_INLINE;CRTDLL") add_asm_files(libcntpr_asm ${LIBCNTPR_ASM_SOURCE}) -add_library(libcntpr ${LIBCNTPR_SOURCE} ${libcntpr_asm}) +add_library(libcntpr STATIC ${LIBCNTPR_SOURCE} ${libcntpr_asm}) target_compile_definitions(libcntpr PRIVATENO_RTL_INLINES _NTSYSTEM_
[ros-diffs] [reactos] 10/14: [BOOTMGFW] Explicitly disable NX compatibility
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0d811c2d1cfa8995b7a66225061ec8238392df4f commit 0d811c2d1cfa8995b7a66225061ec8238392df4f Author: Jérôme Gardou AuthorDate: Wed Feb 3 17:16:05 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [BOOTMGFW] Explicitly disable NX compatibility CORE-17423 --- boot/environ/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/environ/CMakeLists.txt b/boot/environ/CMakeLists.txt index 9c4d5dcd96f..bc4e21ee4a0 100644 --- a/boot/environ/CMakeLists.txt +++ b/boot/environ/CMakeLists.txt @@ -85,7 +85,7 @@ if(MSVC) if(ARCH STREQUAL "arm") add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER") else() -add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER /DYNAMICBASE:NO /FIXED") +add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER /DYNAMICBASE:NO /NXCOMPAT:NO /FIXED") endif() else() add_target_link_flags(bootmgfw "-Wl,--strip-all,--exclude-all-symbols")
[ros-diffs] [reactos] 11/14: [FREELDR] Use decimal numbers for section & file alignment
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e7f08b3e30fdabe05686a693d87d97d8eb4642b6 commit e7f08b3e30fdabe05686a693d87d97d8eb4642b6 Author: Jérôme Gardou AuthorDate: Wed Feb 3 17:20:41 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [FREELDR] Use decimal numbers for section & file alignment CORE-17423 --- boot/freeldr/freeldr/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt index f4610d4c12f..f7fee2be3d0 100644 --- a/boot/freeldr/freeldr/CMakeLists.txt +++ b/boot/freeldr/freeldr/CMakeLists.txt @@ -282,9 +282,9 @@ if(MSVC) add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER") add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER") else() -add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:0x200 /ALIGN:0x200") +add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:512 /ALIGN:512") add_linker_script(freeldr_pe freeldr_i386.msvc.lds) -add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:0x200 /ALIGN:0x200") +add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:512 /ALIGN:512") add_linker_script(freeldr_pe_dbg freeldr_i386.msvc.lds) endif() # We don't need hotpatching
[ros-diffs] [reactos] 12/14: [CMAKE] Define _SBCS when using VS generator
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5d1ecc7575e899b1a35466fc130e4b104fb8e755 commit 5d1ecc7575e899b1a35466fc130e4b104fb8e755 Author: Jérôme Gardou AuthorDate: Wed Feb 3 18:35:12 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [CMAKE] Define _SBCS when using VS generator CORE-17423 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcd92b5512a..57fe94a8a5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,9 +127,10 @@ else() # Print build type message("-- Build Type: ${CMAKE_BUILD_TYPE}") -# Always add /MT in VS CMAKE_GENERATOR +# Always add /MT in VS CMAKE_GENERATOR and define _SBCS otherwise VS thinks it's a multi-byte or whatever project if (MSVC_IDE) add_compile_options("/MT") +add_compile_definitions(_SBCS) endif()
[ros-diffs] [reactos] 13/14: [FREELDR] Use target_link_options instead of add_target_link_flags
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1ea6157cbfb7f6c613c589eaf6f6b01f71f14f08 commit 1ea6157cbfb7f6c613c589eaf6f6b01f71f14f08 Author: Jérôme Gardou AuthorDate: Wed Feb 3 20:07:57 2021 +0100 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 [FREELDR] Use target_link_options instead of add_target_link_flags CORE-17423 --- boot/freeldr/freeldr/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt index f7fee2be3d0..3d30e2ea362 100644 --- a/boot/freeldr/freeldr/CMakeLists.txt +++ b/boot/freeldr/freeldr/CMakeLists.txt @@ -282,9 +282,9 @@ if(MSVC) add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER") add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER") else() -add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:512 /ALIGN:512") +target_link_options(freeldr_pe PRIVATE /ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:512 /ALIGN:512) add_linker_script(freeldr_pe freeldr_i386.msvc.lds) -add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:512 /ALIGN:512") +target_link_options(freeldr_pe_dbg PRIVATE /ignore:4078 /ignore:4254 /DRIVER /DYNAMICBASE:NO /FIXED /FILEALIGN:512 /ALIGN:512) add_linker_script(freeldr_pe_dbg freeldr_i386.msvc.lds) endif() # We don't need hotpatching
[ros-diffs] [reactos] 14/14: this seem to be the only combination which works on msbuild-msvc
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f82eb0fede4c3d93fde6122aafe0dd50600126fb commit f82eb0fede4c3d93fde6122aafe0dd50600126fb Author: Victor Perevertkin AuthorDate: Wed Mar 3 05:00:33 2021 +0300 Commit: Jérôme Gardou CommitDate: Wed Mar 3 08:34:32 2021 +0100 this seem to be the only combination which works on msbuild-msvc --- boot/freeldr/freeldr/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt index 3d30e2ea362..980265dd54a 100644 --- a/boot/freeldr/freeldr/CMakeLists.txt +++ b/boot/freeldr/freeldr/CMakeLists.txt @@ -282,9 +282,9 @@ if(MSVC) add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER") add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER") else() -target_link_options(freeldr_pe PRIVATE /ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:512 /ALIGN:512) +target_link_options(freeldr_pe PRIVATE /ignore:4078 /ignore:4254 /DYNAMICBASE:NO /FIXED /FILEALIGN:512 /ALIGN:512) add_linker_script(freeldr_pe freeldr_i386.msvc.lds) -target_link_options(freeldr_pe_dbg PRIVATE /ignore:4078 /ignore:4254 /DRIVER /DYNAMICBASE:NO /FIXED /FILEALIGN:512 /ALIGN:512) +target_link_options(freeldr_pe_dbg PRIVATE /ignore:4078 /ignore:4254 /DYNAMICBASE:NO /FIXED /FILEALIGN:512 /ALIGN:512) add_linker_script(freeldr_pe_dbg freeldr_i386.msvc.lds) endif() # We don't need hotpatching