SendMessageA for IME message
won't work in some situations.
JIRA issue: CORE-19268
Always use SendMessageW instead of
SendMessageA in ImmGenerateMessage.
CORE-20528
Addendum to commit 912c8ad987 (PR #5187)
Fix a bug where "KDCOM/KDGDB_NAME_ON_CD" CMake variables weren't used
as variables, but directly as names.
CORE-20433
The brush returned from WM_CTLCOLORLISTBOX message is ignored when painting the background. This bug can be found at https://bugs.winehq.org/show_bug.cgi?id=2948
Fixed by handling backgound painting in LISTBOX_PaintItem and LISTBOX_Paint functions.
Patch by @I_Kill_Bugs
Detect whether we run on XBOX or PC98 (on x86 builds), or on (U)EFI or on
a BIOS-based PC, or whether a generic linear framebuffer mode is used, in
order to choose the correct bootvid module to load, based from a predefined
file names list (ideally it should be derived from txtsetup.sif...).
Supersedes PR #8701.
Use `KeFindConfiguration*Entry()` to spelunk the hardware configuration
tree in the NT loader module.
Alternatively, allow the user to override the choice with a new `BOOTVID=`
boot option. In any case, if the selected bootvid module failed to be loaded,
silently fall back to the default bootvid.dll file. The fallback is done
by just letting the PE loader resolve the necessary exports from hal.dll
and ntoskrnl.exe.
CORE-10935
- This reverts commit 522e9f6dd3.
- Implement Mark's suggestion given in PR #7784,
https://github.com/reactos/reactos/pull/7784#pullrequestreview-2722604928
Build three binary versions of the delayimp_apitest, named:
delayimp_nohook_apitest, delayimp_globalhook_apitest, and delayimp_runtimehook_apitest,
that respectively are:
- "nohook": delayload is used, but neither of the hook/failurehook is defined;
- "globalhook": delayload is used, and the hooks are assigned at global scope;
- "runtimehook": delayload is used, and the hooks are assigned at runtime.
- Since the delayimp apitests are self-contained, don't use the separate
testlist.c file. It is temporarily unused, until other SDK-specific tests
are added in this directory.
## Testing observations:
GCC build (tested with KVM x86): binutils doesn't create specification-compliant
`IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT` table for delay-loaded imports, and as a
result, the tests show:
```
delayimp.cpp:472: Tests skipped: No IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT found,
some advanced features might not work!
```
Additionally, both `SymGetOptions` and `MapAndLoad` tests are skipped "until
CORE-6504 is fixed", as claimed. _**This doesn't happen for MSVC builds.**_
```
gdb_input.c(243): error C4477: '_snprintf' : format string '%p' requires
an argument of type 'void *', but variadic argument 1 has type 'UINT_PTR'
i386_sup.c(98): error C4090: 'return': different 'const' qualifiers
amd64_sup.c(115): error C4090: 'return': different 'const' qualifiers
```
But add KDGDB compilation only for x86 and x64, since for other
architectures (e.g. ARM) it currently emits the following error:
```
drivers/base/kdgdb/kdgdb.h(149): fatal error C1189: #error:
"Please define relevant macros for your architecture"
```
For the time being, keep the "GDB" build configuration macro, used for
Gitpod testing... but this needs to be replaced with a more robust solution.
Because of this, rename kdgdb.dll to kdcom.dll, and kdcom.dll to kdser.dll
so that GDB is used by default, and we don't get a file name clash too.
Revert also commit 57cf5cdc5d.
This is the same feature as the one that already exists in the
NTOS:KD!kdmain.c module used by the in-kernel KDBG debugger
(GCC builds), first introduced in commit 4ce30245de (r54473),
and documented at:
https://reactos.org/wiki/Debugging#Changing_the_serial_port_address
This feature is useful if one uses a PCI, PCIe, PCMCIA, or ExpressCard
serial card on real hardware (these cards are used e.g. with laptops
without a built-in serial port), or with AMT serial over LAN.
After determining the serial port I/O address (say, 0xCC00), specify
the debug port as follows:
/DEBUGPORT=COM:0xCC00
instead of the usual syntax: /DEBUGPORT=COMn (n an integer).
The same syntax can be used for debugging FreeLoader as well: in the
FREELDR.INI file, add a "Debug" line in the "FREELOADER" section,
as follows:
```
[FREELOADER]
Debug=/DEBUG /DEBUGPORT=COM:0xCC00 /BAUDRATE=115200
```
----
NOTE for KDCOM/KDGDB:
Since `strtoul()` is used, but isn't exported by ntoskrnl, link against
the "strtol" static library that has been introduced in commit d317d4fbcc
(r71481).
Don't loop past the end of the command-line buffer, if the command-line
terminates with a lone "DEBUGPORT" without any extra parameter following.
For example: "some things DEBUGPORT "
* test.h: remove obsolete wine specific definitions - __winetest_cdecl, __winetest_va_* aren't used anymore
* Add missing winetest_ prefixes
* Rename winetest_get_thread_data
* Update global variables
* Move winetest_thread_data
* Make winetest_get_thread_data extern
* [ISAPNP_UNITTEST] Use static inline instead of FORCEINLINE (GCC complains when a non-static inine function calls a static inline function)
* Move winetest_win_skip and make it static
* Move winetest_start_todo and make it static inline
* Move winetest_start_todo and make it static inline
* Move winetest_get_failures and winetest_add_failures and make them static
* Add winetest_print_lock and winetest_print_unlock
* Add winetest_get_time and winetest_elapsed
* Add flaky support
* Add exc_filter and running_under_wine
* Move reactos specific things together
Support for the BAUDRATE option was erroneously removed in commit 95faf65ebf.
As a result, the in-kernel KDBG debugger was always running with the
default debug port baud rate (115200 Bd), even if the user tried to
override it with the BAUDRATE option for supporting terminals that use
a different baud rate.
- Don't hardcode constant string lengths.
- Use `_strnicmp()` -- Ideally we shouldn't have to unconditionally upcase
the global kernel command-line string to perform substrings comparisons.
- Cast `atol()` returned value to `ULONG`.
- The "IRQ" debugger option was introduced in commit 5a6adb4f13 (r2546).
It was used by the in-kernel GDB stub, to manually wire an interrupt
handler `GspBreakIn()` to allow the debugger to break into the system
when a command is received on the GDB serial port.
Side-remark:
The hooking was done via `HalGetInterruptVector()` + `IoConnectInterrupt()`,
but only at phase 1 initialization when the memory manager was up, which
can be "late" enough during system boot initialization.
Instead of using `IoConnectInterrupt()`, one could have used explicit
`KeInitializeInterrupt()` + `KeConnectInterrupt()` calls that would
have worked much earlier in the boot stage.
- This functionality was soon after disabled in commit c804ca06be (r2946)
in the GDB stub (see `ntoskrnl/kd/gdbstub.c!KdGdbStubInit()`), never
to be re-enabled again.
It was removed completely in commit e160c0fb26 (r14799).
- Since ReactOS was (until recently) always debugged locally using the
in-kernel KDBG debugger, break-in was done with TAB-K keypress,
intercepted by the keyboard driver that triggered a `DbgBreakPoint()`,
thus no break-in via serial port interrupt was necessary.
- Remote debugger break-in detection, which is the standard method that
is used when remote-debugging using KD transport DLLs and WinDbg, was
introduced in commit 12e7593f24 (r25984). As with the rest of debugger
communication and as done on Windows, detection is done by polling the
serial port at certain times, namely in the `KeUpdateSystemTime()`
kernel procedure periodically invoked by the timer interrupt.
This break-in detection was then erroneously removed in commit bf8b9467dc
(r45140), and reinstated in commit 014b23b9a (r56194).
- Parsing of this "IRQ" option was copy-pasted in other modules (FreeLoader,
KDCOM, and KDGDB), even though it was never used. The parsing was then
removed in KDBG itself in commit 95faf65ebf, but left in the other
modules... until now!
- Use DEFAULT_DEBUG_BAUD_RATE for the debug serial port.
- Use a less dramatic "Serial port not available" (without '!')
instead of "Serial port not found!" message, in case ReactOS
BSODs without a debugger attached to a serial port.
Sometimes people mistake this informational line as one of the
reasons why ReactOS BSODed or whatnot...
- Replace "Serial port found" by "Using COM..." message.
Cherry-picking commit
3158b917a2
See https://github.com/bobranten/Ext4Fsd/issues/83 for more information,
and debug traces.
## How to reproduce:
- Format a partition in Ext2 with Paragon Hard Disk Manager 2010 Professional.
- Compile ReactOS with MSVC, ensuring that the driver is compiled with
`EXT2_HTREE_INDEX` defined and set to 1, and with Run-time error checks
enabled with the `/RTC1` flag (this is the default in our source tree).
- Install ReactOS on this partition.
## What's being observed:
After reboot, some filesystem paths are accessed, and the code inside the
`#ifdef EXT2_HTREE_INDEX` block is taken (in ext2/src/dirctl.c#L777-L794).
For some reasons, the retrieved `rc` doesn't get the "expected" value and
the `goto errorout;` path is taken. After this label, `FileIndex` was
reset to `ByteOffset`, which remained uninitialized.
A bugcheck ensues because of the failed check (usage of uninitialized variable).
CORE-11954, CORE-16216, CORE-17518, CORE-17604, CORE-17977
The mkisofs options are quite long and repetitive (mostly duplicated 4 times
for the current 4 different ISO targets), and are also hard to read (i.e.
which group of options go together).
Reorganize the mkisofs ISO boot-related options in different thematic sets
and make them modular too. This also allow to conditionally add/remove ISO
boot entries for different platforms, for example:
- BIOS-based PC builds (only x86/x64) get the BIOS bootsector (excluded from IA64 and ARM32/64);
- EFI-based architectures get the EFI boot entry.
Based on a suggestion by Mark Jansen (see PR #4407).
Dedicated to Justin Miller ;)
_variant_t inherits from tagVARIANT aka VARIANT and C++ will always prioritize the built-in conversion to the base class over the use of a user-defined conversion operator.
Fixes GCC 13 warning:
In file included from C:/ReactOS/reactos/sdk/include/vcruntime/comdef.h:19,
from C:/ReactOS/reactos/sdk/lib/comsupp/comsupp.cpp:16:
C:/ReactOS/reactos/sdk/include/vcruntime/comutil.h:423:3: error: converting '_variant_t' to a base class 'VARIANT' {aka 'tagVARIANT'} will never use a type conversion operator [-Werror=class-conversion]
423 | operator VARIANT() const throw();
| ^~~~~~~~
Someone familiar with this should do a more proper fix.
C:/ReactOS/reactos/sdk/lib/atl/atlcom.h: In instantiation of 'class ATL::CComObject<CRShellClassFactory>':
C:/ReactOS/reactos/sdk/include/reactos/shellutils.h:357:45: required from 'HRESULT ShellObjectCreatorInit(T1, const IID&, void**) [with T = CRShellClassFactory; T1 = _GUID; HRESULT = long int; IID = _GUID]'
C:/ReactOS/reactos/base/shell/rshell/misc.cpp:256:55: required from here
C:/ReactOS/reactos/base/shell/rshell/misc.cpp:210:28: error: 'virtual HRESULT CRShellClassFactory::CreateInstance(LPUNKNOWN, const IID&, void**)' was hidden [-Werror=overloaded-virtual=]
210 | virtual HRESULT WINAPI CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject)
| ^~~~~~~~~~~~~~
In file included from C:/ReactOS/reactos/base/shell/rshell/misc.cpp:33:
C:/ReactOS/reactos/sdk/lib/atl/atlcom.h:171:27: note: by 'static HRESULT ATL::CComObject<Base>::CreateInstance(ATL::CComObject<Base>**) [with Base = CRShellClassFactory; HRESULT = long int]'
171 | static HRESULT WINAPI CreateInstance(CComObject<Base> **pp)
| ^~~~~~~~~~~~~~
C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp: In function 'BOOLEAN UniataChipDetectChannels(PVOID, PPCI_COMMON_CONFIG, ULONG, PPORT_CONFIGURATION_INFORMATION)':
C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp:111:5: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
111 | for(i=deviceExtension->AHCI_PI_mask, n=0; i; n++, i=i>>1);
| ^~~
In file included from C:/ReactOS/reactos/drivers/storage/ide/uniata/stdafx.h:13,
from C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp:48:
C:/ReactOS/reactos/drivers/storage/ide/uniata/atapi.h:154:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
154 | #define KdPrint2(_x_) {;}
| ^
C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp:112:5: note: in expansion of macro 'KdPrint2'
112 | KdPrint2((PRINT_PREFIX "mask -> %d chans\n", n));
| ^~~~~~~~
C:/ReactOS/reactos/dll/win32/oleaut32/vartype.c: In function '_VarI1FromUI1':
C:/ReactOS/reactos/dll/win32/oleaut32/vartype.c:159:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
159 | if (in > (dest)tst) return DISP_E_OVERFLOW; *out = in; return S_OK; }
| ^~
C:/ReactOS/reactos/dll/win32/oleaut32/vartype.c:166:1: note: in expansion of macro 'POSTST'
166 | POSTST(signed char, BYTE, VarI1FromUI1, I1_MAX)
| ^~~~~~
C:/ReactOS/reactos/dll/win32/oleaut32/vartype.c:159:47: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
159 | if (in > (dest)tst) return DISP_E_OVERFLOW; *out = in; return S_OK; }
| ^
C:/ReactOS/reactos/dll/win32/oleaut32/vartype.c:166:1: note: in expansion of macro 'POSTST'
166 | POSTST(signed char, BYTE, VarI1FromUI1, I1_MAX)
| ^~~~~~
Fixes GCC 13 warning about misleading indentation.
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c: In function 'acpi_evaluate_reference':
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:367:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
367 | if (buffer.Pointer)
| ^~
In file included from C:/ReactOS/reactos/drivers/bus/acpi/acpica/include/acpi.h:70,
from C:/ReactOS/reactos/drivers/bus/acpi/precomp.h:6,
from C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:26:
C:/ReactOS/reactos/drivers/bus/acpi/acpica/include/acoutput.h:496:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
496 | #define return_ACPI_STATUS(s) return(s)
| ^~~~~~
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:370:9: note: in expansion of macro 'return_ACPI_STATUS'
370 | return_ACPI_STATUS(status);
| ^~~~~~~~~~~~~~~~~~
Fixes GCC 13 warning about misleading indentation.
C:/ReactOS/reactos/modules/rostests/winetests/advapi32/cred.c: In function 'func_cred':
C:/ReactOS/reactos/modules/rostests/winetests/advapi32/cred.c:809:5: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
809 | else
| ^~~~
In file included from C:/ReactOS/reactos/modules/rostests/winetests/advapi32/cred.c:28:
C:/ReactOS/reactos/sdk/include/wine/test.h:168:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
168 | #define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
| ^
C:/ReactOS/reactos/sdk/include/wine/test.h:176:18: note: in expansion of macro 'trace_'
176 | #define trace trace_(__FILE__, __LINE__)
| ^~~~~~
C:/ReactOS/reactos/modules/rostests/winetests/advapi32/cred.c:812:9: note: in expansion of macro 'trace'
812 | trace("domain password:\n");
| ^~~~~
Fixes GCC 13 warnings about misleading indentation.
C:/ReactOS/reactos/dll/win32/shell32/wine/classes.c: In function 'HCR_GetIconA':
C:/ReactOS/reactos/dll/win32/shell32/wine/classes.c:357:5: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
357 | else
| ^~~~
C:/ReactOS/reactos/dll/win32/shell32/wine/classes.c:360:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
360 | return ret;
| ^~~~~~
C:/ReactOS/reactos/dll/win32/shell32/wine/shellord.c: In function 'SHCreateStdEnumFmtEtc':
C:/ReactOS/reactos/dll/win32/shell32/wine/shellord.c:2455:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
2455 | if (FAILED(hRes))
| ^~
In file included from C:/ReactOS/reactos/sdk/include/psdk/objbase.h:252,
from C:/ReactOS/reactos/sdk/include/psdk/ole2.h:25,
from C:/ReactOS/reactos/sdk/include/psdk/shlobj.h:22,
from C:/ReactOS/reactos/dll/win32/shell32/wine/shellord.c:32:
C:/ReactOS/build-gcc-x86/sdk/include/psdk/objidl.h:9734:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
9734 | #define IEnumFORMATETC_AddRef(This) (This)->lpVtbl->AddRef(This)
| ^
C:/ReactOS/reactos/dll/win32/shell32/wine/shellord.c:2458:9: note: in expansion of macro 'IEnumFORMATETC_AddRef'
2458 | IEnumFORMATETC_AddRef(pef);
| ^~~~~~~~~~~~~~~~~~~~~
Triggered by GCC 13:
C:/ReactOS/reactos/dll/3rdparty/libtiff/tif_luv.c:822:18: error: argument 1 of type 'float[3]' with mismatched bound [-Werror=array-parameter=]
822 | XYZtoRGB24(float xyz[3], uint8 rgb[3])
| ~~~~~~^~~~~~
In file included from C:/ReactOS/reactos/sdk/include/reactos/libs/libtiff/tiffiop.h:64,
from C:/ReactOS/reactos/dll/3rdparty/libtiff/precomp.h:3,
from C:/ReactOS/reactos/dll/3rdparty/libtiff/tif_luv.c:25:
C:/ReactOS/reactos/sdk/include/reactos/libs/libtiff/tiffio.h:507:24: note: previously declared as 'float *'
507 | extern void XYZtoRGB24(float*, uint8*);
| ^~~~~~