[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(); ok_hex(Status, STATUS_SUCCESS);
[ros-diffs] [reactos] 01/01: [KERNEL32] Align the PROCESS_PRIORITY_CLASS variable in GetPriorityClass on a 4-byte boundary.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fd8080b0942e88502ca1735a0590f31e6d072e32 commit fd8080b0942e88502ca1735a0590f31e6d072e32 Author: Colin Finck AuthorDate: Sat Feb 20 17:13:38 2021 +0100 Commit: Colin Finck CommitDate: Sat Feb 20 17:13:38 2021 +0100 [KERNEL32] Align the PROCESS_PRIORITY_CLASS variable in GetPriorityClass on a 4-byte boundary. Fixes CORE-16757. This is required for NtQueryInformationProcess as proven by my test application in the bug report. --- dll/win32/kernel32/client/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/kernel32/client/proc.c b/dll/win32/kernel32/client/proc.c index e107c19b029..3b7d6f05ec5 100644 --- a/dll/win32/kernel32/client/proc.c +++ b/dll/win32/kernel32/client/proc.c @@ -1658,7 +1658,7 @@ WINAPI GetPriorityClass(IN HANDLE hProcess) { NTSTATUS Status; -PROCESS_PRIORITY_CLASS PriorityClass; +PROCESS_PRIORITY_CLASS DECLSPEC_ALIGN(4) PriorityClass; /* Query the kernel */ Status = NtQueryInformationProcess(hProcess,
[ros-diffs] [reactos] 05/05: [SYSDM] Increase label width for all languages
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1509f0e5366a99678e2944b969c6287a1d819e8f commit 1509f0e5366a99678e2944b969c6287a1d819e8f Author: Colin Finck AuthorDate: Sun Jan 31 18:42:55 2021 +0100 Commit: Colin Finck CommitDate: Mon Feb 1 07:32:14 2021 +0100 [SYSDM] Increase label width for all languages --- dll/cpl/sysdm/lang/bg-BG.rc | 6 +++--- dll/cpl/sysdm/lang/cs-CZ.rc | 6 +++--- dll/cpl/sysdm/lang/da-DK.rc | 6 +++--- dll/cpl/sysdm/lang/de-DE.rc | 6 +++--- dll/cpl/sysdm/lang/el-GR.rc | 6 +++--- dll/cpl/sysdm/lang/en-US.rc | 6 +++--- dll/cpl/sysdm/lang/es-ES.rc | 6 +++--- dll/cpl/sysdm/lang/fr-FR.rc | 6 +++--- dll/cpl/sysdm/lang/he-IL.rc | 6 +++--- dll/cpl/sysdm/lang/hu-HU.rc | 6 +++--- dll/cpl/sysdm/lang/id-ID.rc | 6 +++--- dll/cpl/sysdm/lang/it-IT.rc | 6 +++--- dll/cpl/sysdm/lang/ja-JP.rc | 6 +++--- dll/cpl/sysdm/lang/nl-NL.rc | 6 +++--- dll/cpl/sysdm/lang/no-NO.rc | 6 +++--- dll/cpl/sysdm/lang/pl-PL.rc | 6 +++--- dll/cpl/sysdm/lang/pt-PT.rc | 6 +++--- dll/cpl/sysdm/lang/ro-RO.rc | 6 +++--- dll/cpl/sysdm/lang/ru-RU.rc | 6 +++--- dll/cpl/sysdm/lang/sk-SK.rc | 6 +++--- dll/cpl/sysdm/lang/sq-AL.rc | 6 +++--- dll/cpl/sysdm/lang/sv-SE.rc | 6 +++--- dll/cpl/sysdm/lang/tr-TR.rc | 6 +++--- dll/cpl/sysdm/lang/uk-UA.rc | 6 +++--- dll/cpl/sysdm/lang/zh-CN.rc | 6 +++--- dll/cpl/sysdm/lang/zh-TW.rc | 6 +++--- 26 files changed, 78 insertions(+), 78 deletions(-) diff --git a/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc index ca152c9f09f..c32102725a3 100644 --- a/dll/cpl/sysdm/lang/bg-BG.rc +++ b/dll/cpl/sysdm/lang/bg-BG.rc @@ -6,13 +6,13 @@ CAPTION "Общи" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111 -LTEXT "Уредба:", IDC_STATIC, 4, 116, 32, 9 +LTEXT "Уредба:", IDC_STATIC, 4, 116, 100, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Версия:", IDC_ROSVERSION, 10, 137, 131, 9 LTEXT KERNEL_VERSION_REVISION_RC, IDC_STATIC, 10, 146, 110, 9 -LTEXT "System Uptime:", IDC_STATIC, 4, 161, 86, 9 +LTEXT "System Uptime:", IDC_STATIC, 4, 161, 100, 9 LTEXT "", IDC_UPTIME, 10, 173, 116, 9 -LTEXT "Машина:", IDC_STATIC, 124, 116, 34, 9 +LTEXT "Машина:", IDC_STATIC, 124, 116, 100, 9 LTEXT "", IDC_MACHINELINE1, 130, 128, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 137, 118, 9 LTEXT "", IDC_MACHINELINE3, 130, 146, 118, 9 diff --git a/dll/cpl/sysdm/lang/cs-CZ.rc b/dll/cpl/sysdm/lang/cs-CZ.rc index aa3ed92642d..d16ee52ff83 100644 --- a/dll/cpl/sysdm/lang/cs-CZ.rc +++ b/dll/cpl/sysdm/lang/cs-CZ.rc @@ -11,13 +11,13 @@ CAPTION "Obecné" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111 -LTEXT "Systém:", IDC_STATIC, 4, 116, 32, 9 +LTEXT "Systém:", IDC_STATIC, 4, 116, 100, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Verze", IDC_ROSVERSION, 10, 137, 116, 9 LTEXT KERNEL_VERSION_REVISION_RC, IDC_STATIC, 10, 146, 110, 9 -LTEXT "System Uptime:", IDC_STATIC, 4, 161, 86, 9 +LTEXT "System Uptime:", IDC_STATIC, 4, 161, 100, 9 LTEXT "", IDC_UPTIME, 10, 173, 116, 9 -LTEXT "Počítač:", IDC_STATIC, 124, 116, 34, 9 +LTEXT "Počítač:", IDC_STATIC, 124, 116, 100, 9 LTEXT "", IDC_MACHINELINE1, 130, 128, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 137, 118, 9 LTEXT "", IDC_MACHINELINE3, 130, 146, 118, 9 diff --git a/dll/cpl/sysdm/lang/da-DK.rc b/dll/cpl/sysdm/lang/da-DK.rc index 5a11815708d..4ead9c8f275 100644 --- a/dll/cpl/sysdm/lang/da-DK.rc +++ b/dll/cpl/sysdm/lang/da-DK.rc @@ -6,13 +6,13 @@ CAPTION "Generelt" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111 -LTEXT "Operativsystem:", IDC_STATIC, 4, 116, 32, 9 +LTEXT "Operativsystem:", IDC_STATIC, 4, 116, 100, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Version", IDC_ROSVERSION, 10, 137, 116, 9 LTEXT KERNEL_VERSION_REVISION_RC, IDC_STATIC, 10, 146, 110, 9 -LTEXT "System Uptime:", IDC_STATIC, 4, 161, 86, 9 +LTEXT "System Uptime:", IDC_STATIC, 4, 161, 100, 9 LTEXT "", IDC_UPTIME, 10, 173, 116, 9 -LTEXT "Machine:", IDC_STATIC, 124, 116, 34, 9 +LTEXT "Machine:", IDC_STATIC, 124, 116, 100, 9 LTEXT "", IDC_MACHINELINE1, 130, 128, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 137, 118, 9 LTEXT "", IDC_MACHINELINE3, 130, 146, 118, 9 diff --git a/dll/cpl/sysdm/lang/de-DE.rc b/dll/cpl/sysdm/l
[ros-diffs] [reactos] 04/05: [SYSDM] Introduce KERNEL_VERSION_REVISION_RC and align system uptime string
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=50a01ed170c146fa4c46897b5032cdb4ee15fa98 commit 50a01ed170c146fa4c46897b5032cdb4ee15fa98 Author: Colin Finck AuthorDate: Sun Jan 31 18:33:17 2021 +0100 Commit: Colin Finck CommitDate: Mon Feb 1 07:32:14 2021 +0100 [SYSDM] Introduce KERNEL_VERSION_REVISION_RC and align system uptime string --- dll/cpl/sysdm/lang/bg-BG.rc | 6 +++--- dll/cpl/sysdm/lang/cs-CZ.rc | 6 +++--- dll/cpl/sysdm/lang/da-DK.rc | 6 +++--- dll/cpl/sysdm/lang/de-DE.rc | 6 +++--- dll/cpl/sysdm/lang/el-GR.rc | 6 +++--- dll/cpl/sysdm/lang/en-US.rc | 6 +++--- dll/cpl/sysdm/lang/es-ES.rc | 6 +++--- dll/cpl/sysdm/lang/fr-FR.rc | 6 +++--- dll/cpl/sysdm/lang/he-IL.rc | 6 +++--- dll/cpl/sysdm/lang/hu-HU.rc | 6 +++--- dll/cpl/sysdm/lang/id-ID.rc | 6 +++--- dll/cpl/sysdm/lang/it-IT.rc | 6 +++--- dll/cpl/sysdm/lang/ja-JP.rc | 7 --- dll/cpl/sysdm/lang/nl-NL.rc | 6 +++--- dll/cpl/sysdm/lang/no-NO.rc | 6 +++--- dll/cpl/sysdm/lang/pl-PL.rc | 6 +++--- dll/cpl/sysdm/lang/pt-PT.rc | 6 +++--- dll/cpl/sysdm/lang/ro-RO.rc | 6 +++--- dll/cpl/sysdm/lang/ru-RU.rc | 6 +++--- dll/cpl/sysdm/lang/sk-SK.rc | 6 +++--- dll/cpl/sysdm/lang/sq-AL.rc | 6 +++--- dll/cpl/sysdm/lang/sv-SE.rc | 6 +++--- dll/cpl/sysdm/lang/tr-TR.rc | 6 +++--- dll/cpl/sysdm/lang/uk-UA.rc | 6 +++--- dll/cpl/sysdm/lang/zh-CN.rc | 6 +++--- dll/cpl/sysdm/lang/zh-TW.rc | 6 +++--- sdk/include/reactos/buildno.h.cmake | 3 +++ 27 files changed, 82 insertions(+), 78 deletions(-) diff --git a/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc index 655ec8e37ab..ca152c9f09f 100644 --- a/dll/cpl/sysdm/lang/bg-BG.rc +++ b/dll/cpl/sysdm/lang/bg-BG.rc @@ -9,9 +9,9 @@ BEGIN LTEXT "Уредба:", IDC_STATIC, 4, 116, 32, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Версия:", IDC_ROSVERSION, 10, 137, 131, 9 -LTEXT REACTOS_STR_PRODUCT_BUILD, IDC_STATIC, 10, 146, 110, 9 -LTEXT "System Uptime:", IDC_STATIC, 4, 158, 86, 9 -LTEXT "", IDC_UPTIME, 10, 170, 116, 9 +LTEXT KERNEL_VERSION_REVISION_RC, IDC_STATIC, 10, 146, 110, 9 +LTEXT "System Uptime:", IDC_STATIC, 4, 161, 86, 9 +LTEXT "", IDC_UPTIME, 10, 173, 116, 9 LTEXT "Машина:", IDC_STATIC, 124, 116, 34, 9 LTEXT "", IDC_MACHINELINE1, 130, 128, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 137, 118, 9 diff --git a/dll/cpl/sysdm/lang/cs-CZ.rc b/dll/cpl/sysdm/lang/cs-CZ.rc index 062c435ccdb..aa3ed92642d 100644 --- a/dll/cpl/sysdm/lang/cs-CZ.rc +++ b/dll/cpl/sysdm/lang/cs-CZ.rc @@ -14,9 +14,9 @@ BEGIN LTEXT "Systém:", IDC_STATIC, 4, 116, 32, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Verze", IDC_ROSVERSION, 10, 137, 116, 9 -LTEXT REACTOS_STR_PRODUCT_BUILD, IDC_STATIC, 10, 146, 110, 9 -LTEXT "System Uptime:", IDC_STATIC, 4, 158, 86, 9 -LTEXT "", IDC_UPTIME, 10, 170, 116, 9 +LTEXT KERNEL_VERSION_REVISION_RC, IDC_STATIC, 10, 146, 110, 9 +LTEXT "System Uptime:", IDC_STATIC, 4, 161, 86, 9 +LTEXT "", IDC_UPTIME, 10, 173, 116, 9 LTEXT "Počítač:", IDC_STATIC, 124, 116, 34, 9 LTEXT "", IDC_MACHINELINE1, 130, 128, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 137, 118, 9 diff --git a/dll/cpl/sysdm/lang/da-DK.rc b/dll/cpl/sysdm/lang/da-DK.rc index db2e1aac3e3..5a11815708d 100644 --- a/dll/cpl/sysdm/lang/da-DK.rc +++ b/dll/cpl/sysdm/lang/da-DK.rc @@ -9,9 +9,9 @@ BEGIN LTEXT "Operativsystem:", IDC_STATIC, 4, 116, 32, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Version", IDC_ROSVERSION, 10, 137, 116, 9 -LTEXT REACTOS_STR_PRODUCT_BUILD, IDC_STATIC, 10, 146, 110, 9 -LTEXT "System Uptime:", IDC_STATIC, 4, 158, 86, 9 -LTEXT "", IDC_UPTIME, 10, 170, 116, 9 +LTEXT KERNEL_VERSION_REVISION_RC, IDC_STATIC, 10, 146, 110, 9 +LTEXT "System Uptime:", IDC_STATIC, 4, 161, 86, 9 +LTEXT "", IDC_UPTIME, 10, 173, 116, 9 LTEXT "Machine:", IDC_STATIC, 124, 116, 34, 9 LTEXT "", IDC_MACHINELINE1, 130, 128, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 137, 118, 9 diff --git a/dll/cpl/sysdm/lang/de-DE.rc b/dll/cpl/sysdm/lang/de-DE.rc index 411efd0cd8a..56f71c185a9 100644 --- a/dll/cpl/sysdm/lang/de-DE.rc +++ b/dll/cpl/sysdm/lang/de-DE.rc @@ -18,9 +18,9 @@ BEGIN LTEXT "System:", IDC_STATIC, 4, 116, 32, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Version", IDC_ROSVERSION, 10, 137, 116, 9 -LTEXT REACTOS_STR_PRODUCT_BUILD, IDC_STATIC, 10, 146, 110, 9 -LTEXT "
[ros-diffs] [reactos] 03/05: [SYSDM] Move IDS_DEVS to the LANG_NEUTRAL resources to deduplicate it.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=39b66430300316726b8fce4bea1f6a02d444766c commit 39b66430300316726b8fce4bea1f6a02d444766c Author: Colin Finck AuthorDate: Sun Jan 31 08:24:26 2021 +0100 Commit: Colin Finck CommitDate: Mon Feb 1 07:32:14 2021 +0100 [SYSDM] Move IDS_DEVS to the LANG_NEUTRAL resources to deduplicate it. It should still be updated at some point, maybe automatically, but this should serve us well for the moment. Use UTF-8 for the deduplicated string. --- dll/cpl/sysdm/lang/bg-BG.rc | 1 - dll/cpl/sysdm/lang/cs-CZ.rc | 1 - dll/cpl/sysdm/lang/da-DK.rc | 1 - dll/cpl/sysdm/lang/de-DE.rc | 1 - dll/cpl/sysdm/lang/el-GR.rc | 1 - dll/cpl/sysdm/lang/en-US.rc | 1 - dll/cpl/sysdm/lang/es-ES.rc | 1 - dll/cpl/sysdm/lang/fr-FR.rc | 1 - dll/cpl/sysdm/lang/he-IL.rc | 1 - dll/cpl/sysdm/lang/hu-HU.rc | 1 - dll/cpl/sysdm/lang/id-ID.rc | 1 - dll/cpl/sysdm/lang/it-IT.rc | 1 - dll/cpl/sysdm/lang/ja-JP.rc | 1 - dll/cpl/sysdm/lang/nl-NL.rc | 1 - dll/cpl/sysdm/lang/no-NO.rc | 1 - dll/cpl/sysdm/lang/pl-PL.rc | 1 - dll/cpl/sysdm/lang/pt-PT.rc | 1 - dll/cpl/sysdm/lang/ro-RO.rc | 1 - dll/cpl/sysdm/lang/ru-RU.rc | 1 - dll/cpl/sysdm/lang/sk-SK.rc | 1 - dll/cpl/sysdm/lang/sq-AL.rc | 1 - dll/cpl/sysdm/lang/sv-SE.rc | 1 - dll/cpl/sysdm/lang/tr-TR.rc | 1 - dll/cpl/sysdm/lang/uk-UA.rc | 1 - dll/cpl/sysdm/lang/zh-CN.rc | 1 - dll/cpl/sysdm/lang/zh-TW.rc | 1 - dll/cpl/sysdm/sysdm.rc | 5 + 27 files changed, 5 insertions(+), 26 deletions(-) diff --git a/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc index ee8647e713b..655ec8e37ab 100644 --- a/dll/cpl/sysdm/lang/bg-BG.rc +++ b/dll/cpl/sysdm/lang/bg-BG.rc @@ -339,7 +339,6 @@ BEGIN IDS_PAGEFILE_NONE "Няма" IDS_PAGEFILE_SYSTEM "System Managed" IDS_INFOREBOOT "You have to reboot the computer in order to apply the changes." -IDS_DEVS "\nReactOS Team\n\nProject Coordinator\n\nAleksey Bragin\n\nDevelopment Team\n\nAleksandar Andrejevic\nAleksey Bragin\nAlexander Shaposhnikov\nAmine Khaldi\nAndrew Greenwood\nAndrey Korotaev\nArt Yerkes\nBenedikt Freisen\nCameron Gutman\nChristoph von Wittich\nColin Finck\nDaniel Reimer\nDavid Quintana\nDmitry Chapyshev\nEric Kohl\nGed Murphy\nGiannis Adamopoulos\nGregor Brunmar\nHermès Bélusca-Maïto\nHervé Poussineau\nJames Tabor\nJeffrey Morlan\nJérôme Gardou\nJohannes And [...] IDS_HWPROFILE_CONFIRM_DELETE_TITLE "Confirm Profile Delete" IDS_HWPROFILE_CONFIRM_DELETE "Are you sure you want to delete the hardware profile ""%s""?" IDS_HWPROFILE_ALREADY_IN_USE "The profile name is already in use." diff --git a/dll/cpl/sysdm/lang/cs-CZ.rc b/dll/cpl/sysdm/lang/cs-CZ.rc index a87f40e9c72..062c435ccdb 100644 --- a/dll/cpl/sysdm/lang/cs-CZ.rc +++ b/dll/cpl/sysdm/lang/cs-CZ.rc @@ -344,7 +344,6 @@ BEGIN IDS_PAGEFILE_NONE "Není" IDS_PAGEFILE_SYSTEM "Spravováno systémem" IDS_INFOREBOOT "Změny se projeví po restartování počítače." -IDS_DEVS "\nTým ReactOS\n\nPKoordinátor\n\nAleksey Bragin\n\nVývojáři\n\nAleksandar Andrejevic\nAleksey Bragin\nAlexander Shaposhnikov\nAmine Khaldi\nAndrew Greenwood\nAndrey Korotaev\nArt Yerkes\nBenedikt Freisen\nCameron Gutman\nChristoph von Wittich\nColin Finck\nDaniel Reimer\nDavid Quintana\nDmitry Chapyshev\nEric Kohl\nGed Murphy\nGiannis Adamopoulos\nGregor Brunmar\nHermès Bélusca-Maïto\nHervé Poussineau\nJames Tabor\nJeffrey Morlan\nJérôme Gardou\nJohannes Anderwald\nKamil Ho [...] IDS_HWPROFILE_CONFIRM_DELETE_TITLE "Potvrďte smazání profilu" IDS_HWPROFILE_CONFIRM_DELETE "Opravdu chcete odstranit hardwarový profil ""%s""?" IDS_HWPROFILE_ALREADY_IN_USE "Zadané jméno profilu se již používá." diff --git a/dll/cpl/sysdm/lang/da-DK.rc b/dll/cpl/sysdm/lang/da-DK.rc index 0a9d6f3c862..db2e1aac3e3 100644 --- a/dll/cpl/sysdm/lang/da-DK.rc +++ b/dll/cpl/sysdm/lang/da-DK.rc @@ -339,7 +339,6 @@ BEGIN IDS_PAGEFILE_NONE "None" IDS_PAGEFILE_SYSTEM "System Managed" IDS_INFOREBOOT "You have to reboot the computer in order to apply the changes." -IDS_DEVS "\nReactOS Team\n\nProject Coordinator\n\nAleksey Bragin\n\nDevelopment Team\n\nAleksandar Andrejevic\nAleksey Bragin\nAlexander Shaposhnikov\nAmine Khaldi\nAndrew Greenwood\nAndrey Korotaev\nArt Yerkes\nBenedikt Freisen\nCameron Gutman\nChristoph von Wittich\nColin Finck\nDaniel Reimer\nDavid Quintana\nDmitry Chapyshev\nEric Kohl\nGed Murphy\nGiannis Adamopoulos\nGregor Brunmar\nHermès Bélusca-Maïto\nHervé Poussineau\nJames Tabor\nJeffrey Morlan\nJérôme Gardou\nJohannes And [...] IDS_HWPROFILE_CONFIRM_DELETE_TITLE "Confirm Profile Delete" IDS_HWPROFILE_CONFIRM_DELETE "Are you sure you want to delete the hardware profile ""%s""?" IDS_HWPR
[ros-diffs] [reactos] 02/05: [SYSDM] Restore actual fix from 9a0246ef650fb3dce09829a3f1201ca7f403b1f9
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1adbae9bae041a2b43f308cde1b1c4d22aacbc74 commit 1adbae9bae041a2b43f308cde1b1c4d22aacbc74 Author: Colin Finck AuthorDate: Sun Jan 31 08:26:29 2021 +0100 Commit: Colin Finck CommitDate: Mon Feb 1 07:32:14 2021 +0100 [SYSDM] Restore actual fix from 9a0246ef650fb3dce09829a3f1201ca7f403b1f9 --- dll/cpl/sysdm/lang/de-DE.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/cpl/sysdm/lang/de-DE.rc b/dll/cpl/sysdm/lang/de-DE.rc index b6800123402..954aef341c9 100644 --- a/dll/cpl/sysdm/lang/de-DE.rc +++ b/dll/cpl/sysdm/lang/de-DE.rc @@ -319,7 +319,7 @@ BEGIN IDS_PETABYTE "PB RAM" IDS_MEGAHERTZ "MHz" IDS_GIGAHERTZ "GHz" -IDS_UPTIME_FORMAT "%u Days, %02u:%02u:%02u" +IDS_UPTIME_FORMAT "%u Tage, %02u:%02u:%02u" IDS_VARIABLE "Variable" IDS_VALUE "Wert" IDS_NO_DUMP "(Keine)"
[ros-diffs] [reactos] 01/05: Revert "[SYSDM] Fix version string cutoff CORE-17429"
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c1356e8d47bc8d281362f2cbd721494e7fe25bb0 commit c1356e8d47bc8d281362f2cbd721494e7fe25bb0 Author: Colin Finck AuthorDate: Sun Jan 31 08:13:36 2021 +0100 Commit: Colin Finck CommitDate: Mon Feb 1 07:32:14 2021 +0100 Revert "[SYSDM] Fix version string cutoff CORE-17429" This reverts commit be2518704e2c3d8b21e2edb469bd622b17b61619. --- boot/bootdata/readme.txt | 81 ++-- dll/cpl/sysdm/general.c| 144 - dll/cpl/sysdm/lang/bg-BG.rc| 29 +++--- dll/cpl/sysdm/lang/cs-CZ.rc| 29 +++--- dll/cpl/sysdm/lang/da-DK.rc| 29 +++--- dll/cpl/sysdm/lang/de-DE.rc| 31 --- dll/cpl/sysdm/lang/el-GR.rc| 29 +++--- dll/cpl/sysdm/lang/en-US.rc| 29 +++--- dll/cpl/sysdm/lang/es-ES.rc| 29 +++--- dll/cpl/sysdm/lang/fr-FR.rc| 29 +++--- dll/cpl/sysdm/lang/he-IL.rc| 29 +++--- dll/cpl/sysdm/lang/hu-HU.rc| 29 +++--- dll/cpl/sysdm/lang/id-ID.rc| 29 +++--- dll/cpl/sysdm/lang/it-IT.rc| 29 +++--- dll/cpl/sysdm/lang/ja-JP.rc| 29 +++--- dll/cpl/sysdm/lang/nl-NL.rc| 29 +++--- dll/cpl/sysdm/lang/no-NO.rc| 29 +++--- dll/cpl/sysdm/lang/pl-PL.rc| 29 +++--- dll/cpl/sysdm/lang/pt-PT.rc| 29 +++--- dll/cpl/sysdm/lang/ro-RO.rc| 29 +++--- dll/cpl/sysdm/lang/ru-RU.rc| 29 +++--- dll/cpl/sysdm/lang/sk-SK.rc| 29 +++--- dll/cpl/sysdm/lang/sq-AL.rc| 29 +++--- dll/cpl/sysdm/lang/sv-SE.rc| 29 +++--- dll/cpl/sysdm/lang/tr-TR.rc| 29 +++--- dll/cpl/sysdm/lang/uk-UA.rc| 29 +++--- dll/cpl/sysdm/lang/zh-CN.rc| 29 +++--- dll/cpl/sysdm/lang/zh-TW.rc| 29 +++--- dll/cpl/sysdm/resource.h | 2 + dll/cpl/sysdm/resources/rosbitmap.bmp | Bin 38454 -> 152694 bytes dll/cpl/sysdm/resources/rosbitmap_mask.bmp | Bin 13878 -> 51958 bytes 31 files changed, 540 insertions(+), 443 deletions(-) diff --git a/boot/bootdata/readme.txt b/boot/bootdata/readme.txt index cb8d10902a4..cf8353a1a34 100644 --- a/boot/bootdata/readme.txt +++ b/boot/bootdata/readme.txt @@ -1,6 +1,6 @@ ReactOS™ Version 0.4.x -Updated January 20, 2021 +Updated August 31, 2016 1. What is ReactOS? @@ -70,77 +70,8 @@ In addition, the ReactOS forum: https://reactos.org/forum/ may contain complementary, yet non-official, information. -8. Authors and Credits --- - -Aleksandar Andrejevic -Aleksey Bragin -Alex Ionescu -Alexander Shaposhnikov -Amine Khaldi -Andrew Greenwood -Andrey Korotaev -Art Yerkes -Benedikt Freisen -Brandon Turner -Brian Palmer -Cameron Gutman -Casper Hornstrup -Christoph von Wittich -Colin Finck -Daniel Reimer -David Quintana -David Welch -Dmitry Chapyshev -Emanuele Aliberti -Eric Kohl -Filip Navara -Ged Murphy -Gé van Geldorp -Giannis Adamopoulos -Gregor Anich -Gregor Brunmar -Gunnar Dalsnes -Hermès Bélusca-Maïto -Hervé Poussineau -Jaix Bly -James Tabor -Jason Filby -Jeffrey Morlan -Jens Collin -Jérôme Gardou -Joachim Henze -Johannes Anderwald -Kamil Hornícek -Katayama Hirofumi MZ -KJK::Hyperion -Klemens Friedl -Maarten Bosma -Magnus Olsen -Marc Piulachs -Mark Jansen -Martin Fuchs -Matthias Kupfer -Michael Wirth -Mike Nordell -Mindflyer -Nathan Woods -Peter Hater -Peter Ward -Pierre Schweitzer -Rex Jolliff -Robert Dickenson -Royce Mitchell III -Saveliy Tretiakov -Stanislav Motylkov -Stefan Ginsberg -Sylvain Petreolle -Thomas Blümel -Thomas Faber -Timo Kreuzer -Vadim Galyant -Vizzini -Wierd_W -Z98 - -Further thanks go to all Contributors and the Wine Team +8. Authors +-- + +This document was originally written by Jason Filby (jasonfi...@yahoo.com) +and is now occasionally updated by various contributors. diff --git a/dll/cpl/sysdm/general.c b/dll/cpl/sysdm/general.c index 8d9187964a7..938cb820e8c 100644 --- a/dll/cpl/sysdm/general.c +++ b/dll/cpl/sysdm/general.c @@ -16,6 +16,9 @@ #include #include +#define ANIM_STEP 2 +#define ANIM_TIME 50 + typedef struct _IMGINFO { HBITMAP hBitmap; @@ -132,8 +135,135 @@ Cleanup: LRESULT CALLBACK RosImageProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { +static UINT timerid = 0, top = 0, offset; +static HBITMAP hCreditsBitmap; + switch (uMsg) { +case WM_LBUTTONDBLCLK: +if (wParam & (MK_CONTROL | MK_SHIFT)) +{ +if (timerid == 0) +{ +HDC hCreditsDC, hLogoDC; +HDC hDC = GetDC(NULL); +HFONT hFont = NULL; +NONCLIENTMETRICS ncm; +
[ros-diffs] [reactos] 01/01: [HAL] Remove duplicated IRQL mask tables
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=db7ee3a75677ccf6eb64ace153bed89fb2682511 commit db7ee3a75677ccf6eb64ace153bed89fb2682511 Author: Colin Finck AuthorDate: Fri May 15 23:46:22 2020 +0200 Commit: Colin Finck CommitDate: Fri May 15 23:46:22 2020 +0200 [HAL] Remove duplicated IRQL mask tables With the minimum Visual Studio version now being 2015, we no longer need to maintain two variants of the same code, and can stick to the commented and better understandable version. --- hal/halx86/up/pic.c | 70 - 1 file changed, 70 deletions(-) diff --git a/hal/halx86/up/pic.c b/hal/halx86/up/pic.c index e39f81a5493..2164d8c03b0 100644 --- a/hal/halx86/up/pic.c +++ b/hal/halx86/up/pic.c @@ -99,7 +99,6 @@ PHAL_DISMISS_INTERRUPT HalpSpecialDismissLevelTable[16] = /* This table contains the static x86 PIC mapping between IRQLs and IRQs */ ULONG KiI8259MaskTable[32] = { -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1900) /* * It Device IRQLs only start at 4 or higher, so these are just software * IRQLs that don't really change anything on the hardware @@ -176,46 +175,11 @@ ULONG KiI8259MaskTable[32] = 0b1011, /* IRQL 29 */ 0b1011, /* IRQL 30 */ 0b1011 /* IRQL 31 */ -#else -0, /* IRQL 0 */ -0, /* IRQL 1 */ -0, /* IRQL 2 */ -0, /* IRQL 3 */ -0xFF80,/* IRQL 4 */ -0xFFC0,/* IRQL 5 */ -0xFFE0,/* IRQL 6 */ -0xFFF0,/* IRQL 7 */ -0xFFF8,/* IRQL 8 */ -0xFFFC,/* IRQL 9 */ -0xFFFE,/* IRQL 10 */ -0x,/* IRQL 11 */ -0x8000,/* IRQL 12 */ -0xC000,/* IRQL 13 */ -0xE000,/* IRQL 14 */ -0xF000,/* IRQL 15 */ -0xF800,/* IRQL 16 */ -0xFC00,/* IRQL 17 */ -0xFE00,/* IRQL 18 */ -0xFE00,/* IRQL 19 */ -0xFE80,/* IRQL 20 */ -0xFEC0,/* IRQL 21 */ -0xFEE0,/* IRQL 22 */ -0xFEF0,/* IRQL 23 */ -0xFEF8,/* IRQL 24 */ -0xFEF8,/* IRQL 25 */ -0xFEFA,/* IRQL 26 */ -0xFFFA,/* IRQL 27 */ -0xFFFB,/* IRQL 28 */ -0xFFFB,/* IRQL 29 */ -0xFFFB,/* IRQL 30 */ -0xFFFB /* IRQL 31 */ -#endif }; /* This table indicates which IRQs, if pending, can preempt a given IRQL level */ ULONG FindHigherIrqlMask[32] = { -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1900) /* * Software IRQLs, at these levels all hardware interrupts can preempt. * Each higher IRQL simply enables which software IRQL can preempt the @@ -281,40 +245,6 @@ ULONG FindHigherIrqlMask[32] = 0b, /* IRQL 29 */ 0b, /* IRQL 30 */ 0b /* IRQL 31 */ -#else -0xFFFE, /* IRQL 0 */ -0xFFFC, /* IRQL 1 */ -0xFFF8, /* IRQL 2 */ -0xFFF0, /* IRQL 3 */ -0x7F0,/* IRQL 4 */ -0x3F0,/* IRQL 5 */ -0x1F0,/* IRQL 6 */ -0x0F0,/* IRQL 7 */ -0x70, /* IRQL 8 */ -0x30, /* IRQL 9 */ -0x10, /* IRQL 10 */ -0x00, /* IRQL 11 */ -0x7FFF0, /* IRQL 12 */ -0x3FFF0, /* IRQL 13 */ -0x1FFF0, /* IRQL 14 */ -0x0FFF0, /* IRQL 15 */ -0x7FF0, /* IRQL 16 */ -0x3FF0, /* IRQL 17 */ -0x1FF0, /* IRQL 18 */ -0x1FF0, /* IRQL 19 */ -0x17F0, /* IRQL 20 */ -0x13F0, /* IRQL 21 */ -0x11F0, /* IRQL 22 */ -0x10F0, /* IRQL 23 */ -0x1070, /* IRQL 24 */ -0x1030, /* IRQL 25 */ -0x1010, /* IRQL 26 */ -0x10,
[ros-diffs] [reactos] 01/01: [ROSAUTOTEST] Submit results to https://reactos.org:8443 instead of https://tlsv1.reactos.org
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7d1f270918338d0844db6f99ce0eba970931eda8 commit 7d1f270918338d0844db6f99ce0eba970931eda8 Author: Colin Finck AuthorDate: Sat Apr 4 20:34:41 2020 +0200 Commit: Colin Finck CommitDate: Sat Apr 4 20:35:58 2020 +0200 [ROSAUTOTEST] Submit results to https://reactos.org:8443 instead of https://tlsv1.reactos.org It is much easier server-side to maintain a different TLS configuration on another port rather than another subdomain. --- modules/rostests/rosautotest/CWebService.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/rostests/rosautotest/CWebService.cpp b/modules/rostests/rosautotest/CWebService.cpp index 2830e978435..85ead6d9135 100644 --- a/modules/rostests/rosautotest/CWebService.cpp +++ b/modules/rostests/rosautotest/CWebService.cpp @@ -7,7 +7,8 @@ #include "precomp.h" -static const WCHAR szHostname[] = L"tlsv1.reactos.org"; +static const WCHAR szHostname[] = L"reactos.org"; +static const INTERNET_PORT ServerPort = 8443; static const WCHAR szServerFile[] = L"testman/webservice/"; /** @@ -26,7 +27,7 @@ CWebService::CWebService() if(!m_hInet) FATAL("InternetOpenW failed\n"); -m_hHTTP = InternetConnectW(m_hInet, szHostname, INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); +m_hHTTP = InternetConnectW(m_hInet, szHostname, ServerPort, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); if(!m_hHTTP) FATAL("InternetConnectW failed\n");
[ros-diffs] [reactos] 01/01: [ROSAUTOTEST] Use tlsv1.reactos.org for submitting test results now that reactos.org is TLS 1.2+
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3c02749f92835ad0b730a8d2f278206fb4a27847 commit 3c02749f92835ad0b730a8d2f278206fb4a27847 Author: Colin Finck AuthorDate: Sat Apr 4 12:57:50 2020 +0200 Commit: Colin Finck CommitDate: Sat Apr 4 12:57:50 2020 +0200 [ROSAUTOTEST] Use tlsv1.reactos.org for submitting test results now that reactos.org is TLS 1.2+ We still need to be able to submit test results from Windows Server 2003, which supports TLS 1.0 only. --- modules/rostests/rosautotest/CWebService.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/rostests/rosautotest/CWebService.cpp b/modules/rostests/rosautotest/CWebService.cpp index 9edcebe7433..2830e978435 100644 --- a/modules/rostests/rosautotest/CWebService.cpp +++ b/modules/rostests/rosautotest/CWebService.cpp @@ -1,13 +1,13 @@ /* * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Class implementing the interface to the "testman" Web Service - * COPYRIGHT: Copyright 2009-2015 Colin Finck (co...@reactos.org) + * COPYRIGHT: Copyright 2009-2020 Colin Finck (co...@reactos.org) */ #include "precomp.h" -static const WCHAR szHostname[] = L"reactos.org"; +static const WCHAR szHostname[] = L"tlsv1.reactos.org"; static const WCHAR szServerFile[] = L"testman/webservice/"; /**
[ros-diffs] [reactos] 01/01: [GDI32] GdiConvertToDevmodeW: Import WINE commit 32393796bb534e9cf11dd988dce88722c67f7906 ("gdi32: GdiConvertToDevmodeW should not refer to unintialized name bytes.")
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5d8c39753e82e8e7f8db90a427b230ed248f0158 commit 5d8c39753e82e8e7f8db90a427b230ed248f0158 Author: Colin Finck AuthorDate: Mon Feb 24 19:17:56 2020 +0100 Commit: Colin Finck CommitDate: Mon Feb 24 19:17:56 2020 +0100 [GDI32] GdiConvertToDevmodeW: Import WINE commit 32393796bb534e9cf11dd988dce88722c67f7906 ("gdi32: GdiConvertToDevmodeW should not refer to unintialized name bytes.") This makes our GdiConvertToDevmodeW equivalent to the WINE counterpart again. --- win32ss/gdi/gdi32/misc/misc.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/win32ss/gdi/gdi32/misc/misc.c b/win32ss/gdi/gdi32/misc/misc.c index b31db63b9fa..04be375853f 100644 --- a/win32ss/gdi/gdi32/misc/misc.c +++ b/win32ss/gdi/gdi32/misc/misc.c @@ -962,6 +962,7 @@ bMakePathNameW(LPWSTR lpBuffer,LPCWSTR lpFileName,LPWSTR *lpFilePart,DWORD unkno /* * @implemented + * Synchronized with WINE dlls/gdi32/driver.c */ DEVMODEW * WINAPI @@ -986,15 +987,19 @@ GdiConvertToDevmodeW(const DEVMODEA *dmA) dmW = HeapAlloc(GetProcessHeap(), 0, dmW_size + dmA->dmDriverExtra); if (!dmW) return NULL; -MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmDeviceName, CCHDEVICENAME, -dmW->dmDeviceName, CCHDEVICENAME); +MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmDeviceName, -1, + dmW->dmDeviceName, CCHDEVICENAME); /* copy slightly more, to avoid long computations */ memcpy(>dmSpecVersion, >dmSpecVersion, dmA_size - CCHDEVICENAME); if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME) { -MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmFormName, CCHFORMNAME, -dmW->dmFormName, CCHFORMNAME); +if (dmA->dmFields & DM_FORMNAME) +MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmFormName, -1, + dmW->dmFormName, CCHFORMNAME); +else +dmW->dmFormName[0] = 0; + if (dmA_size > FIELD_OFFSET(DEVMODEA, dmLogPixels)) memcpy(>dmLogPixels, >dmLogPixels, dmA_size - FIELD_OFFSET(DEVMODEA, dmLogPixels)); }
[ros-diffs] [reactos] 01/01: Fix build
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8da7fbc704448a03610a5497a88f9dfada8be644 commit 8da7fbc704448a03610a5497a88f9dfada8be644 Author: Colin Finck AuthorDate: Wed Feb 12 19:59:23 2020 +0100 Commit: Colin Finck CommitDate: Wed Feb 12 19:59:23 2020 +0100 Fix build --- win32ss/printing/base/winspool/precomp.h | 1 + win32ss/printing/base/winspool/utils.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/win32ss/printing/base/winspool/precomp.h b/win32ss/printing/base/winspool/precomp.h index 2c8fe18bbd9..cae8bd320e8 100644 --- a/win32ss/printing/base/winspool/precomp.h +++ b/win32ss/printing/base/winspool/precomp.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/win32ss/printing/base/winspool/utils.c b/win32ss/printing/base/winspool/utils.c index 0ba5e274a5d..ae190ed5108 100644 --- a/win32ss/printing/base/winspool/utils.c +++ b/win32ss/printing/base/winspool/utils.c @@ -5,7 +5,7 @@ * COPYRIGHT: Copyright 2020 Doug Lyons (dougly...@douglyons.com) */ -#include +#include "precomp.h" BOOL UnicodeToAnsiInPlace(PWSTR pwszField) {
[ros-diffs] [reactos] 01/01: [FORMATTING] Fix indentation of winspool/printers.c
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=45f39ffc253012b2399dc1105bcb797caec6ae36 commit 45f39ffc253012b2399dc1105bcb797caec6ae36 Author: Colin Finck AuthorDate: Fri Jan 31 18:47:53 2020 +0100 Commit: Colin Finck CommitDate: Fri Jan 31 18:47:53 2020 +0100 [FORMATTING] Fix indentation of winspool/printers.c No code changes --- win32ss/printing/base/winspool/printers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32ss/printing/base/winspool/printers.c b/win32ss/printing/base/winspool/printers.c index a3ee6e69673..7fd34a40866 100644 --- a/win32ss/printing/base/winspool/printers.c +++ b/win32ss/printing/base/winspool/printers.c @@ -476,7 +476,7 @@ EnumPrintersA(DWORD Flags, PSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbB { SetLastError(ERROR_NOT_ENOUGH_MEMORY); ERR("HeapAlloc failed!\n"); - goto Cleanup; +goto Cleanup; } WideCharToMultiByte(CP_ACP, 0, ppi1w[i].pDescription, -1, pszDescription, cch + 1, NULL, NULL); @@ -538,7 +538,7 @@ EnumPrintersA(DWORD Flags, PSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbB { SetLastError(ERROR_NOT_ENOUGH_MEMORY); ERR("HeapAlloc failed!\n"); - goto Cleanup; +goto Cleanup; } WideCharToMultiByte(CP_ACP, 0, ppi2w[i].pServerName, -1, pszServerName, cch + 1, NULL, NULL); @@ -754,7 +754,7 @@ EnumPrintersA(DWORD Flags, PSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbB { SetLastError(ERROR_NOT_ENOUGH_MEMORY); ERR("HeapAlloc failed!\n"); - goto Cleanup; +goto Cleanup; } WideCharToMultiByte(CP_ACP, 0, ppi4w[i].pPrinterName, -1, pszPrinterName, cch + 1, NULL, NULL);
[ros-diffs] [reactos] 01/01: [CMAKE] Define HAVE_* constants unconditionally (follow-up to PR #2041) (#2052)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb0f16433b0012b84bc13c0a70afb4ee38f41d23 commit eb0f16433b0012b84bc13c0a70afb4ee38f41d23 Author: Colin Finck AuthorDate: Mon Nov 18 18:57:35 2019 +0100 Commit: GitHub CommitDate: Mon Nov 18 18:57:35 2019 +0100 [CMAKE] Define HAVE_* constants unconditionally (follow-up to PR #2041) (#2052) sys/types.h is guaranteed to be available on all our supported host platforms and always contains a pid_t definition. --- sdk/include/host/CMakeLists.txt| 18 +- sdk/include/host/{config.h.in => config.h} | 5 +++-- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/sdk/include/host/CMakeLists.txt b/sdk/include/host/CMakeLists.txt index 216e0120bdb..651367404a3 100644 --- a/sdk/include/host/CMakeLists.txt +++ b/sdk/include/host/CMakeLists.txt @@ -1,19 +1,3 @@ -include(CheckIncludeFile) -include(CheckTypeSize) - -# check for -CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) - -# check for pid_t definition -if (HAVE_SYS_TYPES_H) -set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h") -#this sets HAVE_PID_T -CHECK_TYPE_SIZE("pid_t" PID_T) -unset(CMAKE_EXTRA_INCLUDE_FILES) -endif() - -configure_file(config.h.in config.h @ONLY) - add_library(host_includes INTERFACE) -target_include_directories(host_includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(host_includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/sdk/include/host/config.h.in b/sdk/include/host/config.h similarity index 97% rename from sdk/include/host/config.h.in rename to sdk/include/host/config.h index 5ba4eaa7460..4da9f3baa59 100644 --- a/sdk/include/host/config.h.in +++ b/sdk/include/host/config.h @@ -4,11 +4,12 @@ #define __WINE_CONFIG_H /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ +#define HAVE_SYS_TYPES_H 1 /* Define to 1 if the system has the type `pid_t'. */ -#cmakedefine HAVE_PID_T 1 +#define HAVE_PID_T 1 +/* Define to 1 if you have the `spawnvp' function. */ #define HAVE_SPAWNVP 1 /* Define to 1 if you have the `z' library (-lz). */
[ros-diffs] [reactos] 04/04: Fix the ntstrsafe.h tests to make sense, actually succeed using ntstrsafe.h from Win10 (10.0.15063), and fix ReactOS' ntstrsafe.h to also pass these tests. (#1859)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c8681feee94bf0e31dfb3f065fef432fa4eb39b6 commit c8681feee94bf0e31dfb3f065fef432fa4eb39b6 Author: Colin Finck AuthorDate: Wed Aug 28 22:42:52 2019 +0200 Commit: Colin Finck CommitDate: Wed Aug 28 22:42:52 2019 +0200 Fix the ntstrsafe.h tests to make sense, actually succeed using ntstrsafe.h from Win10 (10.0.15063), and fix ReactOS' ntstrsafe.h to also pass these tests. (#1859) --- modules/rostests/kmtests/rtl/RtlStrSafe.c | 262 +++--- sdk/include/ddk/ntstrsafe.h | 112 + 2 files changed, 171 insertions(+), 203 deletions(-) diff --git a/modules/rostests/kmtests/rtl/RtlStrSafe.c b/modules/rostests/kmtests/rtl/RtlStrSafe.c index 807a036b2a7..82c2fe512cc 100644 --- a/modules/rostests/kmtests/rtl/RtlStrSafe.c +++ b/modules/rostests/kmtests/rtl/RtlStrSafe.c @@ -1,8 +1,9 @@ /* * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Test for ntstrsafe.h functions * COPYRIGHT: Copyright 2018 Hern�n Di Pietro + * Copyright 2019 Colin Finck */ #define KMT_EMULATE_KERNEL @@ -13,163 +14,168 @@ #define TESTAPI static void +static const WCHAR FormatStringInts[] = L"%d %d %d"; +static const WCHAR FormatStringIntsResult[] = L"1 2 3"; +static const WCHAR FormatStringStrs[] = L"%s %s %s"; + + TESTAPI Test_RtlUnicodeStringPrintf() { -WCHAR Buffer[1024]; -WCHAR OvrBuffer[1024]; -WCHAR BufferSmall[2]; -WCHAR BufferSmall2[7]; +NTSTATUS Status; +PWSTR pBuffer = NULL; +size_t BufferSize; +size_t EqualBytes; UNICODE_STRING UsString; -const WCHAR FormatStringInts[] = L"%d %d %d"; -const WCHAR FormatStringStrs[] = L"%s %s %s"; -const WCHAR Result[] = L"1 2 3"; -UNICODE_STRING UsStringNull; -/* No zeros (Don't assume UNICODE_STRINGS are NULL terminated) */ - -RtlFillMemory(Buffer, sizeof(Buffer), 0xAA); -RtlFillMemory(BufferSmall, sizeof(BufferSmall), 0xAA); -RtlFillMemory(BufferSmall2, sizeof(BufferSmall2), 0xAA); +KmtStartSeh(); /* STATUS_SUCCESS test */ +BufferSize = 6 * sizeof(WCHAR); +pBuffer = KmtAllocateGuarded(BufferSize); +if (!pBuffer) +goto Cleanup; + +RtlFillMemory(pBuffer, BufferSize, 0xAA); +RtlInitEmptyUnicodeString(, pBuffer, BufferSize); + +Status = RtlUnicodeStringPrintf(, FormatStringInts, 1, 2, 3); +EqualBytes = RtlCompareMemory(UsString.Buffer, FormatStringIntsResult, sizeof(FormatStringIntsResult)); +ok_eq_hex(Status, STATUS_SUCCESS); +ok_eq_size(EqualBytes, sizeof(FormatStringIntsResult)); +ok_eq_uint(UsString.Length, sizeof(FormatStringIntsResult) - sizeof(WCHAR)); +ok_eq_uint(UsString.MaximumLength, BufferSize); + +KmtFreeGuarded(pBuffer); +pBuffer = NULL; -UsString.Buffer = Buffer; -UsString.Length = 0; -UsString.MaximumLength = sizeof(Buffer); - -ok_eq_hex(RtlUnicodeStringPrintf(, FormatStringInts, 1, 2, 3), STATUS_SUCCESS); -ok_eq_uint(UsString.Length, sizeof(Result) - sizeof(WCHAR)); -ok_eq_uint(UsString.MaximumLength, sizeof(Buffer)); -ok_eq_wchar(UsString.Buffer[0], L'1'); -ok_eq_wchar(UsString.Buffer[1], L' '); -ok_eq_wchar(UsString.Buffer[2], L'2'); -ok_eq_wchar(UsString.Buffer[3], L' '); -ok_eq_wchar(UsString.Buffer[4], L'3'); -ok_eq_wchar(UsString.Buffer[5], (WCHAR) 0); - /* STATUS_BUFFER_OVERFLOW tests */ +BufferSize = 2 * sizeof(WCHAR); +pBuffer = KmtAllocateGuarded(BufferSize); +if (!pBuffer) +goto Cleanup; -UsString.Buffer = BufferSmall; -UsString.Length = 0; -UsString.MaximumLength = sizeof(BufferSmall); - -ok_eq_hex(RtlUnicodeStringPrintf(, FormatStringStrs, L"AAA", L"BBB", L"CCC"), STATUS_BUFFER_OVERFLOW); +RtlInitEmptyUnicodeString(, pBuffer, BufferSize); + +Status = RtlUnicodeStringPrintf(, FormatStringStrs, L"AAA", L"BBB", L"CCC"); +EqualBytes = RtlCompareMemory(UsString.Buffer, L"AA", BufferSize); +ok_eq_hex(Status, STATUS_BUFFER_OVERFLOW); +ok_eq_size(EqualBytes, BufferSize); ok_eq_uint(UsString.Length, UsString.MaximumLength); -ok_eq_char(UsString.Buffer[0], L'A'); -ok_eq_char(UsString.Buffer[1], (WCHAR)0); -UsString.Buffer = BufferSmall2; -UsString.Length = 0; -UsString.MaximumLength = sizeof(BufferSmall2); +KmtFreeGuarded(pBuffer); +pBuffer = NULL; + -ok_eq_hex(RtlUnicodeStringPrintf(, FormatStringStrs, L"0123", L"4567", L"89AB"), STATUS_BUFFER_OVERFLOW); +BufferSize = 7 * sizeof(WCHAR); +pBuffer = KmtAllocateGuarded(BufferSize); +if (!pBuffer) +goto Cleanup;
[ros-diffs] [reactos] 02/04: [FORMATTING] Restore some kind of style to ntstrsafe.h, considering all comments in PR #522 and #523.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=331e3312095cc97feb9866155352d19847c8a7d3 commit 331e3312095cc97feb9866155352d19847c8a7d3 Author: Colin Finck AuthorDate: Mon Aug 19 15:58:30 2019 +0200 Commit: Colin Finck CommitDate: Wed Aug 28 22:32:49 2019 +0200 [FORMATTING] Restore some kind of style to ntstrsafe.h, considering all comments in PR #522 and #523. --- sdk/include/ddk/ntstrsafe.h | 2450 --- 1 file changed, 1355 insertions(+), 1095 deletions(-) diff --git a/sdk/include/ddk/ntstrsafe.h b/sdk/include/ddk/ntstrsafe.h index de2a4921f1f..ab338bc58a0 100644 --- a/sdk/include/ddk/ntstrsafe.h +++ b/sdk/include/ddk/ntstrsafe.h @@ -73,64 +73,65 @@ typedef _Null_terminated_ const wchar_t *NTSTRSAFE_PCWSTR; typedef ULONG STRSAFE_DWORD; -NTSTRSAFEAPI RtlStringCopyWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,STRSAFE_LPCSTR pszSrc); -NTSTRSAFEAPI RtlStringCopyWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,STRSAFE_LPCWSTR pszSrc); -NTSTRSAFEAPI RtlStringCopyExWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCSTR pszSrc,STRSAFE_LPSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringCopyExWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCWSTR pszSrc,STRSAFE_LPWSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringCopyNWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,STRSAFE_LPCSTR pszSrc,size_t cchToCopy); -NTSTRSAFEAPI RtlStringCopyNWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,STRSAFE_LPCWSTR pszSrc,size_t cchToCopy); -NTSTRSAFEAPI RtlStringCopyNExWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCSTR pszSrc,size_t cchToCopy,STRSAFE_LPSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringCopyNExWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCWSTR pszSrc,size_t cchToCopy,STRSAFE_LPWSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringCatWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,STRSAFE_LPCSTR pszSrc); -NTSTRSAFEAPI RtlStringCatWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,STRSAFE_LPCWSTR pszSrc); -NTSTRSAFEAPI RtlStringCatExWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCSTR pszSrc,STRSAFE_LPSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringCatExWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCWSTR pszSrc,STRSAFE_LPWSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringCatNWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,STRSAFE_LPCSTR pszSrc,size_t cchToAppend); -NTSTRSAFEAPI RtlStringCatNWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,STRSAFE_LPCWSTR pszSrc,size_t cchToAppend); -NTSTRSAFEAPI RtlStringCatNExWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCSTR pszSrc,size_t cchToAppend,STRSAFE_LPSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringCatNExWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPCWSTR pszSrc,size_t cchToAppend,STRSAFE_LPWSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags); -NTSTRSAFEAPI RtlStringVPrintfWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,STRSAFE_LPCSTR pszFormat,va_list argList); -NTSTRSAFEAPI RtlStringVPrintfWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,STRSAFE_LPCWSTR pszFormat,va_list argList); -NTSTRSAFEAPI RtlStringVPrintfWorkerLenW(STRSAFE_LPWSTR pszDest,size_t cchDest,STRSAFE_LPCWSTR pszFormat,size_t* pcchDestNewLen, va_list argList); -NTSTRSAFEAPI RtlStringVPrintfExWorkerA(STRSAFE_LPSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags,STRSAFE_LPCSTR pszFormat,va_list argList); -NTSTRSAFEAPI RtlStringVPrintfExWorkerW(STRSAFE_LPWSTR pszDest,size_t cchDest,size_t cbDest,STRSAFE_LPWSTR *ppszDestEnd,size_t *pcchRemaining,STRSAFE_DWORD dwFlags,STRSAFE_LPCWSTR pszFormat,va_list argList); +NTSTRSAFEAPI RtlStringCopyWorkerA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc); +NTSTRSAFEAPI RtlStringCopyWorkerW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc); +NTSTRSAFEAPI RtlStringCopyExWorkerA(STRSAFE_LPSTR pszDest, size_t cchDest, size_t cbDest, STRSAFE_LPCSTR pszSrc, STRSAFE_LPSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags); +NTSTRSAFEAPI RtlStringCopyExWorkerW(STRSAFE_LPWSTR pszDest, size_t cchDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags); +NTSTRSAFEAPI RtlStringCopyNWorkerA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc, size_t cchToCopy); +NTSTRSAFEAPI RtlStringCopyNWorkerW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy); +NTSTRSAFEAPI RtlStringCopyNExWorkerA(STRSAFE_LPSTR pszDest, size_t cchDest, size_t cbDest, STRSAFE_LPCSTR pszSrc, size_t cchToCopy
[ros-diffs] [reactos] 03/04: Fix and unify function prototypes for ntstrsafe functions taking variadic arguments.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46ed46c73f3fb5d92aac8bef2e99f905ca319e2b commit 46ed46c73f3fb5d92aac8bef2e99f905ca319e2b Author: Colin Finck AuthorDate: Mon Aug 19 17:38:05 2019 +0200 Commit: Colin Finck CommitDate: Wed Aug 28 22:35:01 2019 +0200 Fix and unify function prototypes for ntstrsafe functions taking variadic arguments. --- sdk/include/ddk/ntstrsafe.h | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/sdk/include/ddk/ntstrsafe.h b/sdk/include/ddk/ntstrsafe.h index ab338bc58a0..fac1a46f723 100644 --- a/sdk/include/ddk/ntstrsafe.h +++ b/sdk/include/ddk/ntstrsafe.h @@ -30,6 +30,7 @@ #endif #define NTSTRSAFEAPI static __inline NTSTATUS NTAPI +#define NTSTRSAFEVAPI static __inline NTSTATUS __cdecl #define NTSTRSAFE_INLINE_API static __inline NTSTATUS NTAPI #ifndef NTSTRSAFE_MAX_CCH @@ -1082,21 +1083,21 @@ RtlStringCbVPrintfW( return RtlStringVPrintfWorkerW(pszDest, cchDest, pszFormat, argList); } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, @@ -1121,7 +1122,7 @@ RtlStringCchPrintfA( return Status; } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, @@ -1145,21 +1146,21 @@ RtlStringCchPrintfW( return Status; } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, @@ -1184,7 +1185,7 @@ RtlStringCbPrintfA( return Status; } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, @@ -1209,7 +1210,7 @@ RtlStringCbPrintfW( return Status; } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfExA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, @@ -1219,7 +1220,7 @@ RtlStringCchPrintfExA( _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfExW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, @@ -1229,7 +1230,7 @@ RtlStringCchPrintfExW( _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfExA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, @@ -1257,7 +1258,7 @@ RtlStringCchPrintfExA( return Status; } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCchPrintfExW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, @@ -1285,7 +1286,7 @@ RtlStringCchPrintfExW( return Status; } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfExA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, @@ -1295,7 +1296,7 @@ RtlStringCbPrintfExA( _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfExW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, @@ -1305,7 +1306,7 @@ RtlStringCbPrintfExW( _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfExA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, @@ -1346,7 +1347,7 @@ RtlStringCbPrintfExA( return Status; } -static __inline NTSTATUS +NTSTRSAFEVAPI RtlStringCbPrintfExW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, @@ -3274,9 +3275,7 @@ RtlUnicodeStringValidateEx( return RtlpUnicodeStringValidate(SourceString, dwFlags); } -static
[ros-diffs] [reactos] 01/01: Fix FUNDING.yml syntax.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5dadfdaa393a51fb01ad1908764a1d5aed21d82f commit 5dadfdaa393a51fb01ad1908764a1d5aed21d82f Author: Colin Finck AuthorDate: Thu Jul 4 09:12:50 2019 +0200 Commit: GitHub CommitDate: Thu Jul 4 09:12:50 2019 +0200 Fix FUNDING.yml syntax. --- .github/FUNDING.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index b96016512f3..1ed5207b427 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,2 @@ -custom: https://reactos.org/donating -custom: https://paypal.me/ReactOS +custom: ['https://reactos.org/donating', 'https://paypal.me/ReactOS'] liberapay: ReactOS
[ros-diffs] [reactos] 01/01: Update FUNDING.yml now that the "Sponsor" button in GitHub has been activated.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=85b2b73fed03a6a1f017d03cfe8c03d8f25e4c2d commit 85b2b73fed03a6a1f017d03cfe8c03d8f25e4c2d Author: Colin Finck AuthorDate: Thu Jul 4 09:11:04 2019 +0200 Commit: GitHub CommitDate: Thu Jul 4 09:11:04 2019 +0200 Update FUNDING.yml now that the "Sponsor" button in GitHub has been activated. --- .github/FUNDING.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 283f9f1195a..b96016512f3 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,3 @@ -liberapay: ReactOS custom: https://reactos.org/donating +custom: https://paypal.me/ReactOS +liberapay: ReactOS
[ros-diffs] [reactos] 02/03: [ISOHYBRID] Fix the remaining warnings properly.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c02257ef57858bfe91f106e8c91c669e4a141293 commit c02257ef57858bfe91f106e8c91c669e4a141293 Author: Colin Finck AuthorDate: Sat Apr 27 11:35:04 2019 +0200 Commit: Colin Finck CommitDate: Sun Apr 28 23:22:53 2019 +0200 [ISOHYBRID] Fix the remaining warnings properly. I will send these changes upstream (minus the REACTOS_ISOHYBRID_EFI_MAC_SUPPORT ifdefs). --- sdk/tools/isohybrid/CMakeLists.txt | 8 sdk/tools/isohybrid/isohybrid.c| 17 +++-- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/sdk/tools/isohybrid/CMakeLists.txt b/sdk/tools/isohybrid/CMakeLists.txt index d24f3b95cb..13b57e1aff 100644 --- a/sdk/tools/isohybrid/CMakeLists.txt +++ b/sdk/tools/isohybrid/CMakeLists.txt @@ -5,11 +5,3 @@ add_definitions( add_host_tool(isohybrid isohybrid.c reactos_support_code.c) - -if(MSVC) -# Disable warning "'x': unreferenced local variable" -add_target_compile_flags(isohybrid "/wd4101") - -# Disable warning "'return': conversion from '__int64' to 'int', possible loss of data" -add_target_compile_flags(isohybrid "/wd4244") -endif() diff --git a/sdk/tools/isohybrid/isohybrid.c b/sdk/tools/isohybrid/isohybrid.c index b8d2da6f36..7ca2abc456 100644 --- a/sdk/tools/isohybrid/isohybrid.c +++ b/sdk/tools/isohybrid/isohybrid.c @@ -603,7 +603,7 @@ void read_mbr_template(char *path, uint8_t *mbr) { FILE *fp; -int ret; +size_t ret; fp = fopen(path, "rb"); if (fp == NULL) @@ -616,7 +616,7 @@ read_mbr_template(char *path, uint8_t *mbr) } -int +size_t initialise_mbr(uint8_t *mbr) { int i = 0; @@ -975,7 +975,10 @@ main(int argc, char *argv[]) FILE *fp = NULL; uint8_t *buf = NULL, *bufz = NULL; int cylsize = 0, frac = 0; +size_t mbr_size; +#ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT size_t orig_gpt_size, free_space, gpt_size; +#endif struct iso_primary_descriptor descriptor; prog = strcpy(alloca(strlen(argv[0]) + 1), argv[0]); @@ -1089,7 +1092,9 @@ main(int argc, char *argv[]) err(1, "%s", argv[0]); isosize = lendian_int(descriptor.size) * lendian_short(descriptor.block_size); +#ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT free_space = isostat.st_size - isosize; +#endif cylsize = head * sector * 512; frac = isostat.st_size % cylsize; @@ -1127,15 +1132,15 @@ main(int argc, char *argv[]) buf = bufz; memset(buf, 0, BUFSIZE); -i = initialise_mbr(buf); +mbr_size = initialise_mbr(buf); if (mode & VERBOSE) -display_mbr(buf, i); +display_mbr(buf, mbr_size); if (fseeko(fp, (off_t) 0, SEEK_SET)) err(1, "%s: seek error - 5", argv[0]); -if (fwrite(buf, sizeof(char), i, fp) != (size_t)i) +if (fwrite(buf, sizeof(char), mbr_size, fp) != mbr_size) err(1, "%s: write error - 1", argv[0]); #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT @@ -1177,7 +1182,7 @@ main(int argc, char *argv[]) if (fseeko(fp, (off_t) 512, SEEK_SET)) err(1, "%s: seek error - 6", argv[0]); - if (fwrite(buf, sizeof(char), gpt_size, fp) != (size_t)gpt_size) + if (fwrite(buf, sizeof(char), gpt_size, fp) != gpt_size) err(1, "%s: write error - 2", argv[0]); }
[ros-diffs] [reactos] 03/03: Add a shared "port" directory for POSIX functions needed by multiple host tools (getopt/mkstemps) and import the one and only getopt from glibc.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2c11c411153eea31d10025dddf7332ce641be629 commit 2c11c411153eea31d10025dddf7332ce641be629 Author: Colin Finck AuthorDate: Sat Apr 27 16:19:26 2019 +0200 Commit: Colin Finck CommitDate: Sun Apr 28 23:23:06 2019 +0200 Add a shared "port" directory for POSIX functions needed by multiple host tools (getopt/mkstemps) and import the one and only getopt from glibc. This finally fixes our duplicated getopt functions from different sources and gives us an up to date and the most compatible implementation. isohybrid actually relies on a glibc-specific getopt behavior that we previously hacked into the reactos_support_code.c implementation derived from BSD/mingw-w64. widl also needs getopt and previously used an even older BSD-derived code. --- sdk/tools/hhpcomp/CMakeLists.txt | 2 +- sdk/tools/hhpcomp/chmc/chmc.c | 15 +- sdk/tools/hhpcomp/port/config.h| 7 - sdk/tools/isohybrid/CMakeLists.txt | 4 +- sdk/tools/isohybrid/reactos_support_code.c | 490 --- sdk/tools/isohybrid/reactos_support_code.h | 26 +- sdk/tools/port/bits/getopt_core.h | 91 +++ sdk/tools/port/bits/getopt_ext.h | 71 +++ sdk/tools/port/getopt.c| 808 + sdk/tools/port/getopt.h| 36 ++ sdk/tools/port/getopt1.c | 155 + sdk/tools/port/getopt_int.h| 118 sdk/tools/{hhpcomp => }/port/mkstemps.c| 17 +- sdk/tools/port/port.h | 5 + sdk/tools/widl/CMakeLists.txt | 6 +- sdk/tools/widl/getopt.c| 915 - sdk/tools/widl/port/config.h | 15 - sdk/tools/widl/port/mkstemps.c | 139 - 18 files changed, 1305 insertions(+), 1615 deletions(-) diff --git a/sdk/tools/hhpcomp/CMakeLists.txt b/sdk/tools/hhpcomp/CMakeLists.txt index 8e073ff12e..fa8a7c6f00 100644 --- a/sdk/tools/hhpcomp/CMakeLists.txt +++ b/sdk/tools/hhpcomp/CMakeLists.txt @@ -7,7 +7,7 @@ list(APPEND SOURCE chmc/err.c lzx_compress/lz_nonslide.c lzx_compress/lzx_layer.c -port/mkstemps.c) +../port/mkstemps.c) # used by lzx_compress add_definitions(-DNONSLIDE) diff --git a/sdk/tools/hhpcomp/chmc/chmc.c b/sdk/tools/hhpcomp/chmc/chmc.c index 934bfba417..f96ff11673 100644 --- a/sdk/tools/hhpcomp/chmc/chmc.c +++ b/sdk/tools/hhpcomp/chmc/chmc.c @@ -26,20 +26,15 @@ #include #include -#if defined(_WIN32) || defined(__APPLE__) #include #include #include -#ifdef __REACTOS__ -#include -int mkstemps(char* template, int suffix_len); -#endif /* __REACTOS__ */ +#include "../../port/port.h" + +#ifdef _WIN32 +#include #else -#ifdef __REACTOS__ -#include -#include -#endif /* __REACTOS__ */ -#include +#include #endif #include "err.h" diff --git a/sdk/tools/hhpcomp/port/config.h b/sdk/tools/hhpcomp/port/config.h deleted file mode 100644 index 74ef33dafe..00 --- a/sdk/tools/hhpcomp/port/config.h +++ /dev/null @@ -1,7 +0,0 @@ - -#pragma once - -#if defined(_WIN32) -#include -#define HAVE_PROCESS_H 1 -#endif diff --git a/sdk/tools/isohybrid/CMakeLists.txt b/sdk/tools/isohybrid/CMakeLists.txt index 13b57e1aff..06a09bc229 100644 --- a/sdk/tools/isohybrid/CMakeLists.txt +++ b/sdk/tools/isohybrid/CMakeLists.txt @@ -4,4 +4,6 @@ add_definitions( add_host_tool(isohybrid isohybrid.c -reactos_support_code.c) +reactos_support_code.c +../port/getopt.c +../port/getopt1.c) diff --git a/sdk/tools/isohybrid/reactos_support_code.c b/sdk/tools/isohybrid/reactos_support_code.c index aa9f2a4261..bc87cd36b3 100644 --- a/sdk/tools/isohybrid/reactos_support_code.c +++ b/sdk/tools/isohybrid/reactos_support_code.c @@ -21,496 +21,6 @@ isohybrid_warning(const char *fmt, ...) va_end(ap); } -/ -// getopt code from mingw-w64 -/ -/* $OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $*/ -/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ - -/* - * Copyright (c) 2002 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
[ros-diffs] [reactos] 01/01: [ROSAUTOTEST] A timeout of 120 seconds kills the msi:action test prematurely, so increase it to 170 seconds.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=86ae6b029fd4d18db885edd12275dc8b120814e4 commit 86ae6b029fd4d18db885edd12275dc8b120814e4 Author: Colin Finck AuthorDate: Fri Apr 26 10:30:24 2019 +0200 Commit: Colin Finck CommitDate: Fri Apr 26 10:31:02 2019 +0200 [ROSAUTOTEST] A timeout of 120 seconds kills the msi:action test prematurely, so increase it to 170 seconds. This is still below the 180 seconds before sysreg2 kills the entire VM. I've added a comment to clarify that. --- modules/rostests/rosautotest/CWineTest.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/rostests/rosautotest/CWineTest.cpp b/modules/rostests/rosautotest/CWineTest.cpp index 6e163979e0..9967d2d21c 100644 --- a/modules/rostests/rosautotest/CWineTest.cpp +++ b/modules/rostests/rosautotest/CWineTest.cpp @@ -8,7 +8,11 @@ #include "precomp.h" static const DWORD ListTimeout = 1; -static const DWORD ProcessActivityTimeout = 12; + +// This value needs to be lower than the configured in sysreg.xml! (usually 18) +// Otherwise, sysreg2 kills the VM before we can kill the process. +static const DWORD ProcessActivityTimeout = 17; + /** * Constructs a CWineTest object.
[ros-diffs] [reactos] 01/01: [REGTEST] Add regtest.cmd to the Run key inside regtest.cmd, so we're also started on the next reboot in case ReactOS crashed *and* the registry has been saved.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e34d3cf3792b9ae44d1e814a1ca160e1714aa71f commit e34d3cf3792b9ae44d1e814a1ca160e1714aa71f Author: Colin Finck AuthorDate: Wed Apr 24 10:48:15 2019 +0200 Commit: Colin Finck CommitDate: Fri Apr 26 10:02:47 2019 +0200 [REGTEST] Add regtest.cmd to the Run key inside regtest.cmd, so we're also started on the next reboot in case ReactOS crashed *and* the registry has been saved. unattend.inf only allows to add RunOnce entries, which are in theory only executed on the first boot after installation. For almost a decade, this worked anyway to start regtest.cmd again after a ReactOS crash, because the registry and thus the deletion of the RunOnce entry wasn't stored on disk in case of a crash. Thanks to Sylvain for the hint! As Explorer processes the Run key right after RunOnce and therefore picks up regtest.cmd a second time during the first boot, exit the script just after adding the Run key. Otherwise, rosautotest.exe would be started twice, with catastrophic results. --- boot/bootdata/bootcdregtest/regtest.cmd | 9 + 1 file changed, 9 insertions(+) diff --git a/boot/bootdata/bootcdregtest/regtest.cmd b/boot/bootdata/bootcdregtest/regtest.cmd index 29ea7becb2..ec263e1324 100644 --- a/boot/bootdata/bootcdregtest/regtest.cmd +++ b/boot/bootdata/bootcdregtest/regtest.cmd @@ -2,6 +2,15 @@ set WINETEST_DEBUG=0 set WINETEST_PLATFORM=reactos +:: On the first boot, we're started through RunOnce. +:: Add us to the Run key, so we're also started on the next reboot in case ReactOS crashed *and* the registry has been saved. +:: Exit right after that, because Explorer processes the Run key right after RunOnce and therefore picks up regtest.cmd a second time during the first boot. +reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v regtest +if "%errorlevel%"=="1" ( +reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v regtest /t REG_SZ /d "%SystemRoot%\system32\cmd.exe /c regtest.cmd" +exit 0 +) + move C:\ReactOS\bin\redirtest1.dll C:\ReactOS\bin\kernel32test_versioned.dll move C:\ReactOS\bin\testdata\redirtest2.dll C:\ReactOS\bin\testdata\kernel32test_versioned.dll if exist "C:\ReactOS\bin\AHKAppTests.cmd" (
[ros-diffs] [reactos] 02/02: [ROSAUTOTEST] Cache the result of GetLastError().
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=064dffe6c3c22336c1ab3acb3127af8e91115f25 commit 064dffe6c3c22336c1ab3acb3127af8e91115f25 Author: Colin Finck AuthorDate: Tue Apr 23 11:37:58 2019 +0200 Commit: Timo Kreuzer CommitDate: Fri Apr 26 08:47:15 2019 +0200 [ROSAUTOTEST] Cache the result of GetLastError(). --- modules/rostests/rosautotest/CPipe.cpp | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/rostests/rosautotest/CPipe.cpp b/modules/rostests/rosautotest/CPipe.cpp index 5af7163971..73e9eda295 100644 --- a/modules/rostests/rosautotest/CPipe.cpp +++ b/modules/rostests/rosautotest/CPipe.cpp @@ -169,7 +169,9 @@ CPipe::Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead, D // The asynchronous read request could be satisfied immediately. return ERROR_SUCCESS; } -else if (GetLastError() == ERROR_IO_PENDING) + +DWORD dwLastError = GetLastError(); +if (dwLastError == ERROR_IO_PENDING) { // The asynchronous read request could not be satisfied immediately, so wait for it with the given timeout. DWORD dwWaitResult = WaitForSingleObject(m_ReadOverlapped.hEvent, TimeoutMilliseconds); @@ -181,7 +183,9 @@ CPipe::Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead, D // We successfully read NumberOfBytesRead bytes. return ERROR_SUCCESS; } -else if (GetLastError() == ERROR_BROKEN_PIPE) + +dwLastError = GetLastError(); +if (dwLastError == ERROR_BROKEN_PIPE) { // The other end of the pipe has been closed. return ERROR_BROKEN_PIPE; @@ -201,7 +205,7 @@ CPipe::Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead, D else { // This may be ERROR_BROKEN_PIPE or an unexpected error. -return GetLastError(); +return dwLastError; } }
[ros-diffs] [reactos] 01/02: [ROSAUTOTEST] Implement a process activity timeout of 2 minutes. If there is no log output within 2 minutes, the test process is killed, and we continue with the next test
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7dd4d2256b97b1f8a3a392060592a3d0f715fbd7 commit 7dd4d2256b97b1f8a3a392060592a3d0f715fbd7 Author: Colin Finck AuthorDate: Tue Apr 23 09:17:05 2019 +0200 Commit: Timo Kreuzer CommitDate: Fri Apr 26 08:47:15 2019 +0200 [ROSAUTOTEST] Implement a process activity timeout of 2 minutes. If there is no log output within 2 minutes, the test process is killed, and we continue with the next test. This is a rather graceful approach compared to sysreg2's 3 minute timeout before killing and restarting the entire VM. Since we added autochk for FAT filesystems, the filesystem is often "fixed" after a reset with the consequence that ReactOS doesn't boot up anymore. The sysreg2 restart code still remains for handling tests causing BSODs. --- modules/rostests/rosautotest/CPipe.cpp | 101 +++-- modules/rostests/rosautotest/CPipe.h | 6 +- modules/rostests/rosautotest/CProcess.cpp | 5 +- modules/rostests/rosautotest/CWineTest.cpp | 38 --- 4 files changed, 131 insertions(+), 19 deletions(-) diff --git a/modules/rostests/rosautotest/CPipe.cpp b/modules/rostests/rosautotest/CPipe.cpp index 8fd3cf03e1..5af7163971 100644 --- a/modules/rostests/rosautotest/CPipe.cpp +++ b/modules/rostests/rosautotest/CPipe.cpp @@ -3,10 +3,14 @@ * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) * PURPOSE: Class that manages an unidirectional anonymous byte stream pipe * COPYRIGHT: Copyright 2015 Thomas Faber (thomas.fa...@reactos.org) + * Copyright 2019 Colin Finck (co...@reactos.org) */ #include "precomp.h" +LONG CPipe::m_lPipeCount = 0; + + /** * Constructs a CPipe object and initializes read and write handles. */ @@ -18,8 +22,50 @@ CPipe::CPipe() SecurityAttributes.bInheritHandle = TRUE; SecurityAttributes.lpSecurityDescriptor = NULL; -if(!CreatePipe(_hReadPipe, _hWritePipe, , 0)) -FATAL("CreatePipe failed\n"); +// Construct a unique pipe name. +WCHAR wszPipeName[MAX_PATH]; +InterlockedIncrement(_lPipeCount); +swprintf(wszPipeName, L".\\pipe\\TestmanPipe%ld", m_lPipeCount); + +// Create a named pipe with the default settings, but overlapped (asynchronous) operations. +// Latter feature is why we can't simply use CreatePipe. +const DWORD dwDefaultBufferSize = 4096; +const DWORD dwDefaultTimeoutMilliseconds = 12; + +m_hReadPipe = CreateNamedPipeW(wszPipeName, +PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, +PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, +1, +dwDefaultBufferSize, +dwDefaultBufferSize, +dwDefaultTimeoutMilliseconds, +); +if (m_hReadPipe == INVALID_HANDLE_VALUE) +{ +FATAL("CreateNamedPipe failed\n"); +} + +// Use CreateFileW to get the write handle to the pipe. +// Writing is done synchronously, so no FILE_FLAG_OVERLAPPED here! +m_hWritePipe = CreateFileW(wszPipeName, +GENERIC_WRITE, +0, +, +OPEN_EXISTING, +FILE_ATTRIBUTE_NORMAL, +NULL); +if (m_hWritePipe == INVALID_HANDLE_VALUE) +{ +FATAL("CreateFileW failed\n"); +} + +// Prepare the OVERLAPPED structure for reading. +ZeroMemory(_ReadOverlapped, sizeof(m_ReadOverlapped)); +m_ReadOverlapped.hEvent = CreateEventW(NULL, TRUE, TRUE, NULL); +if (!m_ReadOverlapped.hEvent) +{ +FATAL("CreateEvent failed\n"); +} } /** @@ -103,17 +149,60 @@ CPipe::Peek(PVOID Buffer, DWORD BufferSize, PDWORD BytesRead, PDWORD TotalBytesA * On return, the number of bytes actually read from the pipe into Buffer. * * @return - * True on success, false on failure; call GetLastError for error information. + * Returns a Win32 error code. Expected error codes include: + * - ERROR_SUCCESS: The read has completed successfully. + * - WAIT_TIMEOUT: The given timeout has elapsed before any data was read. + * - ERROR_BROKEN_PIPE: The other end of the pipe has been closed. * * @see ReadFile */ -bool -CPipe::Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead) +DWORD +CPipe::Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead, DWORD TimeoutMilliseconds) { if (!m_hReadPipe) +{ FATAL("Trying to read from a closed read pipe"); +} -return ReadFile(m_hReadPipe, Buffer, NumberOfBytesToRead, NumberOfBytesRead, NULL); +if (ReadFile(m_hReadPipe, Buffer, NumberOfBytesToRead, NumberOfBytesRead, _ReadOverlapped)) +{ +// The asynchronous read request could be satisfied immediately. +return ERROR_SUCCESS; +} +else if (GetLastError() == ERROR_IO_PENDING) +{ +// The asynchronous read request could not be satisfied immediately, so wait for it with the given ti
[ros-diffs] [reactos] 01/01: Fix the MSVC version of ldexp filling up the FPU stack and bailing out with #IND after a few calls. Additionally, add it back to libcntpr.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd0a28d1e41171a5361292e52c745bc8e48d3dde commit bd0a28d1e41171a5361292e52c745bc8e48d3dde Author: Colin Finck AuthorDate: Fri Mar 1 17:49:03 2019 +0100 Commit: Hermès BÉLUSCA - MAÏTO CommitDate: Sun Mar 3 16:11:27 2019 +0100 Fix the MSVC version of ldexp filling up the FPU stack and bailing out with #IND after a few calls. Additionally, add it back to libcntpr. MSVC was previously given a "result" variable to copy the fscale result from st(0). This led to another "fld" FPU stack push at the very end without popping the source value from the FPU stack. Moreover, this copy isn't even needed: A simple "fstp st(1)" at the end pops an element from the FPU stack while effectively storing the result in st(0), the register used for returning a double value. This problem didn't affect GCC, as it is only given the "fscale" instruction and does all necessary stack operations itself. However, looking into the CRT sources, I found many other i386 implementations with inline assembly suffering from the same problem. Fortunately, they have been replaced by pure assembly implementations a while ago, so it's time to finally remove them. ldexp would have also been a candidate for a pure assembly implementation, but the required check for NaN and setting errno (verified on Win2003) already outweighs the benefits. And we cannot just do a NaN check with FUCOMI as this is an i686/pentiumpro instruction while we're still targeting i586/pentium. I'm also using this opportunity to clean up the ldexp.c header and only put in the remaining contributors as returned by "git blame". Thanks to NightWolve1975 for reporting the problem! (https://twitter.com/nightwolve1975/status/1099042477531643912) --- sdk/lib/crt/libcntpr.cmake| 3 +- sdk/lib/crt/math/i386/atan2.c | 27 -- sdk/lib/crt/math/i386/exp.c | 64 --- sdk/lib/crt/math/i386/fmod.c | 49 - sdk/lib/crt/math/i386/fmodf.c | 28 --- sdk/lib/crt/math/i386/ldexp.c | 45 -- 6 files changed, 19 insertions(+), 197 deletions(-) diff --git a/sdk/lib/crt/libcntpr.cmake b/sdk/lib/crt/libcntpr.cmake index 8014bd370e..aa3b1d4fa6 100644 --- a/sdk/lib/crt/libcntpr.cmake +++ b/sdk/lib/crt/libcntpr.cmake @@ -105,7 +105,8 @@ if(ARCH STREQUAL "i386") math/i386/cilog.c math/i386/cipow.c math/i386/cisin.c -math/i386/cisqrt.c) +math/i386/cisqrt.c +math/i386/ldexp.c) if(NOT MSVC) list(APPEND LIBCNTPR_SOURCE except/i386/chkstk_ms.s) endif() diff --git a/sdk/lib/crt/math/i386/atan2.c b/sdk/lib/crt/math/i386/atan2.c deleted file mode 100644 index 7b7ebac8a2..00 --- a/sdk/lib/crt/math/i386/atan2.c +++ /dev/null @@ -1,27 +0,0 @@ - -#include - -double atan2 (double __y, double __x); - -/* - * @implemented - */ -double atan2 (double __y, double __x) -{ - register double __val; -#ifdef __GNUC__ - __asm __volatile__ -("fpatan\n\t" - "fld %%st(0)" - : "=t" (__val) : "0" (__x), "u" (__y)); -#else - __asm - { -fld __y -fld __x -fpatan -fstp __val - } -#endif /*__GNUC__*/ - return __val; -} diff --git a/sdk/lib/crt/math/i386/exp.c b/sdk/lib/crt/math/i386/exp.c deleted file mode 100644 index 727a1cb541..00 --- a/sdk/lib/crt/math/i386/exp.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -double exp (double __x); - -double exp (double __x) -{ -#ifdef __GNUC__ - register double __value, __exponent; - __asm __volatile__ -("fldl2e# e^x = 2^(x * log2(e))\n\t" - "fmul %%st(1) # x * log2(e)\n\t" - "fst %%st(1)\n\t" - "frndint # int(x * log2(e))\n\t" - "fxch\n\t
[ros-diffs] [reactos] 01/01: [DOXYGEN] Update Doxyfile for our build of Doxygen 1.8.15.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2440df762ce0e4172cdaaae03f2cdd19f32006ef commit 2440df762ce0e4172cdaaae03f2cdd19f32006ef Author: Colin Finck AuthorDate: Tue Jan 15 09:37:54 2019 +0100 Commit: Colin Finck CommitDate: Tue Jan 15 09:37:54 2019 +0100 [DOXYGEN] Update Doxyfile for our build of Doxygen 1.8.15. --- Doxyfile | 195 ++- 1 file changed, 118 insertions(+), 77 deletions(-) diff --git a/Doxyfile b/Doxyfile index 74dd35fc27..0ee5e8fdd5 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.13 +# Doxyfile 1.8.15 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -17,11 +17,11 @@ # Project related configuration options #--- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 @@ -94,6 +94,14 @@ ALLOW_UNICODE_NAMES= NO OUTPUT_LANGUAGE= English +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. @@ -237,7 +245,12 @@ TAB_SIZE = 4 # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) ALIASES= @@ -275,17 +288,26 @@ OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is +# Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # @@ -29
[ros-diffs] [reactos] 01/01: [DOXYGEN] Enable EXTERNAL_SEARCH, because this seems to be the most sophisticated Doxygen search feature and the PHP-based search isn't compatible with PHP7 yet.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cb8429d76a1710d68a3b6c29e3f87ebe71579869 commit cb8429d76a1710d68a3b6c29e3f87ebe71579869 Author: Colin Finck AuthorDate: Thu Dec 6 15:13:40 2018 +0100 Commit: Colin Finck CommitDate: Thu Dec 6 15:13:40 2018 +0100 [DOXYGEN] Enable EXTERNAL_SEARCH, because this seems to be the most sophisticated Doxygen search feature and the PHP-based search isn't compatible with PHP7 yet. --- Doxyfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doxyfile b/Doxyfile index b79fed8cb8..74dd35fc27 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1578,7 +1578,7 @@ SERVER_BASED_SEARCH= YES # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH= NO +EXTERNAL_SEARCH= YES # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. @@ -1589,7 +1589,7 @@ EXTERNAL_SEARCH= NO # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = https://doxygen.reactos.org/doxysearch.cgi # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the
[ros-diffs] [reactos] 01/01: [DOXYGEN] Update Doxyfile for Doxygen 1.8.13, the version we are going to use from now on.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9eb82c499f8fe2bdd40f9fd3528e1b0dfeb927a1 commit 9eb82c499f8fe2bdd40f9fd3528e1b0dfeb927a1 Author: Colin Finck AuthorDate: Wed Dec 5 19:38:14 2018 +0100 Commit: Colin Finck CommitDate: Wed Dec 5 19:38:14 2018 +0100 [DOXYGEN] Update Doxyfile for Doxygen 1.8.13, the version we are going to use from now on. Not much has changed, several options were added, but left at their default values. However, if search problems persist after Doxygen 1.8.13 generated the documentation for the first time, we can play around with EXTERNAL_SEARCH. --- Doxyfile | 452 ++- 1 file changed, 300 insertions(+), 152 deletions(-) diff --git a/Doxyfile b/Doxyfile index 6fff952979..b79fed8cb8 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.6 +# Doxyfile 1.8.13 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -47,10 +47,10 @@ PROJECT_NAME = "ReactOS" PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -61,7 +61,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = "Doxygen" -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -71,6 +71,14 @@ OUTPUT_DIRECTORY = "Doxygen" CREATE_SUBDIRS = YES +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES= NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. @@ -86,14 +94,14 @@ CREATE_SUBDIRS = YES OUTPUT_LANGUAGE= English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -111,7 +119,17 @@ REPEAT_BRIEF = YES # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief @@ -128,7 +146,7 @@ ALWAYS_DETAILED_SEC= NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -198,9 +216,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the
[ros-diffs] 77/77: Merge PR #283 "[USBPORT] Transaction Translator (TT) support bringup"
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=765280bf5f7ba16f1c9333a5a96e571d45a1d33a commit 765280bf5f7ba16f1c9333a5a96e571d45a1d33a Merge: 851a554b59 62612a7e45 Author: Colin Finck <co...@reactos.org> AuthorDate: Thu Mar 29 23:52:22 2018 +0200 Commit: Colin Finck <co...@reactos.org> CommitDate: Thu Mar 29 23:52:22 2018 +0200 Merge PR #283 "[USBPORT] Transaction Translator (TT) support bringup" drivers/usb/usbport/debug.c| 37 + drivers/usb/usbport/device.c | 227 +++- drivers/usb/usbport/endpoint.c | 270 - drivers/usb/usbport/ioctl.c| 10 +- drivers/usb/usbport/pnp.c |8 + drivers/usb/usbport/power.c|2 - drivers/usb/usbport/trfsplit.c |6 +- drivers/usb/usbport/usb2.c | +++- drivers/usb/usbport/usbdebug.h | 19 + drivers/usb/usbport/usbport.c | 27 +- drivers/usb/usbport/usbport.h | 171 +++- sdk/include/psdk/usb200.h |8 + 12 files changed, 2941 insertions(+), 66 deletions(-)
[ros-diffs] 01/01: [CMAKE] Call "git describe" with the --long parameter to always output the format we are used to.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ef8b17ed0d54e92589d0eae7e0954a3379e0776a commit ef8b17ed0d54e92589d0eae7e0954a3379e0776a Author: Colin Finck <co...@reactos.org> AuthorDate: Sat Feb 17 18:09:07 2018 +0100 Commit: Colin Finck <co...@reactos.org> CommitDate: Sat Feb 17 18:09:07 2018 +0100 [CMAKE] Call "git describe" with the --long parameter to always output the format we are used to. --- sdk/include/reactos/version.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/include/reactos/version.cmake b/sdk/include/reactos/version.cmake index ca0ceb4c9a..a585154556 100644 --- a/sdk/include/reactos/version.cmake +++ b/sdk/include/reactos/version.cmake @@ -39,7 +39,7 @@ if(EXISTS "${REACTOS_SOURCE_DIR}/.git") endif() execute_process( -COMMAND "${GIT_EXECUTABLE}" describe --abbrev=7 +COMMAND "${GIT_EXECUTABLE}" describe --abbrev=7 --long WORKING_DIRECTORY ${REACTOS_SOURCE_DIR} OUTPUT_VARIABLE GIT_DESCRIBE_REVISION RESULT_VARIABLE GIT_CALL_RESULT
[ros-diffs] 01/01: [PRINTING] Replace all my custom marshalling code by calls to the newly implemented APIs, thereby significantly reducing the codebase and providing a sane template to implement more
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=22ffe5300b5882605b6790057b84010d8043fe53 commit 22ffe5300b5882605b6790057b84010d8043fe53 Author: Colin Finck <co...@reactos.org> AuthorDate: Wed Jan 17 12:52:12 2018 +0100 Commit: Colin Finck <co...@reactos.org> CommitDate: Wed Jan 17 12:52:12 2018 +0100 [PRINTING] Replace all my custom marshalling code by calls to the newly implemented APIs, thereby significantly reducing the codebase and providing a sane template to implement more Printing APIs. --- .../apitests/spoolss/MarshallDownStructuresArray.c | 6 +- win32ss/printing/base/spoolsv/jobs.c | 79 ++- win32ss/printing/base/spoolsv/monitors.c | 30 +--- win32ss/printing/base/spoolsv/ports.c | 42 +- win32ss/printing/base/spoolsv/printers.c | 124 ++-- win32ss/printing/base/spoolsv/printprocessors.c| 33 + win32ss/printing/base/winspool/jobs.c | 74 ++ win32ss/printing/base/winspool/monitors.c | 31 +--- win32ss/printing/base/winspool/ports.c | 31 +--- win32ss/printing/base/winspool/printers.c | 124 ++-- win32ss/printing/base/winspool/printprocessors.c | 41 ++ win32ss/printing/include/marshalling/jobs.h| 71 ++ win32ss/printing/include/marshalling/monitors.h| 30 win32ss/printing/include/marshalling/ports.h | 10 +- win32ss/printing/include/marshalling/printers.h| 157 + .../printing/include/marshalling/printprocessors.h | 22 +++ 16 files changed, 359 insertions(+), 546 deletions(-) diff --git a/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c b/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c index cd057074ec..7b7deba6f4 100644 --- a/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c +++ b/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c @@ -74,7 +74,7 @@ START_TEST(MarshallDownStructuresArray) // Marshall them down. SetLastError(0xDEADBEEF); -ok(MarshallDownStructuresArray(pPortInfo2, cElements, PortInfo2Marshalling.pInfo, PortInfo2Marshalling.cbStructureSize, TRUE), "MarshallDownStructuresArray returns FALSE!\n"); +ok(MarshallDownStructuresArray(pPortInfo2, cElements, pPortInfoMarshalling[2]->pInfo, pPortInfoMarshalling[2]->cbStructureSize, TRUE), "MarshallDownStructuresArray returns FALSE!\n"); ok(GetLastError() == 0xDEADBEEF, "GetLastError returns %lu!\n", GetLastError()); // DWORD values should be unchanged. @@ -99,13 +99,13 @@ START_TEST(MarshallDownStructuresArray) // Due to the implementation of PackStrings, ([0])->pPortName contains the highest offset. // Show that MarshallUpStructuresArray checks the offsets and bails out with ERROR_INVALID_DATA if cbSize <= highest offset. SetLastError(0xDEADBEEF); -ok(!MarshallUpStructuresArray((DWORD)([0])->pPortName, pPortInfo2Test, cElements, PortInfo2Marshalling.pInfo, PortInfo2Marshalling.cbStructureSize, TRUE), "MarshallUpStructuresArray returns TRUE!\n"); +ok(!MarshallUpStructuresArray((DWORD)([0])->pPortName, pPortInfo2Test, cElements, pPortInfoMarshalling[2]->pInfo, pPortInfoMarshalling[2]->cbStructureSize, TRUE), "MarshallUpStructuresArray returns TRUE!\n"); ok(GetLastError() == ERROR_INVALID_DATA, "GetLastError returns %lu!\n", GetLastError()); // It works with cbSize > highest offset. // In real world cases, we would use cbPortInfo2Size for cbSize. SetLastError(0xDEADBEEF); -ok(MarshallUpStructuresArray((DWORD)([0])->pPortName + 1, pPortInfo2, cElements, PortInfo2Marshalling.pInfo, PortInfo2Marshalling.cbStructureSize, TRUE), "MarshallUpStructuresArray returns FALSE!\n"); +ok(MarshallUpStructuresArray((DWORD)([0])->pPortName + 1, pPortInfo2, cElements, pPortInfoMarshalling[2]->pInfo, pPortInfoMarshalling[2]->cbStructureSize, TRUE), "MarshallUpStructuresArray returns FALSE!\n"); ok(GetLastError() == 0xDEADBEEF, "GetLastError returns %lu!\n", GetLastError()); // pPortInfo2 should now be identical to the copy again. diff --git a/win32ss/printing/base/spoolsv/jobs.c b/win32ss/printing/base/spoolsv/jobs.c index 596cddbf35..3fe510e6c7 100644 --- a/win32ss/printing/base/spoolsv/jobs.c +++ b/win32ss/printing/base/spoolsv/jobs.c @@ -2,65 +2,11 @@ * PROJECT: ReactOS Print Spooler Service * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) * PURPOSE: Functions for managing print jobs - * COPYRIGHT: Copyright 2015-2017 Colin Finck (co...@reactos.org) + * COPYRIGHT: Copyright 2015-2018 Colin Finck (co...@reactos.org) */ #include "precomp.h" - -static void -_MarshallDownAddJobInfo(PADDJOB_INFO_1W* ppAddJobInfo1) -{ -// Replace absolute pointer addresses
[ros-diffs] 01/01: [PRINTING] Try to fix Linux build #2
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=35ef5a3c24bca5d03c24df26e3211dbf453c8dc7 commit 35ef5a3c24bca5d03c24df26e3211dbf453c8dc7 Author: Colin Finck <co...@reactos.org> AuthorDate: Wed Jan 17 10:55:02 2018 +0100 Commit: Colin Finck <co...@reactos.org> CommitDate: Wed Jan 17 10:55:02 2018 +0100 [PRINTING] Try to fix Linux build #2 --- win32ss/printing/base/marshalling.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/win32ss/printing/base/marshalling.c b/win32ss/printing/base/marshalling.c index 3a7ac9e270..8388a0af64 100644 --- a/win32ss/printing/base/marshalling.c +++ b/win32ss/printing/base/marshalling.c @@ -9,6 +9,8 @@ #include #include +#include + /** * @name MarshallDownStructure *
[ros-diffs] 01/01: [PRINTING] Try to fix Linux build.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=86c59690da171daec466b69f3da2ee3a73ca6e86 commit 86c59690da171daec466b69f3da2ee3a73ca6e86 Author: Colin Finck <co...@reactos.org> AuthorDate: Wed Jan 17 10:41:55 2018 +0100 Commit: Colin Finck <co...@reactos.org> CommitDate: Wed Jan 17 10:41:55 2018 +0100 [PRINTING] Try to fix Linux build. Why this previously built without any errors using GCC and MSVC under Windows is left as an exercise to the reader. --- win32ss/printing/base/marshalling.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32ss/printing/base/marshalling.c b/win32ss/printing/base/marshalling.c index bdca025076..3a7ac9e270 100644 --- a/win32ss/printing/base/marshalling.c +++ b/win32ss/printing/base/marshalling.c @@ -5,6 +5,9 @@ * COPYRIGHT: Copyright 2015-2018 Colin Finck (co...@reactos.org) */ +#define WIN32_NO_STATUS +#include +#include /** * @name MarshallDownStructure
[ros-diffs] 01/01: [PRINTING] Implement the undocumented MarshallDownStructure, MarshallDownStructuresArray, MarshallUpStructure, and MarshallUpStructuresArray to the extent I need and could find out
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f3ea8225cb2217463fa68b5892c1ddc9c064a27a commit f3ea8225cb2217463fa68b5892c1ddc9c064a27a Author: Colin Finck <co...@reactos.org> AuthorDate: Wed Jan 17 10:13:25 2018 +0100 Commit: Colin Finck <co...@reactos.org> CommitDate: Wed Jan 17 10:13:25 2018 +0100 [PRINTING] Implement the undocumented MarshallDownStructure, MarshallDownStructuresArray, MarshallUpStructure, and MarshallUpStructuresArray to the extent I need and could find out through black-box testing. PDBs reveal that these functions are also used in winspool.drv, but not imported from spoolss.dll to retain the client/server architecture. As winspool.drv highly benefits from the MarshallUp* functions, I put them in a source file shared between spoolss.dll and winspool.drv. The added API Tests cover my testing and all implemented features. One more item done from https://reactos.org/wiki/Printing ! --- modules/rostests/apitests/spoolss/CMakeLists.txt | 2 + .../apitests/spoolss/MarshallDownStructuresArray.c | 118 .../apitests/spoolss/MarshallUpStructuresArray.c | 37 modules/rostests/apitests/spoolss/testlist.c | 6 +- win32ss/printing/base/marshalling.c| 212 + win32ss/printing/base/spoolss/CMakeLists.txt | 1 + win32ss/printing/base/spoolss/precomp.h| 1 + win32ss/printing/base/spoolss/spoolss.spec | 6 +- win32ss/printing/base/spoolss/tools.c | 50 - win32ss/printing/base/spoolsv/precomp.h| 2 + win32ss/printing/base/winspool/CMakeLists.txt | 1 + win32ss/printing/base/winspool/precomp.h | 2 + win32ss/printing/include/marshalling/marshalling.h | 35 win32ss/printing/include/marshalling/ports.h | 26 +++ win32ss/printing/include/spoolss.h | 1 - 15 files changed, 445 insertions(+), 55 deletions(-) diff --git a/modules/rostests/apitests/spoolss/CMakeLists.txt b/modules/rostests/apitests/spoolss/CMakeLists.txt index f838489dc4..d746573b24 100644 --- a/modules/rostests/apitests/spoolss/CMakeLists.txt +++ b/modules/rostests/apitests/spoolss/CMakeLists.txt @@ -3,6 +3,8 @@ include_directories(${REACTOS_SOURCE_DIR}/win32ss/printing/include) list(APPEND SOURCE AlignRpcPtr.c +MarshallDownStructuresArray.c +MarshallUpStructuresArray.c PackStrings.c ReallocSplStr.c SplInitializeWinSpoolDrv.c diff --git a/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c b/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c new file mode 100644 index 00..cd057074ec --- /dev/null +++ b/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c @@ -0,0 +1,118 @@ +/* + * PROJECT: ReactOS Spooler Router API Tests + * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * PURPOSE: Tests for MarshallDownStructuresArray + * COPYRIGHT: Copyright 2018 Colin Finck (co...@reactos.org) + */ + +#include + +#define WIN32_NO_STATUS +#include +#include +#include +#include +#include + +#include +#include +#include + +START_TEST(MarshallDownStructuresArray) +{ +const DWORD cElements = 2; +const DWORD dwPortInfo2Offsets[] = { +FIELD_OFFSET(PORT_INFO_2W, pPortName), +FIELD_OFFSET(PORT_INFO_2W, pMonitorName), +FIELD_OFFSET(PORT_INFO_2W, pDescription), +MAXDWORD +}; + +PPORT_INFO_2W pPortInfo2; +PPORT_INFO_2W pPortInfo2Copy; +PPORT_INFO_2W pPortInfo2Test; +PBYTE pPortInfoEnd; +PWSTR pwszStrings[] = { L"PortName", L"MonitorName", L"Description" }; +DWORD cbPortInfo2Size = cElements * (sizeof(PORT_INFO_2W) + (wcslen(pwszStrings[0]) + 1 + wcslen(pwszStrings[1]) + 1 + wcslen(pwszStrings[2]) + 1) * sizeof(WCHAR)); +DWORD fPortType = 1337; +DWORD Reserved = 42; + +// Setting cElements to zero should yield success. +SetLastError(0xDEADBEEF); +ok(MarshallDownStructuresArray(NULL, 0, NULL, 0, FALSE), "MarshallDownStructuresArray returns FALSE!\n"); +ok(GetLastError() == 0xDEADBEEF, "GetLastError returns %lu!\n", GetLastError()); + +// Setting cElements non-zero should fail with ERROR_INVALID_PARAMETER. +SetLastError(0xDEADBEEF); +ok(!MarshallDownStructuresArray(NULL, 1, NULL, 0, FALSE), "MarshallDownStructuresArray returns TRUE!\n"); +ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError returns %lu!\n", GetLastError()); + +// This is triggered by both pStructuresArray and pInfo. +SetLastError(0xDEADBEEF); +ok(!MarshallDownStructuresArray((PVOID)0xDEADDEAD, 1, NULL, 0, FALSE), "MarshallDownStructuresArray returns TRUE!\n"); +ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError returns %lu!\n", GetLastError()); + +SetLastError(0xDEADBEEF); +ok(!MarshallDownStructuresArray(N
[ros-diffs] [reactos] 01/01: [KERNEL32] Accept all images for NT 3.1 and higher instead of bailing out at image versions > 5.01 (#273)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63a3a2cbb8d67c1afe8b283880e75e0e5b5bed01 commit 63a3a2cbb8d67c1afe8b283880e75e0e5b5bed01 Author: Colin Finck <co...@reactos.org> AuthorDate: Wed Jan 10 09:24:22 2018 +0100 [KERNEL32] Accept all images for NT 3.1 and higher instead of bailing out at image versions > 5.01 (#273) Print a debug message whenever an application newer than ReactOS' internal NT version is started. This gets a simple "Hello World" compiled by VS' 2017 regular "v141" toolchain to run under ReactOS. Please retry NT6+ applications! --- dll/win32/kernel32/client/proc.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/dll/win32/kernel32/client/proc.c b/dll/win32/kernel32/client/proc.c index 3caf28e3c3..649dcd4f41 100644 --- a/dll/win32/kernel32/client/proc.c +++ b/dll/win32/kernel32/client/proc.c @@ -123,13 +123,25 @@ WINAPI BasepIsImageVersionOk(IN ULONG ImageMajorVersion, IN ULONG ImageMinorVersion) { -/* Accept images for NT 3.1 or higher, as long as they're not newer than us */ -return ((ImageMajorVersion >= 3) && -((ImageMajorVersion != 3) || - (ImageMinorVersion >= 10)) && -(ImageMajorVersion <= SharedUserData->NtMajorVersion) && -((ImageMajorVersion != SharedUserData->NtMajorVersion) || - (ImageMinorVersion <= SharedUserData->NtMinorVersion))); +/* Accept images for NT 3.1 or higher */ +if (ImageMajorVersion > 3 || +(ImageMajorVersion == 3 && ImageMinorVersion >= 10)) +{ +/* ReactOS-specific: Accept images even if they are newer than our internal NT version. */ +if (ImageMajorVersion > SharedUserData->NtMajorVersion || +(ImageMajorVersion == SharedUserData->NtMajorVersion && ImageMinorVersion > SharedUserData->NtMinorVersion)) +{ +DPRINT1("Accepting image version %lu.%lu, although ReactOS is an NT %hu.%hu OS!\n", +ImageMajorVersion, +ImageMinorVersion, +SharedUserData->NtMajorVersion, +SharedUserData->NtMinorVersion); +} + +return TRUE; +} + +return FALSE; } NTSTATUS
[ros-diffs] [reactos] 01/01: [NTOS:CM] Improve code in cmsysini.c (#216)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f5d366b2000be1915be3c48a5afb5535fb6e316e commit f5d366b2000be1915be3c48a5afb5535fb6e316e Author: Colin Finck <co...@reactos.org> AuthorDate: Sat Jan 6 13:27:41 2018 +0100 [NTOS:CM] Improve code in cmsysini.c (#216) Based on an original patch by Timo Kreuzer, with modifications by me to adapt it to latest HEAD and use a single exit path through the Cleanup label. This reliably frees all allocated handles. The original code returns STATUS_SUCCESS for many cases. This has been preserved. In the future, it should be checked though whether returning success is appropriate for all these cases. CORE-6844 --- ntoskrnl/config/cmsysini.c | 256 - 1 file changed, 136 insertions(+), 120 deletions(-) diff --git a/ntoskrnl/config/cmsysini.c b/ntoskrnl/config/cmsysini.c index a433485eb2..b95610552a 100644 --- a/ntoskrnl/config/cmsysini.c +++ b/ntoskrnl/config/cmsysini.c @@ -530,7 +530,10 @@ CmpCreateControlSet(IN PLOADER_PARAMETER_BLOCK LoaderBlock) CHAR ValueInfoBuffer[128]; PKEY_VALUE_FULL_INFORMATION ValueInfo; WCHAR UnicodeBuffer[128]; -HANDLE SelectHandle, KeyHandle, ConfigHandle = NULL, ProfileHandle = NULL; +HANDLE SelectHandle = NULL; +HANDLE KeyHandle = NULL; +HANDLE ConfigHandle = NULL; +HANDLE ProfileHandle = NULL; HANDLE ParentHandle = NULL; ULONG ControlSet, HwProfile; NTSTATUS Status; @@ -538,69 +541,76 @@ CmpCreateControlSet(IN PLOADER_PARAMETER_BLOCK LoaderBlock) PLOADER_PARAMETER_EXTENSION LoaderExtension; PAGED_CODE(); -/* Open the select key */ -InitializeObjectAttributes(, - , - OBJ_CASE_INSENSITIVE, - NULL, - NULL); -Status = NtOpenKey(, KEY_READ, ); -if (!NT_SUCCESS(Status)) +/* ReactOS Hack: Hard-code current to 001 for SetupLdr */ +if (LoaderBlock->RegistryBase == NULL) { -/* ReactOS Hack: Hard-code current to 001 for SetupLdr */ -if (!LoaderBlock->RegistryBase) +/* Build the ControlSet001 key */ +RtlInitUnicodeString(, + L"\\Registry\\Machine\\System\\ControlSet001"); +InitializeObjectAttributes(, + , + OBJ_CASE_INSENSITIVE, + NULL, + NULL); +Status = NtCreateKey(, + KEY_ALL_ACCESS, + , + 0, + NULL, + 0, + ); +if (!NT_SUCCESS(Status)) { -/* Build the ControlSet001 key */ -RtlInitUnicodeString(, - L"\\Registry\\Machine\\System\\ControlSet001"); -InitializeObjectAttributes(, - , - OBJ_CASE_INSENSITIVE, - NULL, - NULL); -Status = NtCreateKey(, - KEY_ALL_ACCESS, - , - 0, - NULL, - 0, - ); -if (!NT_SUCCESS(Status)) return Status; - -/* Create the Hardware Profile keys */ -Status = CmpCreateHardwareProfile(KeyHandle); -if (!NT_SUCCESS(Status)) -return Status; - -/* Don't need the handle */ -ZwClose(KeyHandle); +DPRINT1("Failed to create ControlSet001 key: 0x%lx\n", Status); +goto Cleanup; +} -/* Use hard-coded setting */ -ControlSet = 1; -goto UseSet; +/* Create the Hardware Profile keys */ +Status = CmpCreateHardwareProfile(KeyHandle); +if (!NT_SUCCESS(Status)) +{ +DPRINT1("Failed to create Hardware profile keys: 0x%lx\n", Status); +goto Cleanup; } -/* Fail for real boots */ -return Status; +/* Use hard-coded setting */ +ControlSet = 1; } +else +{ +/* Open the select key */ +InitializeObjectAttributes(, + , + OBJ_CASE_INSENSITIVE, + NULL, + NULL); +Status = NtOpenKey(, KEY_READ, ); +if (!NT_SUCCESS(Status)) +{ +DPRINT1("Failed to open select key: 0x%lx\n", Status); +goto Cleanup; +} -/* Open the current
[ros-diffs] [reactos] 01/01: [LOCALSPL] Fix parameter handling in LocalSetJob and add tests for the few ways we can easily test this function.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b93ba0f318f053b9aeff36a7c06334d8c0d0183 commit 3b93ba0f318f053b9aeff36a7c06334d8c0d0183 Author: Colin Finck <co...@reactos.org> AuthorDate: Mon Dec 25 14:30:47 2017 +0100 [LOCALSPL] Fix parameter handling in LocalSetJob and add tests for the few ways we can easily test this function. Yes, it checks the input handle and doesn't fail if an invalid level is given, because someone may still send a Command. This also fixes CORE-12794. Thanks for reporting! --- .../rostests/apitests/localspl/dll/CMakeLists.txt | 3 +- modules/rostests/apitests/localspl/dll/fpSetJob.c | 64 +++ modules/rostests/apitests/localspl/dll/main.c | 73 +- modules/rostests/apitests/localspl/testlist.c | 4 +- modules/rostests/apitests/localspl/tests.c | 5 ++ win32ss/printing/providers/localspl/jobs.c | 21 +++ 6 files changed, 153 insertions(+), 17 deletions(-) diff --git a/modules/rostests/apitests/localspl/dll/CMakeLists.txt b/modules/rostests/apitests/localspl/dll/CMakeLists.txt index 2ce4287611..4c518ee1b5 100644 --- a/modules/rostests/apitests/localspl/dll/CMakeLists.txt +++ b/modules/rostests/apitests/localspl/dll/CMakeLists.txt @@ -4,11 +4,12 @@ include_directories(${REACTOS_SOURCE_DIR}/win32ss/printing/include) list(APPEND SOURCE fpEnumPrinters.c fpGetPrintProcessorDirectory.c +fpSetJob.c main.c) add_library(localspl_apitest.dll SHARED ${SOURCE}) target_link_libraries(localspl_apitest.dll wine ${PSEH_LIB}) set_module_type(localspl_apitest.dll win32dll) -add_importlibs(localspl_apitest.dll spoolss msvcrt kernel32 ntdll) +add_importlibs(localspl_apitest.dll spoolss advapi32 msvcrt kernel32 ntdll) set_target_properties(localspl_apitest.dll PROPERTIES SUFFIX "") add_rostests_file(TARGET localspl_apitest.dll) diff --git a/modules/rostests/apitests/localspl/dll/fpSetJob.c b/modules/rostests/apitests/localspl/dll/fpSetJob.c new file mode 100644 index 00..810dc1aee6 --- /dev/null +++ b/modules/rostests/apitests/localspl/dll/fpSetJob.c @@ -0,0 +1,64 @@ +/* + * PROJECT: ReactOS Local Spooler API Tests Injected DLL + * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * PURPOSE: Tests for fpSetJob + * COPYRIGHT: Copyright 2017 Colin Finck (co...@reactos.org) + */ + +#include + +#define WIN32_NO_STATUS +#include +#include +#include +#include +#include +#include + +#include "../localspl_apitest.h" +#include + +extern PWSTR GetDefaultPrinterFromRegistry(VOID); +extern BOOL GetLocalsplFuncs(LPPRINTPROVIDOR pp); + +/* From printing/include/spoolss.h */ +#define MAX_PRINTER_NAME220 + +START_TEST(fpSetJob) +{ +HANDLE hPrinter = NULL; +PRINTPROVIDOR pp; +PWSTR pwszDefaultPrinter = NULL; + +if (!GetLocalsplFuncs()) +goto Cleanup; + +// Verify that fpSetJob returns ERROR_INVALID_HANDLE when nothing is provided. +ok(!pp.fpSetJob(NULL, 0, 0, NULL, 0), "fpSetJob returns TRUE\n"); +ok(GetLastError() == ERROR_INVALID_HANDLE, "fpSetJob returns error %lu!\n", GetLastError()); + +// Get the default printer. +pwszDefaultPrinter = GetDefaultPrinterFromRegistry(); +if (!pwszDefaultPrinter) +{ +skip("Could not determine the default printer!\n"); +goto Cleanup; +} + +if (!pp.fpOpenPrinter(pwszDefaultPrinter, , NULL)) +{ +skip("Could not open a handle to the default printer, last error is %lu!\n", GetLastError()); +goto Cleanup; +} + +// Verify that fpSetJob returns ERROR_INVALID_PARAMETER if only a printer handle is provided. +ok(!pp.fpSetJob(hPrinter, 0, 0, NULL, 0), "fpSetJob returns TRUE\n"); +ok(GetLastError() == ERROR_INVALID_PARAMETER, "fpSetJob returns error %lu!\n", GetLastError()); + +Cleanup: +if (pwszDefaultPrinter) +HeapFree(GetProcessHeap(), 0, pwszDefaultPrinter); + +if (hPrinter) +pp.fpClosePrinter(hPrinter); +} diff --git a/modules/rostests/apitests/localspl/dll/main.c b/modules/rostests/apitests/localspl/dll/main.c index 6914dc0c1e..260baa3639 100644 --- a/modules/rostests/apitests/localspl/dll/main.c +++ b/modules/rostests/apitests/localspl/dll/main.c @@ -2,7 +2,7 @@ * PROJECT: ReactOS Local Spooler API Tests Injected DLL * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) * PURPOSE: Main functions - * COPYRIGHT: Copyright 2015-2016 Colin Finck (co...@reactos.org) + * COPYRIGHT: Copyright 2015-2017 Colin Finck (co...@reactos.org) */ #define __ROS_LONG64__ @@ -27,14 +27,85 @@ // Test list extern void func_fpEnumPrinters(void); extern void func_fpGetPrintProcessorDirectory(void); +extern void func_fpSetJob(void); const struct test winetest_testlist[] = { { "fpEnumPrinters", func_fpEnumPrinters }, { "fpGetPrintProcessorDirectory", func
[ros-diffs] [reactos] 01/01: Replace our dxtn.dll by a version based on the libtxc_dxtn source code (#203)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=12b78f182da5f1c21ef4d53b4c938a4bb346defa commit 12b78f182da5f1c21ef4d53b4c938a4bb346defa Author: Colin Finck <co...@reactos.org> AuthorDate: Wed Dec 20 11:15:13 2017 +0100 Replace our dxtn.dll by a version based on the libtxc_dxtn source code (#203) This is no official system DLL and WineD3D is its only user. But latest WineD3D prefers the libtxc_dxtn codebase instead of the alternative library we used. This is also what Mesa uses and Fedora ships now that the patents have expired, so we should stick to the same. I'm importing the libtxc_dxtn-1.0.1 codebase from https://people.freedesktop.org/~cbrill/libtxc_dxtn/ It compiles warning-free in our tree without modifying a single line! I'm merging this Pull Request based on the positive response in CORE-12759. I lack a proper test case myself, but my version at least shouldn't make things worse. In my opinion, the previous one was broken anyway due to using stdcall imports when WineD3D called cdecl ones. This also removes the NSWPAT option from our buildsystem as dxtn was its latest user. --- dll/3rdparty/CMakeLists.txt |5 +- dll/3rdparty/dxtn/CMakeLists.txt |9 +- dll/3rdparty/dxtn/dxtn.c | 757 -- dll/3rdparty/dxtn/dxtn.h | 62 -- dll/3rdparty/dxtn/dxtn.spec | 18 +- dll/3rdparty/dxtn/fxt1.c | 1369 -- dll/3rdparty/dxtn/fxt1.h | 38 - dll/3rdparty/dxtn/internal.h | 138 --- dll/3rdparty/dxtn/txc_compress_dxtn.c| 843 dll/3rdparty/dxtn/{texstore.c => txc_dxtn.h} | 53 +- dll/3rdparty/dxtn/txc_fetch_dxtn.c | 243 + dll/3rdparty/dxtn/types.h| 11 - dll/3rdparty/dxtn/wrapper.c | 110 --- sdk/cmake/config-amd64.cmake |6 - sdk/cmake/config-arm.cmake |6 - sdk/cmake/config.cmake |6 - 16 files changed, 1118 insertions(+), 2556 deletions(-) diff --git a/dll/3rdparty/CMakeLists.txt b/dll/3rdparty/CMakeLists.txt index 936727c7b3..4ef9d7bce5 100644 --- a/dll/3rdparty/CMakeLists.txt +++ b/dll/3rdparty/CMakeLists.txt @@ -1,8 +1,5 @@ -if(NSWPAT) -add_subdirectory(dxtn) -endif() - +add_subdirectory(dxtn) add_subdirectory(libjpeg) add_subdirectory(libpng) add_subdirectory(libtiff) diff --git a/dll/3rdparty/dxtn/CMakeLists.txt b/dll/3rdparty/dxtn/CMakeLists.txt index b399df447b..e2e95fb08c 100644 --- a/dll/3rdparty/dxtn/CMakeLists.txt +++ b/dll/3rdparty/dxtn/CMakeLists.txt @@ -2,15 +2,10 @@ spec2def(dxtn.dll dxtn.spec) add_library(dxtn SHARED -fxt1.c -dxtn.c -wrapper.c -texstore.c +txc_compress_dxtn.c +txc_fetch_dxtn.c ${CMAKE_CURRENT_BINARY_DIR}/dxtn.def) set_entrypoint(dxtn 0) add_importlibs(dxtn msvcrt) -if(NOT MSVC) -add_target_compile_flags(dxtn "-Wno-unused-but-set-variable") -endif() add_cd_file(TARGET dxtn DESTINATION reactos/system32 FOR all) diff --git a/dll/3rdparty/dxtn/dxtn.c b/dll/3rdparty/dxtn/dxtn.c deleted file mode 100644 index e6e5988c00..00 --- a/dll/3rdparty/dxtn/dxtn.c +++ /dev/null @@ -1,757 +0,0 @@ -/* - * DXTn codec - * Version: 1.1 - * - * Copyright (C) 2004 Daniel Borca All Rights Reserved. - * - * this is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * this is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include - -#include "types.h" -#include "internal.h" -#include "dxtn.h" - - -/***\ - * DXTn encoder - * - * The encoder was built by reversing the decoder, - * and is vaguely based on FXT1 codec. Note that this code - * is merely a proof of concept, since it is highly UNoptimized! -\***/ - - -#define MAX_COMP 4 /* ever needed maximum number of components in texel */ -#define MAX_VECT 4 /* ever needed maximum number of base vectors to find */ -#define N_TEXELS 16 /* number of texels in a block (always 16) */ -#define COLOR565(v) (word)v)[RCOMP] & 0xf8) << 8) | (((v)[GCOMP] & 0xfc) << 3) | ((v)[BCOMP] >> 3)) - - -
[ros-diffs] [reactos] 01/01: [PRINTING] Fix GetPrinterW, add tests for it and GetDefaultPrinterA/W, and add a proper stub for GetPrinterDriverDirectoryA.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3a69fd4e966feb867fd730442a971041ade3965a commit 3a69fd4e966feb867fd730442a971041ade3965a Author: Colin Finck <co...@reactos.org> AuthorDate: Sun Dec 10 12:28:08 2017 +0100 [PRINTING] Fix GetPrinterW, add tests for it and GetDefaultPrinterA/W, and add a proper stub for GetPrinterDriverDirectoryA. * Pass the correct handle to _RpcGetPrinter in GetPrinterW. * Pass an empty string instead of a NULL pointer as wszComputerName to the GetPrinterLevel* functions, because this variable is later used as source for StringCbCopyExW. * Don't check for GetLastError() == ERROR_SUCCESS in tests. Windows apparently only sets the last error in case of failure. The Printing code should probably be changed similarly in a future commit. Should fix CORE-14072 --- modules/rostests/apitests/winspool/CMakeLists.txt | 1 + .../rostests/apitests/winspool/GetDefaultPrinter.c | 42 -- modules/rostests/apitests/winspool/GetPrinter.c| 65 ++ modules/rostests/apitests/winspool/testlist.c | 8 ++- win32ss/printing/base/winspool/printerdrivers.c| 8 +++ win32ss/printing/base/winspool/printers.c | 10 +++- win32ss/printing/base/winspool/winspool.spec | 2 +- win32ss/printing/providers/localspl/printers.c | 50 + 8 files changed, 155 insertions(+), 31 deletions(-) diff --git a/modules/rostests/apitests/winspool/CMakeLists.txt b/modules/rostests/apitests/winspool/CMakeLists.txt index 803d3d0c89..3a5bd52db5 100644 --- a/modules/rostests/apitests/winspool/CMakeLists.txt +++ b/modules/rostests/apitests/winspool/CMakeLists.txt @@ -4,6 +4,7 @@ list(APPEND SOURCE EnumPrinters.c EnumPrintProcessorDatatypes.c GetDefaultPrinter.c +GetPrinter.c GetPrinterData.c GetPrintProcessorDirectory.c IsValidDevmode.c diff --git a/modules/rostests/apitests/winspool/GetDefaultPrinter.c b/modules/rostests/apitests/winspool/GetDefaultPrinter.c index 728f10c24e..b40e74f5f0 100644 --- a/modules/rostests/apitests/winspool/GetDefaultPrinter.c +++ b/modules/rostests/apitests/winspool/GetDefaultPrinter.c @@ -13,7 +13,44 @@ #include #include -START_TEST(GetDefaultPrinter) +START_TEST(GetDefaultPrinterA) +{ +DWORD cchDefaultPrinter; +PSTR pszDefaultPrinter; + +// Don't supply any parameters, this has to fail with ERROR_INVALID_PARAMETER. +SetLastError(0xDEADBEEF); +ok(!GetDefaultPrinterA(NULL, NULL), "GetDefaultPrinterA returns TRUE!\n"); +ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetDefaultPrinterA returns error %lu!\n", GetLastError()); + +// Determine the size of the required buffer. This has to bail out with ERROR_INSUFFICIENT_BUFFER. +cchDefaultPrinter = 0; +SetLastError(0xDEADBEEF); +ok(!GetDefaultPrinterA(NULL, ), "GetDefaultPrinterA returns TRUE!\n"); +ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetDefaultPrinterA returns error %lu!\n", GetLastError()); + +// Try with a buffer large enough. +pszDefaultPrinter = HeapAlloc(GetProcessHeap(), 0, cchDefaultPrinter); +SetLastError(0xDEADBEEF); +ok(GetDefaultPrinterA(pszDefaultPrinter, ), "GetDefaultPrinterA returns FALSE!\n"); + +// SetDefaultPrinterA with NULL needs to succeed and leave the default printer unchanged. +SetLastError(0xDEADBEEF); +ok(SetDefaultPrinterA(NULL), "SetDefaultPrinterA returns FALSE!\n"); + +// SetDefaultPrinterA with the previous default printer also needs to succeed. +SetLastError(0xDEADBEEF); +ok(SetDefaultPrinterA(pszDefaultPrinter), "SetDefaultPrinterA returns FALSE!\n"); + +// SetDefaultPrinterA with an invalid printer name needs to fail with ERROR_INVALID_PRINTER_NAME. +SetLastError(0xDEADBEEF); +ok(!SetDefaultPrinterA("INVALID PRINTER NAME!!!"), "SetDefaultPrinterA returns TRUE!\n"); +ok(GetLastError() == ERROR_INVALID_PRINTER_NAME, "SetDefaultPrinterA returns error %lu!\n", GetLastError()); + +HeapFree(GetProcessHeap(), 0, pszDefaultPrinter); +} + +START_TEST(GetDefaultPrinterW) { DWORD cchDefaultPrinter; PWSTR pwszDefaultPrinter; @@ -33,17 +70,14 @@ START_TEST(GetDefaultPrinter) pwszDefaultPrinter = HeapAlloc(GetProcessHeap(), 0, cchDefaultPrinter * sizeof(WCHAR)); SetLastError(0xDEADBEEF); ok(GetDefaultPrinterW(pwszDefaultPrinter, ), "GetDefaultPrinterW returns FALSE!\n"); -ok(GetLastError() == ERROR_SUCCESS, "GetDefaultPrinterW returns error %lu!\n", GetLastError()); // SetDefaultPrinterW with NULL needs to succeed and leave the default printer unchanged. SetLastError(0xDEADBEEF); ok(SetDefaultPrinterW(NULL), "SetDefaultPrinterW returns FALSE!\n"); -ok(GetLastError() == ERROR_SUCCESS, "SetDefaultPrinterW returns error %lu!\n", GetLastError())
[ros-diffs] [reactos] 03/03: [WINSPOOL] Provide stubs with tracing and reasonable failure codes for even more popular Spooler APIs.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46b9165909e145bc8668c564d5ad764fa6553138 commit 46b9165909e145bc8668c564d5ad764fa6553138 Author: Colin Finck <co...@reactos.org> AuthorDate: Sat Dec 9 13:35:42 2017 +0100 [WINSPOOL] Provide stubs with tracing and reasonable failure codes for even more popular Spooler APIs. This may get more applications to work which previously called into the WINE-generated stubs (that throw an exception). It also improves debug logs when the "winspool" debug channel is enabled. With such detailed debug logs, we may get an idea which winspool APIs need to be implemented sooner than others. --- win32ss/printing/base/winspool/CMakeLists.txt| 1 + win32ss/printing/base/winspool/forms.c | 88 +++ win32ss/printing/base/winspool/monitors.c| 24 +++ win32ss/printing/base/winspool/ports.c | 64 win32ss/printing/base/winspool/printerdata.c | 106 - win32ss/printing/base/winspool/printerdrivers.c | 56 +++ win32ss/printing/base/winspool/printers.c| 56 ++- win32ss/printing/base/winspool/printprocessors.c | 40 - win32ss/printing/base/winspool/printproviders.c | 16 ++ win32ss/printing/base/winspool/winspool.spec | 182 +++ 10 files changed, 531 insertions(+), 102 deletions(-) diff --git a/win32ss/printing/base/winspool/CMakeLists.txt b/win32ss/printing/base/winspool/CMakeLists.txt index 71d18ba9a4..b4dcf8a163 100644 --- a/win32ss/printing/base/winspool/CMakeLists.txt +++ b/win32ss/printing/base/winspool/CMakeLists.txt @@ -5,6 +5,7 @@ spec2def(winspool.drv winspool.spec ADD_IMPORTLIB) list(APPEND SOURCE devmode.c +forms.c jobs.c main.c monitors.c diff --git a/win32ss/printing/base/winspool/forms.c b/win32ss/printing/base/winspool/forms.c new file mode 100644 index 00..50ce561338 --- /dev/null +++ b/win32ss/printing/base/winspool/forms.c @@ -0,0 +1,88 @@ +/* + * PROJECT: ReactOS Spooler API + * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * PURPOSE: Functions related to Forms + * COPYRIGHT: Copyright 2017 Colin Finck (co...@reactos.org) + */ + +#include "precomp.h" + +BOOL WINAPI +AddFormA(HANDLE hPrinter, DWORD Level, PBYTE pForm) +{ +TRACE("AddFormA(%p, %lu, %p)\n", hPrinter, Level, pForm); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +AddFormW(HANDLE hPrinter, DWORD Level, PBYTE pForm) +{ +TRACE("AddFormW(%p, %lu, %p)\n", hPrinter, Level, pForm); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +DeleteFormA(HANDLE hPrinter, PSTR pFormName) +{ +TRACE("DeleteFormA(%p, %s)\n", hPrinter, pFormName); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +DeleteFormW(HANDLE hPrinter, PWSTR pFormName) +{ +TRACE("DeleteFormW(%p, %S)\n", hPrinter, pFormName); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +EnumFormsA(HANDLE hPrinter, DWORD Level, PBYTE pForm, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned) +{ +TRACE("EnumFormsA(%p, %lu, %p, %lu, %p, %p)\n", hPrinter, Level, pForm, cbBuf, pcbNeeded, pcReturned); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +EnumFormsW(HANDLE hPrinter, DWORD Level, PBYTE pForm, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned) +{ +TRACE("EnumFormsW(%p, %lu, %p, %lu, %p, %p)\n", hPrinter, Level, pForm, cbBuf, pcbNeeded, pcReturned); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +GetFormA(HANDLE hPrinter, PSTR pFormName, DWORD Level, PBYTE pForm, DWORD cbBuf, PDWORD pcbNeeded) +{ +TRACE("GetFormA(%p, %s, %lu, %p, %lu, %p)\n", hPrinter, pFormName, Level, pForm, cbBuf, pcbNeeded); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +GetFormW(HANDLE hPrinter, PWSTR pFormName, DWORD Level, PBYTE pForm, DWORD cbBuf, PDWORD pcbNeeded) +{ +TRACE("GetFormW(%p, %S, %lu, %p, %lu, %p)\n", hPrinter, pFormName, Level, pForm, cbBuf, pcbNeeded); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +SetFormA(HANDLE hPrinter, PSTR pFormName, DWORD Level, PBYTE pForm) +{ +TRACE("SetFormA(%p, %s, %lu, %p)\n", hPrinter, pFormName, Level, pForm); +UNIMPLEMENTED; +return FALSE; +} + +BOOL WINAPI +SetFormW(HANDLE hPrinter, PWSTR pFormName, DWORD Level, PBYTE pForm) +{ +TRACE("SetFormW(%p, %S, %lu, %p)\n", hPrinter, pFormName, Level, pForm); +UNIMPLEMENTED; +return FALSE; +} diff --git a/win32ss/printing/base/winspool/monitors.c b/win32ss/printing/base/winspool/monitors.c index a5b30fe7f5..4a36895126 100644 --- a/win32ss/printing/base/winspool/monitors.c +++ b/win32ss/printing/base/winspool/monitors.c @@ -22,6 +22,14 @@ _MarshallUpMonitorInfo(PBYTE pMonitorInfo, DWORD Level) } } +BOOL WINAPI +AddMonitorA(PSTR pName, DWORD Level, PBYTE pMonitors) +{ +TRACE("AddMonitorA(%s, %lu, %p)\n", pName, Level,
[ros-diffs] [reactos] 01/03: [WINSPOOL] Convert the returned Unicode string back to ANSI in GetDefaultPrinterA.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=45b9b5c1ef203b6de89d8561008ab52843f3086c commit 45b9b5c1ef203b6de89d8561008ab52843f3086c Author: Colin Finck <co...@reactos.org> AuthorDate: Sat Dec 9 10:59:40 2017 +0100 [WINSPOOL] Convert the returned Unicode string back to ANSI in GetDefaultPrinterA. Thanks to Mark for the hint in CORE-14072! --- win32ss/printing/base/winspool/printers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32ss/printing/base/winspool/printers.c b/win32ss/printing/base/winspool/printers.c index 0441ff36ad..2abd5c3d0c 100644 --- a/win32ss/printing/base/winspool/printers.c +++ b/win32ss/printing/base/winspool/printers.c @@ -449,6 +449,9 @@ GetDefaultPrinterA(LPSTR pszBuffer, LPDWORD pcchBuffer) goto Cleanup; } +// We successfully got a string in pwszBuffer, so convert the Unicode string to ANSI. +WideCharToMultiByte(CP_ACP, 0, pwszBuffer, -1, pszBuffer, *pcchBuffer, NULL, NULL); + dwErrorCode = ERROR_SUCCESS; Cleanup:
[ros-diffs] [reactos] 01/01: [KD] [KD64] Introduce KdpPrintBanner and use it in all places where we print the (now consistent) banner instead of copying the code over and over again.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a7d388c3508956cc1cb365ea955cda36a1bded81 commit a7d388c3508956cc1cb365ea955cda36a1bded81 Author: Colin Finck <co...@reactos.org> AuthorDate: Mon Oct 16 11:47:14 2017 +0200 [KD] [KD64] Introduce KdpPrintBanner and use it in all places where we print the (now consistent) banner instead of copying the code over and over again. I still don't like that we're copying code between KD and KD64 instead of sharing it. But as both modules are totally distinct at the moment, I won't be the one introducing shared functions between them. This is a follow up to 50ae5e7c5268222718174221366169e2b115b06a, which TortoiseGit accidentally turned into a "Message only" commit... Never hit ALT+Y by mistake! ;) --- ntoskrnl/kd/kdio.c | 39 +++ ntoskrnl/kd64/kdinit.c | 28 +--- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c index 40795de8bc..8dc3366f03 100644 --- a/ntoskrnl/kd/kdio.c +++ b/ntoskrnl/kd/kdio.c @@ -96,6 +96,18 @@ KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return NumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024; } +/* See also: kd64\kdinit.c */ +static VOID +INIT_FUNCTION +KdpPrintBanner(IN SIZE_T MemSizeMBs) +{ +DPRINT1("-\n"); +DPRINT1("ReactOS " KERNEL_VERSION_STR " (Build " KERNEL_VERSION_BUILD_STR ") (Commit " KERNEL_VERSION_COMMIT_HASH ")\n"); +DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs); +DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions); +DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, KeLoaderBlock->NtHalPathName, KeLoaderBlock->ArcHalDeviceName, KeLoaderBlock->NtBootPathName); +} + /* FILE DEBUG LOG FUNCTIONS **/ VOID @@ -243,15 +255,8 @@ KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable, KeInitializeSpinLock(); /* Display separator + ReactOS version at start of the debug log */ -DPRINT1("-\n"); -DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n"); MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024; -DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs); -DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions); -DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, -KeLoaderBlock->NtHalPathName, -KeLoaderBlock->ArcHalDeviceName, -KeLoaderBlock->NtBootPathName); +KdpPrintBanner(MemSizeMBs); } else if (BootPhase == 2) { @@ -381,15 +386,8 @@ KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable, InsertTailList(, >KdProvidersList); /* Display separator + ReactOS version at start of the debug log */ -DPRINT1("-\n"); -DPRINT1("ReactOS " KERNEL_VERSION_STR " (Build " KERNEL_VERSION_BUILD_STR ") (Commit " KERNEL_VERSION_COMMIT_HASH "\n"); MemSizeMBs = KdpGetMemorySizeInMBs(KeLoaderBlock); -DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs); -DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions); -DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, -KeLoaderBlock->NtHalPathName, -KeLoaderBlock->ArcHalDeviceName, -KeLoaderBlock->NtBootPathName); +KdpPrintBanner(MemSizeMBs); } else if (BootPhase == 2) { @@ -556,15 +554,8 @@ KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable, KeInitializeSpinLock(); /* Display separator + ReactOS version at start of the debug log */ -DPRINT1("-\n"); -DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n"); MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024; -DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs); -DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions); -DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, -
[ros-diffs] [reactos] 01/01: [KD] [KD64] Introduce KdpPrintBanner and use it in all places where we print the (now consistent) banner instead of copying the code over and over again.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=50ae5e7c5268222718174221366169e2b115b06a commit 50ae5e7c5268222718174221366169e2b115b06a Author: Colin Finck <co...@reactos.org> AuthorDate: Mon Oct 16 11:40:52 2017 +0200 [KD] [KD64] Introduce KdpPrintBanner and use it in all places where we print the (now consistent) banner instead of copying the code over and over again. I still don't like that we're copying code between KD and KD64 instead of sharing it. But as both modules are totally distinct at the moment, I won't be the one introducing shared functions between them.
[ros-diffs] [reactos] 01/01: [WS2_32_APITEST] Make the apitest fully C89-compliant to fix building under MSVC 2010.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=da53a9399a5fa65451e2b23b2eb94d5ed358b7a2 commit da53a9399a5fa65451e2b23b2eb94d5ed358b7a2 Author: Colin Finck <co...@reactos.org> AuthorDate: Fri Oct 6 17:33:47 2017 +0200 [WS2_32_APITEST] Make the apitest fully C89-compliant to fix building under MSVC 2010. In C89, you can only initialize the first member of a union within a declaration. Unfortunately, that is the S_un_b UCHAR array for the S_un union inside struct in_addr. So we have to initialize it with each UCHAR member of Address. --- modules/rostests/apitests/ws2_32/bind.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/rostests/apitests/ws2_32/bind.c b/modules/rostests/apitests/ws2_32/bind.c index 56d4f41f99..1e8c393aa4 100644 --- a/modules/rostests/apitests/ws2_32/bind.c +++ b/modules/rostests/apitests/ws2_32/bind.c @@ -23,6 +23,11 @@ static VOID TestBind(IN_ADDR Address) { +const UCHAR b1 = Address.S_un.S_un_b.s_b1; +const UCHAR b2 = Address.S_un.S_un_b.s_b2; +const UCHAR b3 = Address.S_un.S_un_b.s_b3; +const UCHAR b4 = Address.S_un.S_un_b.s_b4; + int Error; struct { @@ -36,19 +41,19 @@ TestBind(IN_ADDR Address) { { SOCK_STREAM, IPPROTO_TCP, { AF_INET, PORT, {{{ 0x7f, 0x00, 0x00, 0x01 }}} }, 0, 0, { AF_INET, PORT, {{{ 0x7f, 0x00, 0x00, 0x01 }}} } }, { SOCK_STREAM, IPPROTO_TCP, { AF_INET, PORT, {{{ 0x00, 0x00, 0x00, 0x00 }}} }, 0, 0, { AF_INET, PORT, {{{ 0x00, 0x00, 0x00, 0x00 }}} } }, -{ SOCK_STREAM, IPPROTO_TCP, { AF_INET, PORT, Address }, 0, 0, { AF_INET, PORT, Address } }, +{ SOCK_STREAM, IPPROTO_TCP, { AF_INET, PORT, {{{ b1, b2, b3, b4 }}} }, 0, 0, { AF_INET, PORT, {{{ b1, b2, b3, b4 }}} } }, { SOCK_STREAM, IPPROTO_TCP, { AF_INET, PORT, {{{ 0xff, 0xff, 0xff, 0xff }}} }, SOCKET_ERROR, WSAEADDRNOTAVAIL }, { SOCK_STREAM, IPPROTO_TCP, { AF_INET, 0, {{{ 0x7f, 0x00, 0x00, 0x01 }}} }, 0, 0, { AF_INET, 0, {{{ 0x7f, 0x00, 0x00, 0x01 }}} } }, { SOCK_STREAM, IPPROTO_TCP, { AF_INET, 0, {{{ 0x00, 0x00, 0x00, 0x00 }}} } }, -{ SOCK_STREAM, IPPROTO_TCP, { AF_INET, 0, Address }, 0, 0, { AF_INET, 0, Address } }, +{ SOCK_STREAM, IPPROTO_TCP, { AF_INET, 0, {{{ b1, b2, b3, b4 }}} }, 0, 0, { AF_INET, 0, {{{ b1, b2, b3, b4 }}} } }, { SOCK_STREAM, IPPROTO_TCP, { AF_INET, 0, {{{ 0xff, 0xff, 0xff, 0xff }}} }, SOCKET_ERROR, WSAEADDRNOTAVAIL }, { SOCK_DGRAM, IPPROTO_UDP, { AF_INET, PORT, {{{ 0x7f, 0x00, 0x00, 0x01 }}} }, 0, 0, { AF_INET, PORT, {{{ 0x7f, 0x00, 0x00, 0x01 }}} } }, { SOCK_DGRAM, IPPROTO_UDP, { AF_INET, PORT, {{{ 0x00, 0x00, 0x00, 0x00 }}} }, 0, 0, { AF_INET, PORT, {{{ 0x00, 0x00, 0x00, 0x00 }}} } }, -{ SOCK_DGRAM, IPPROTO_UDP, { AF_INET, PORT, Address }, 0, 0, { AF_INET, PORT, Address } }, +{ SOCK_DGRAM, IPPROTO_UDP, { AF_INET, PORT, {{{ b1, b2, b3, b4 }}} }, 0, 0, { AF_INET, PORT, {{{ b1, b2, b3, b4 }}} } }, { SOCK_DGRAM, IPPROTO_UDP, { AF_INET, PORT, {{{ 0xff, 0xff, 0xff, 0xff }}} }, SOCKET_ERROR, WSAEADDRNOTAVAIL }, { SOCK_DGRAM, IPPROTO_UDP, { AF_INET, 0, {{{ 0x7f, 0x00, 0x00, 0x01 }}} }, 0, 0, { AF_INET, 0, {{{ 0x7f, 0x00, 0x00, 0x01 }}} } }, { SOCK_DGRAM, IPPROTO_UDP, { AF_INET, 0, {{{ 0x00, 0x00, 0x00, 0x00 }}} } }, -{ SOCK_DGRAM, IPPROTO_UDP, { AF_INET, 0, Address }, 0, 0,{ AF_INET, 0, Address } }, +{ SOCK_DGRAM, IPPROTO_UDP, { AF_INET, 0, {{{ b1, b2, b3, b4 }}} }, 0, 0,{ AF_INET, 0, {{{ b1, b2, b3, b4 }}} } }, { SOCK_DGRAM, IPPROTO_UDP, { AF_INET, 0, {{{ 0xff, 0xff, 0xff, 0xff }}} }, SOCKET_ERROR, WSAEADDRNOTAVAIL }, }; const INT TestCount = _countof(Tests);
[ros-diffs] [reactos] 01/01: [VERSION] Use --abbrev=7 for "git describe" to enforce a short hash of 7 characters no matter what the default is for your Git installation.
This is an automated email from the git hooks/post-receive script. www-data pushed a commit to branch master in repository reactos. View the commit online: https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71fba9dea18b1a8fe6be6a22bf25a273fd98f36d commit 71fba9dea18b1a8fe6be6a22bf25a273fd98f36d Author: Colin Finck <co...@reactos.org> AuthorDate: Wed Oct 4 20:44:52 2017 +0200 [VERSION] Use --abbrev=7 for "git describe" to enforce a short hash of 7 characters no matter what the default is for your Git installation. --- sdk/include/reactos/version.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/include/reactos/version.cmake b/sdk/include/reactos/version.cmake index 9c7cd1a9ee..808fb3b534 100644 --- a/sdk/include/reactos/version.cmake +++ b/sdk/include/reactos/version.cmake @@ -39,7 +39,7 @@ if(EXISTS "${REACTOS_SOURCE_DIR}/.git") endif() execute_process( -COMMAND "${GIT_EXECUTABLE}" describe +COMMAND "${GIT_EXECUTABLE}" describe --abbrev=7 WORKING_DIRECTORY ${REACTOS_SOURCE_DIR} OUTPUT_VARIABLE GIT_DESCRIBE_REVISION RESULT_VARIABLE GIT_CALL_RESULT -- To stop receiving notification emails like this one, please contact the administrator of this repository.
[ros-diffs] [reactos] branch master updated: Make ReactOS report the Git revision as output by "git describe".
This is an automated email from the git hooks/post-receive script. root pushed a commit to branch master in repository reactos. View the commit online: https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3d6040615a63c8d6f313b711a1fbb6e81227762a The following commit(s) were added to refs/heads/master by this push: new 3d6040615a Make ReactOS report the Git revision as output by "git describe". 3d6040615a is described below commit 3d6040615a63c8d6f313b711a1fbb6e81227762a Author: Colin Finck <co...@reactos.org> AuthorDate: Tue Oct 3 12:55:38 2017 +0200 Make ReactOS report the Git revision as output by "git describe". - REVISION is now something like "0.4.7-dev-53-g1304b53" instead of "r12345". - Change WINDOWS_NT_BANNER to better represent the ReactOS version and the reported NT version. - Introduce REACTOS_COMMIT_HASH which contains the full 40-character commit hash (for comparing revisions, e.g. in rosautotest/testman). --- modules/rostests/rosautotest/CConfiguration.cpp | 2 +- ntoskrnl/ex/init.c | 6 +- sdk/include/reactos/buildno.h.cmake | 3 +- sdk/include/reactos/mc/bugcodes.mc | 4 +- sdk/include/reactos/version.cmake | 81 +++-- sdk/include/reactos/version.h.cmake | 5 -- 6 files changed, 43 insertions(+), 58 deletions(-) diff --git a/modules/rostests/rosautotest/CConfiguration.cpp b/modules/rostests/rosautotest/CConfiguration.cpp index 51d3f98615..2a605b4502 100644 --- a/modules/rostests/rosautotest/CConfiguration.cpp +++ b/modules/rostests/rosautotest/CConfiguration.cpp @@ -119,7 +119,7 @@ CConfiguration::GetSystemInformation() /* Get the build from the define */ ss << "="; -ss << KERNEL_VERSION_BUILD_HEX; +ss << KERNEL_VERSION_COMMIT_HASH; ss << "="; diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c index 1c1d264255..71f27efe60 100644 --- a/ntoskrnl/ex/init.c +++ b/ntoskrnl/ex/init.c @@ -1428,15 +1428,12 @@ Phase1InitializationDiscard(IN PVOID Context) if (CmCSDVersionString.Length) { /* Print the version string */ -/* ReactOS specific: Append also the revision number */ Status = RtlStringCbPrintfExA(StringBuffer, Remaining, , , 0, - " r%u" ": %wZ", - KERNEL_VERSION_BUILD_HEX, ); if (!NT_SUCCESS(Status)) { @@ -1471,9 +1468,12 @@ Phase1InitializationDiscard(IN PVOID Context) if (NT_SUCCESS(MsgStatus)) { /* Create the banner message */ +/* ReactOS specific: Report ReactOS version, NtBuildLab information and reported NT kernel version */ Status = RtlStringCbPrintfA(EndBuffer, Remaining, (PCHAR)MsgEntry->Text, +KERNEL_VERSION_STR, +NtBuildLab, StringBuffer, NtBuildNumber & 0x, BeginBuffer); diff --git a/sdk/include/reactos/buildno.h.cmake b/sdk/include/reactos/buildno.h.cmake index 4f1e912a87..0dfc9f3171 100644 --- a/sdk/include/reactos/buildno.h.cmake +++ b/sdk/include/reactos/buildno.h.cmake @@ -3,13 +3,14 @@ #define _INC_REACTOS_BUILDNO #define KERNEL_VERSION_BUILD@KERNEL_VERSION_BUILD@ -#define KERNEL_VERSION_BUILD_HEX0x@KERNEL_VERSION_BUILD_HEX@ #define KERNEL_VERSION_BUILD_STR"@KERNEL_VERSION_BUILD@-@REVISION@" #define KERNEL_VERSION_BUILD_RC "@KERNEL_VERSION_BUILD@-@REVISION@\0" #define KERNEL_VERSION_RC "@KERNEL_VERSION@\0" #define KERNEL_VERSION_STR "@KERNEL_VERSION@" +#define KERNEL_VERSION_COMMIT_HASH "@COMMIT_HASH@" + #define REACTOS_DLL_VERSION_MAJOR @REACTOS_DLL_VERSION_MAJOR@ #define REACTOS_DLL_VERSION_RC "@DLL_VERSION_STR@\0" #define REACTOS_DLL_VERSION_STR "@DLL_VERSION_STR@" diff --git a/sdk/include/reactos/mc/bugcodes.mc b/sdk/include/reactos/mc/bugcodes.mc index 005447a430..574e006027 100644 --- a/sdk/include/reactos/mc/bugcodes.mc +++ b/sdk/include/reactos/mc/bugcodes.mc @@ -19,7 +19,9 @@ Severity=Informational Facility=System SymbolicName=WINDOWS_NT_BANNER Language=English -ReactOS (R) Kernel Version %hs (Build %u%hs) +ReactOS Version %s +Build %s +Reporting NT %s (Build %u%s) . MessageId=0x87 diff --git a/sdk/include/reactos/version.cmake b/sdk/include/reactos/version.cmake index e5f0bb1bed..6c224