Timo Kreuzer
aea4cfba55
[CRT] Add some missing #pragma function
2021-07-11 21:45:29 +02:00
Jérôme Gardou
0ffbbab5a2
[CRT] Revert unwanted part of f30136bc79
2021-06-29 12:48:25 +02:00
Jérôme Gardou
f30136bc79
[NTOS:KE] Test spinlock ownership on both UP & MP build
...
There is no reason not to, and this avoids introducing bugs stupidly.
2021-06-29 11:49:20 +02:00
Victor Perevertkin
34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces
2021-06-11 15:33:08 +03:00
Timo Kreuzer
0520c75aaf
[CRT] Implement __C_specific_handler
2021-06-05 13:52:42 +02:00
Stanislav Motylkov
11687e9e43
[CRT][ARM] Fix uninitialized variables caught by RTC
...
CORE-17613
2021-06-02 13:18:40 +03:00
Timo Kreuzer
db0c59cbd4
[CRT] Use the asm version of sqrt on amd64
2021-05-28 11:52:42 +02:00
Jérôme Gardou
802665a4ac
[CRT] Also use alias _rot functions for clang-cl amd64 build
2021-05-03 22:00:57 +02:00
Jérôme Gardou
439aefb31d
[CRT] Sync tlssup.c with mingw-w64
...
This allows amd64 built binary to be loaded.
2021-04-28 13:10:23 +02:00
Jérôme Gardou
fe3278d4d6
[CRT] We never use the mthread library
2021-04-28 13:10:23 +02:00
Jérôme Gardou
d31856cda1
[CRT] Do not include unneeded PSEH header
2021-04-28 13:10:23 +02:00
Jérôme Gardou
e470b58376
[REACTOS] Explicitly link against pseh & include pseh headers in a few places
2021-04-28 13:10:23 +02:00
Serge Gautherie
b8ae966634
[CRT] exp2*.c: Add an explicit type for 'TWO' variable
...
Addendum to 199adee
.
2021-04-27 10:36:54 +03:00
Jérôme Gardou
3731fd1661
[CRT] Properly declare rot functions in public headers
2021-04-09 15:12:13 +02:00
Jérôme Gardou
620f333252
[CRT] Fix rot functions aliases in non-x86 clang builds
2021-04-09 15:00:07 +02:00
Jérôme Gardou
199adee3fe
[CRT] Add a generic C version of exp2(f) and use it for all architecture
2021-04-09 14:59:07 +02: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
Jérôme Gardou
162f51e6b8
[OLDNAMES] Add missing isascii
2021-03-17 18:52:58 +01: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
2306c83e5c
[CMAKE] Explicitly declare libcntpr as a static lib
2021-03-03 08:34:32 +01: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
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
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
Timo Kreuzer
2c791cdde7
[CRT] Remove duplicated atexit/onexit code
...
This removes the broken wine version of atexit and onexit. It keeps only dllonexit, which is implemented properly. The previous __call_atexit is moved to where the mingw onexit/atexit code is and adjusts it to work with the existing code. A call to __call_atexit is added in __tmainCRTStartup after the main function was called.
2020-11-01 09:33:14 +01:00
Jérôme Gardou
23e04ae1ee
[CMAKE] Use an INTERFACE library to perform the msvcrt <-> msvcrtex binding
2020-10-22 18:07:27 +02:00
Jérôme Gardou
ab825334dd
Apply suggestions from code review
...
Beautification and clarity
Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-10-20 21:44:54 +02:00
Jérôme Gardou
00ed72d7e8
[CMAKE] Get rid of add_compile_flags
...
Use add_compile_options and the like instead
2020-10-20 21:44:54 +02:00
Timo Kreuzer
64d7db506c
[CRT] Return from fpreset()
2020-09-20 23:08:17 +02:00
Timo Kreuzer
aff33c855d
[CRT] Use chkstk_ms.s on x64 builds
2020-09-20 23:08:17 +02:00
Serge Gautherie
a04831677e
[PROGMAN][CRT][USER32] Do not use LoadLibraryEx() NT6+ flags ( #3152 )
...
CORE-12004
2020-09-13 23:42:09 +02:00
Timo Kreuzer
3c1f6631e6
[MSVCRT] Add vista exports
2020-09-13 15:37:29 +02:00
Timo Kreuzer
dfaba507dc
[MSVCRT] Fix some architecture specific exports
2020-09-13 15:37:29 +02:00
Timo Kreuzer
2aca4b2795
[ASM] Fix boot with VS 16.7.3 / MSVC 19.27
...
See https://developercommunity.visualstudio.com/content/problem/1180800/ml-x86-assume-directive-causes-invalid-code-genera.html
2020-09-12 15:01:04 +02:00
Serge Gautherie
0b9cbc5179
[CRT] _onexit(): Fix 'memcpy()' size
...
Cherry-pick
70bff7377d
2020-06-27 14:38:21 +02:00
Serge Gautherie
4213c70e2e
[CRTDLL][CRT] Remove remnant declaration, silence cppcheck false positive.
...
* _atexit_cleanup is no longer used
* Fix cppcheck 'pointerSize' warning
2020-06-27 14:35:32 +02:00
Thomas Faber
e4066536c2
[CPPRT][CRT] Avoid extern assembly declarations with no type. CORE-17088
...
Fixes build with ML 14.26.
2020-05-28 14:26:48 +02:00
Bișoc George
d8eeb31b8a
[SDK][STDLIB][STRING] Wine-sync wcsrtombs_l and _mbstowcs_l
...
This is a partial sync of the CRT library with wcsrtombs_l and _mbstowcs_l functions from WINE. The _wctomb_s_l implementation of WINE which is used by _wctomb_s, _wctomb_l and wctomb brings failed results of the wctomb unit testcase and at the same time it crashes the whole testcase after.
Therefore I will not address the wctomb function for the moment being.
2020-05-03 15:35:11 +02:00
Bișoc George
8266f62ff6
[CRT][STDLIB] Wine-sync _mbtowc_l function code
...
The current _mbtowc_l code directly passes the string count size argument to cbMultiByte argument parameter to MultiByteToWideChar(). As the size of lpMultiByteStr expressed in bytes by cbMultiByte is dependent of the actual given string, the size of lpWideCharStr expressed in characters by cchWideChar is always 1.
The resulting parameters to MultiByteToWideChar() will lead to a failure as lpWideCharStr cannot accommodate the converted string if the size pointed by lpMultiByteStr is larger than the buffer wide string to receive the converted output, a Win32 error code of ERROR_INSUFFICIENT_BUFFER in other words. The fact that _mbtowc_l never fails without WINE Gecko package installed is because the codepage pointed by lc_codepage is CP_ACP and the converted output is directly given to the destination wide string parameter thus never calling MultiByteToWideChar(). Installing WINE Gecko merely unhides this problem.
As _mbtowc_l is imported from WINE and that they have updated their code (which at the same time this fixes the aforementioned problem), the following commit syncs the updated code from WINE.
CORE-16885
2020-04-28 22:41:57 +02:00
Mohamed Mediouni
fec11747bb
[CRT] Implement __chkstk function for ARM ( #1595 )
...
Incoming r4 contains the number of dwords to allocate, converting to bytes then return.
This makes ReactOS applications compiled for ARM running on true ARM Windows.
Reference: 2b095beace
2020-04-26 19:58:53 +03:00