Commit Graph

2958 Commits

Author SHA1 Message Date
Piotr Caban c306c527e7 msvcrt: Fix _CxxThrowException prototype.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:25:05 +02:00
Michael Stefaniuc 2d9e89a80f msvcrt/tests: Remove redundant NULL check before free().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:08 +02:00
Piotr Caban 5e3f959aed msvcrt: Simplify throw_exception helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:03:33 +02:00
Piotr Caban 1c9a30f217 msvcrt: Move improper_scheduler_detach to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:03:28 +02:00
Piotr Caban 9694fc11fe msvcrt: Move improper_scheduler_attach to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:01:00 +02:00
Piotr Caban c9189a411b msvcrt: Move invalid_scheduler_policy_thread_specification to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:00:57 +02:00
Piotr Caban a7bbdea089 msvcrt: Move invalid_scheduler_policy_value to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:00:53 +02:00
Piotr Caban 635f59f276 msvcrt: Move invalid_scheduler_policy_key to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:00:49 +02:00
Piotr Caban a8decf5c15 msvcrt: Move scheduler_resource_allocation_error to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:00:45 +02:00
Piotr Caban ef81cfb5fb msvcrt: Move improper_lock implementation to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:00:41 +02:00
Piotr Caban f6f8b30c47 msvcrt: Introduce macro for creating exception class.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:00:34 +02:00
Piotr Caban f1fa214b9f msvcrt: Rename exception::what() implementation to exception_what.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 19:00:27 +02:00
Piotr Caban ce5c989171 msvcrt: Move _Trace_ppl_function to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:44:11 +02:00
Piotr Caban 69e2467aa7 msvcrt: Move _Trace_agents function to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:44:03 +02:00
Piotr Caban 3192bb9764 msvcrt: Move lock Concurrency functions to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:43:59 +02:00
Piotr Caban eff57ac9c6 msvcrt: Rename scheduler.c file to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:43:50 +02:00
Piotr Caban 6c4cddc4f6 msvcrt: Add macro that defines type_info vtable.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:43:44 +02:00
Piotr Caban bc05707364 msvcrt: Allow specifying destructor in DEFINE_CXX_DATA macro.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:43:34 +02:00
Piotr Caban b24ee3b534 msvcrt: Use new() for allocations returning BadAlloc exception.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:43:28 +02:00
Luke Deller 6553a66ba1 msvcrt/tests: Add test for fopen/_open access hints.
Signed-off-by: Luke Deller <luke@deller.id.au>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:42:20 +02:00
Luke Deller 1ca67c8ba2 msvcrt: Translate file open access pattern hints.
Translate access pattern hints supplied to fopen / _open into the
corresponding attributes for the lower level CreateFileW call.

Signed-off-by: Luke Deller <luke@deller.id.au>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Piotr Caban 62d2693701 msvcrt: Fix x87 FPU status register assignment detection.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51568
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51579
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 11:38:33 +02:00
Piotr Caban a440e8aa8e msvcrt: Implement _fpreset on arm and aarch64.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban 0c808ff4d3 msvcrt: Use _setfp helper on all architectures.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban b28b409bb5 msvcrt: Introduce _setfp helper on arm.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban 63f3f4283f msvcrt: Introduce _setfp helper on aarch64.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban f1ef14dc17 msvcrt: Introduce _setfp helper to access floating point status and control words.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban f53b2095f3 msvcrt: Don't reset x87 in x86_64 fpreset.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban f46ef017cd msvcrt: Don't clear x87 status word x86_64 _clearfp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban ab3afe8347 msvcrt: Don't check x87 status word in x86_64 _statusfp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Piotr Caban 24fb503e2f msvcrt: Introduce _setfp_sse helper to access mxcsr register.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Martin Storsjö 8c02239619 msvcrt: Implement fesetenv for arm.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Martin Storsjö 6391a9f897 msvcrt: Implement fesetenv for arm64.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Martin Storsjö 6521134705 msvcrt: Implement _control87 for arm.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:31 +02:00
Martin Storsjö 1b6f59b5d0 msvcrt: Implement _clearfp for arm.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:31 +02:00
Martin Storsjö 70400c9368 msvcrt: Implement _statusfp for arm.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:31 +02:00
Alexandre Julliard 08e5080089 msvcrt: Remove leftover __wine_init_unix_lib() call.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Martin Storsjo 37b896db48 msvcrt: Convert double (numerically) to UINT64 via INT64, fixing pow() on arm.
If converting a negative double to an UINT64, on arm it's clipped
to zero instead of converted to its two's complement form (contrary
to x86).

This fixes cases like pow(2.0, -2.0) on arm/aarch64. Add similar
casts to expf() too which seems to have a similar pattern, even if
it's not known if that case can cause issues or not.

In the original musl source, the converttoint() function returns a
signed int32_t, doing the same double->signed->unsigned conversion,
implicitly.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo 057ecd41cc msvcrt: Fix strtof() error reporting for values out of float range.
If the values weren't out of range for the internal strtod() call,
we still must mark them as out of range when returning as float.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo 868c9ee7c9 msvcrt: Add hyperbolic functions NAN tests.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo 07ec052e54 msvcrt: Make the tanh function NAN preserving.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo 11166aa01e msvcrt: Make the sinh function NAN preserving.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo 60d178b410 msvcrt: Make the cosh function NAN preserving.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo e93e246719 msvcrt: Make the tanhf function NAN preserving.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo 4fd9daea4a msvcrt: Make the sinhf function NAN preserving.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Martin Storsjo 361143252b msvcrt: Make the coshf function NAN preserving.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Piotr Caban 2f9312fe5f msvcrt: Introduce fenv_encode helper in all runtime versions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:33 +02:00
Piotr Caban 67c7c40351 msvcrt: Don't set x87 control word in x86_64 fesetenv.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:20 +02:00
Piotr Caban 5189d73b54 msvcrt: Introduce fenv_decode helper in all runtime versions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:19 +02:00
Piotr Caban bf859348ad msvcrt: Use _MCW_RC rounding mask in fesetround and fegetround.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:14:34 +02:00