Commit graph

361 commits

Author SHA1 Message Date
Victor Perevertkin 74ec94e12c [CMAKE] Some options are only supported by GCC, don't use them for clang
These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
2021-04-09 03:58:19 +03:00
Jérôme Gardou 3a14c97d0c [LIBCNTPR] Fix a typo
There is no console to display to.
2021-03-25 11:54:49 +01:00
Serge Gautherie 49639c7759
[ATL] CWindowImplBaseT::WindowProc(): Narrow 2 ATLASSERT() down (#3529)
Addendum to e076e05. CORE-17505
2021-03-25 19:51:29 +09:00
Jérôme Gardou 162f51e6b8 [OLDNAMES] Add missing isascii 2021-03-17 18:52:58 +01:00
Jérôme Gardou 7e5c1872ee [RTL] Improve performance by introducing a hint array for free entries
The array is there for the entries smaller than the decommit threshold, the rationale
being that entries which are larger will likely be split for honoring other allocations
or be coalesced and eventually decommitted.

This with the previous commits make a huge perf boost to memory-intensive applications like cmake

CORE-15793
2021-03-16 13:23:21 +01:00
Jérôme Gardou 325737f855 [SDK:RTL] Track the end of uncommitted ranges thanks to a "Guard" entry that we put at the end of each committed page
This avoids busy loop to get the last valid entry of the previous committed range when committing a new one.

CORE-15793
2021-03-16 13:23:21 +01:00
Katayama Hirofumi MZ e076e0576f [ATL] Add NULL-check in CWindowImplBaseT::WindowProc assertions
CORE-17505
2021-03-11 21:20:40 +09:00
Katayama Hirofumi MZ 9259ded8ae
[ATL][SHELL32][EXPLORER] Disable ATLASSERT (#3527)
We are not ready for enabling ATLASSERT. Enabling ATL assertions takes time to realize. CORE-17505
- Disable ATLASSERT by undefining _DEBUG.
- Revert currently non-fixable codes.
2021-03-11 20:26:45 +09:00
Katayama Hirofumi MZ 4f83032a12 [ATL] Split CWindowImplBaseT::WindowProc asserion
CORE-9281
2021-03-11 17:18:43 +09:00
Serge Gautherie 0975c5ef40
[ATL] CMakeLists.txt: Use a bare endif() (#3523)
Addendum to 98203ce.
2021-03-11 08:38:04 +09:00
Victor Perevertkin df35c8d05e
[SDK:KMDF] Populate OsVersionInfo in our static linking hack 2021-03-10 18:41:46 +03:00
Victor Perevertkin 6d1ca3553e
[SDK:KMDF] Fix calling convention for the kernel function pointers 2021-03-10 18:41:03 +03:00
Katayama Hirofumi MZ 98203cea23
[CMAKE] Define _DEBUG for better ATL debugging (Retry) (#3519)
CORE-17505
2021-03-10 22:59:13 +09:00
Victor Perevertkin 0a26c7c5d2
[SDK:DDK] Implement the Auxiliary Kernel-Mode Library
And uncomment the code in KMDF which uses it
2021-03-10 16:43:59 +03:00
Jérôme Gardou 0c34c067c4 [CRT] Add CFI annotatiions to memmove function 2021-03-09 19:42:49 +01:00
Jérôme Gardou 65b6af58f9 [SDK:RTL] Statically initialize RtlCriticalSectionList
This might be used before RtlpInitDeferedCriticalSection gets called
2021-03-03 14:10:47 +01:00
Jérôme Gardou 2306c83e5c [CMAKE] Explicitly declare libcntpr as a static lib 2021-03-03 08:34:32 +01:00
Serge Gautherie 55b93aecdc
[CMAKE] target_compile_definitions() calls: Remove (now) useless '-D' (#3490)
Documented as automatically removed, since CMake 3.12.4 at least.
https://cmake.org/cmake/help/v3.12/command/target_compile_definitions.html
2021-03-03 04:16:02 +01:00
Serge Gautherie e898c9e0df
[RTL_VISTA] CMakeLists.txt: Fix 'rtl' copypasta (#3489)
Addendum to 6119239.
2021-03-02 19:06:17 +01:00
Katayama Hirofumi MZ e24d3cc952
[SDK][ATL] Fix CWindow::GetWindowText method of BSTR (#3498)
- Fix generic text mapping for GetWindowText and GetWindowTextLength functions.
- Fix the position.
- Fix the length.
- Fail elegantly if necessary.

CORE-9281
2021-03-02 17:50:00 +09:00
Katayama Hirofumi MZ ef3e7a3717
[SDK][ATL] Implement UnsubclassWindow methods (#3492)
I want UnsubclassWindow methods.
- Implement CWindowImpl::UnsubclassWindow method.
- Implement CContainedWindowT::UnsubclassWindow method.
- Add SubclassWindow testcase to atl_apitest test program.
- Fix generic text mapping of <atlwin.h>.
CORE-9281
2021-02-28 12:45:16 +09:00
Hervé Poussineau bbf7b5b72a [CRT/x64] Correctly implement fabs for GCC
Note that MSVC does not recognize 'fabs' as a valid label name.
See fee844b6ff and 2f7cf157d8
2021-02-01 19:57:12 +01:00
Hervé Poussineau 349e0ddde8 [PSEH] Fix test on non-existent variable, so GCC x64 now always uses native SEH instead of PSEH 2021-02-01 19:57:12 +01:00
Jérôme Gardou d712c895fd [RTL] Fix a typo & remove useless cast 2021-02-01 09:09:19 +01:00
Jérôme Gardou 6a4c6ea5d0 [RTL] Implement RtlTryAcquireSRWLockExclusive & RtlTryAcquireSRWLockShared 2021-01-29 18:42:54 +01:00
Jérôme Gardou 2486558ae1 [RTL] Do not mess with critical section lock when there is no reason to.
- When process is shutting down.
 - When the caller is so drunk that they leave twice the pub altough they entered it only once.
2021-01-29 18:18:09 +01:00
Jérôme Gardou 6d697561f0 [RTL] Fix heap usage flags
- Use Heap->ForceFlags where needed
 - Use passed-in flags instead of the heap flags in some places
 - Do not recursively acquire the heap lock
2021-01-29 09:42:13 +01:00
Hervé Poussineau 457b83f76a [PSEH] When using GCC x64, use native SEH support instead of PSEH 2021-01-28 20:44:21 +01:00
Hervé Poussineau c345f7f137 [ASM x64] Make UNIMPLEMENTED macro self-suffisant
This fixes link errors with MsgUnimplemented not defined on binaries not linking to CRT.
2021-01-28 20:31:16 +01:00
Jérôme Gardou af3527d4d2 [MSVCRTEX] Do not include _CI* math functions
They are exported by msvcrt
CORE-17423
2021-01-21 09:43:43 +01:00
Mark Jansen 69dffed3f7 [CMAKE] Fix MSVC configuring 2021-01-15 20:43:10 +01:00
Hervé Poussineau 0cce1348c6 [CRT/x64] Make _fpreset/_logb public, as they are exported using the .spec file 2021-01-07 21:12:11 +01:00
Hervé Poussineau a644e7f5fd [CRT/x64] Disable MSVCRT__setjmp function, which references non-existent function __wine_setjmpex
_setjmp is already defined in sdk/lib/crt/setjmp/amd64/setjmp.s
2021-01-07 21:12:11 +01:00
Hervé Poussineau 80b1b0b294 [CRT] Fix hack for GCC x64, when CRT is linking against RosBE libstdc++ 2021-01-05 19:24:23 +01:00
Jérôme Gardou c8d07514c8 [CMAKE] Fix GCC -fstack-protector usage 2021-01-05 13:38:57 +01:00
Jérôme Gardou 8a6d653044 [CRT] Fix _onexit
Avoid calling malloc in CR initialisation code.
Have executables call msvcrt implementation, while the DLLs keep their own function tables

CORE-17362
2020-12-30 19:03:52 +01:00
Jérôme Gardou 6c6d9bee68 [CRT] Do not call atexit at process initialization
There is no guarantee that the underlying APIs are initialized at this point

CORE-17362
2020-12-30 19:03:52 +01:00
Jérôme Gardou 26863538a4 [CRT] Format source a bit.
This is horrendous.
2020-12-30 19:03:52 +01:00
Jérôme Gardou b96e88894a [CMAKE] Turn import libs into regular C static libs
Embed msvcrtex into libmsvcrt

Idea taken from Thomas Faber
2020-12-28 12:13:30 +01:00
Joachim Henze b0d136ffcf [RTL] Fix build on MSVC bots part 2
Then stick with your stupid PCH on master already.
Addendum to 0.4.15-dev-1453-g 4ad7b6d
2020-12-17 15:01:50 +01:00
Joachim Henze dd3c540928 [RDBSSLIB][RTL] Fix build on MSVC bots
Addendum to 0.4.15-dev-1453-g 4ad7b6d
Looks like CMake on master does not longer understand the syntax of
replace_compile_flags().
Will investigate that later again, when other issues have been
solved that do currently prevent me from testing that locally at all.
Most likely remove_target_compile_option() has to be used instead now.
2020-12-17 14:33:26 +01:00
Joachim Henze 4ad7b6d634 [APISETS][RDBSSLIB][RTL] Fix some build issues for MSVC Rls-config CORE-17402
A subset of the patch that is intended to fix all build issues in releases/0.4.14
for compiler MSVC 2010SP1 16.0.40219.1 with RosBE 2.1.6
I left out the changes for disk_new in master because the drivers sources
were replaced since the branching.

Thanks to Mark Jansen for providing the apisets part.

VBox https://reactos.org/testman/compare.php?ids=75522,75524
KVM https://reactos.org/testman/compare.php?ids=75521,75523
2020-12-17 13:31:43 +01:00
Timo Kreuzer 883ae6d93b [RTL] Fix RtlImageDirectoryEntryToData to support both 32 and 64 bit images 2020-12-06 16:37:57 +01:00
Hermès Bélusca-Maïto 8d3e80e437
[FSLIB][FMIFS][AUTOCHK][SETUPLIB] Use more Windows-compatible (but not fully compatible yet) Format() and Chkdsk() ULIB functions.
[AUTOCHK] Add also support for scanning FATX volumes.

The Format(), FormatEx(), Chkdsk(), ChkdskEx() functions exposed by the
U*.DLL user-mode FS library dlls are different (and have different
prototypes) than the similarly-named functions exported by FMIFS.DLL .

In particular, what we used to call "xxxChkdskEx()" and "xxxFormatEx()"
in our U*.DLL libraries actually correspond more, from their arguments,
to the "Chkdsk()" and "Format()" functions in Windows' U*.DLL . Their
*Ex() counterparts instead take most of the parameters through a
structure passed by pointer.

On FMIFS.DLL side, while FMIFS!Chkdsk() calls U*.DLL!Chkdsk() and
FMIFS!ChkdskEx() calls U*.DLL!ChkdskEx() (and we do not implement these
*Ex() functions at the moment), both FMIFS!Format() and FMIFS!FormatEx()
call U*.DLL!Format() instead, while FMIFS!FormatEx2() calls
U*.DLL!FormatEx() (that we do not implement yet either) !!

To improve that, refactor the calls to these U*.DLL functions so as to
respect the more compatible prototypes: They contain the correct number
of parameters in a compatible order. However, some of the parameters do
not have the same types yet: the strings are kept here in PUNICODE_STRINGS,
while on Windows they are passed via an undocumented DSTRING struct, and
the FMIFS callback is instead a MESSAGE struct/class on Windows.
Finally, the MEDIA_TYPE parameter in U*.DLL!Format() is equivalent, yet
not fully 100% in 1-to-1 correspondence, with the FMIFS_MEDIA_FLAG used
in the corresponding FMIFS.DLL functions.

One thing to notice is that the U*.DLL!Format() (and the Ex) functions
support a BOOLEAN (a flag resp.) for telling that a backwards-compatible
FS version should be used instead of the (default) latest FS version.
This is used e.g. by the FAT FS, where by default FAT32 is selected
(depending also on other constraints like, the disk and the partition
sizes), unless that bit is set in which case, FAT16 (or 12) is used.
2020-11-22 21:57:07 +01:00
Hermès Bélusca-Maïto cdaa5d5fc7
[BTRFSLIB] Reduce the diff with upstream, and fix a memory leak.
- Reduce the diff with upstream by aliasing malloc() and free()
  with RtlAllocateHeap() and RtlFreeHeap() respectively.

- Fix a memory leak in the failure code path of the do-while
  memory reallocation loop for IOCTL_BTRFS_QUERY_FILESYSTEMS
  in is_mounted_multi_device().
2020-11-22 21:34:13 +01:00
Jérôme Gardou b0abd14b03 [ATL] Declare pointer as return type for functions returning pointers 2020-11-16 16:58:10 +01:00
Jérôme Gardou 281389b7e7 [CRT] Use ASM aliases for CLang builds 2020-11-16 16:58:10 +01:00
Jérôme Gardou 15c9f63b65 [MSVCRTEX] Add some floating point functions for CLang build
Clang makes optimisations requiring functions not present in msvcrt
2020-11-16 16:58:10 +01:00
Victor Perevertkin 7c734db034
[WDF] Enable Resource and Interrupt APIs 2020-11-04 19:34:14 +03:00
Victor Perevertkin 1f377076d7
[WDF] Fix KMDF so it can compile with ReactOS SDK
Not all files are included, but these are necessary to compile cdrom driver.
So far it can only be statically linked with drivers, a proper
implementation requires wdfldr helper driver
2020-11-03 00:06:27 +03:00