Commit Graph

2997 Commits

Author SHA1 Message Date
Piotr Caban f4c88b3e9c msvcrt: Import tgammaf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-08 22:29:51 +02:00
Piotr Caban 16fa6b7846 msvcrt: Import tgamma implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-08 22:29:44 +02:00
Piotr Caban 673815e0ed msvcrt: Fix logf implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51222
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:22:20 +02:00
Piotr Caban b634fa7ca7 msvcrt: Import lgammaf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 21:10:10 +02:00
Piotr Caban 3171aa2b2d msvcrt: Import lgamma implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 21:10:10 +02:00
Piotr Caban 7e6756d0f4 msvcrt: Import log2 implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 21:10:10 +02:00
Piotr Caban 301bde60d3 msvcrt: Import log2f implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 21:10:10 +02:00
Piotr Caban b29096cce1 msvcrt: Import log10f implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 21:10:10 +02:00
Piotr Caban cef75b3b19 msvcrt: Import log10 implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:02:18 +02:00
Piotr Caban ff7faafda6 msvcrt: Import log1pf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:02:15 +02:00
Piotr Caban 2e6fa0a498 msvcrt: Import log1p implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:02:10 +02:00
Piotr Caban 51a253d25a msvcrt: Import logf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:02:05 +02:00
Piotr Caban d1ef51df42 msvcrt: Import log implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:02:02 +02:00
Piotr Caban d86207c1d7 msvcrt: Import _hypotf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-03 21:52:18 +02:00
Piotr Caban e55d341c17 msvcrt: Import _hypot implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-03 21:52:04 +02:00
Piotr Caban 411b6f5842 msvcrt: Import frexpf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-03 21:51:48 +02:00
Piotr Caban 81c58e7d49 msvcrt: Import frexp implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-03 21:50:58 +02:00
Piotr Caban b7920c3991 msvcrt: Import fma implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:08 +02:00
Piotr Caban 85da8da3d3 msvcrt: Use __scalbn helper in ldexp implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:08 +02:00
Piotr Caban bb9f97c4d1 msvcrt: Import tanhf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:52 +02:00
Piotr Caban 3171dccbef msvcrt: Import tanh implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:48 +02:00
Piotr Caban ae48d58362 msvcrt: Import sinhf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:45 +02:00
Piotr Caban 739d4f0c94 msvcrt: Import sinh implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:41 +02:00
Piotr Caban c395ec77d7 msvcrt: Import coshf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:37 +02:00
Piotr Caban b431d7515d msvcrt: Import cosh implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:32 +02:00
Piotr Caban 7d0d7690eb msvcrt: Import expm1f implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:28 +02:00
Piotr Caban 5b025c7175 msvcrt: Import expm1 implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 11:29:20 +02:00
Piotr Caban ff033db60b msvcrt: Import atanh implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Piotr Caban ed49a95d1e msvcrt: Import atanf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Piotr Caban da55a453d1 msvcrt: Import asinh implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Piotr Caban 17174db64a msvcrt: Import asinhf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Piotr Caban bc9105e238 msvcrt: Import acosh implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Piotr Caban 75537f4375 msvcrt: Import acoshf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Piotr Caban bf7244442d msvcrt: Update search position when no token was found in strtok.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Rémi Bernon 32bbef5d3e msvcrt: Set next_token when str is empty in wcstok_s.
Otherwise, when str is empty, an invalid parameter exception is raised.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Piotr Caban 5e34d17530 msvcrt: Import tanf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Piotr Caban 14a8e16a44 msvcrt: Import sinf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Piotr Caban 8321ce14ad msvcrt: Import cosf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Piotr Caban 73c0d36aa4 msvcrt: Import tan implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Piotr Caban 88dc2d0e68 msvcrt: Remove cos from unixlib.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Piotr Caban ef91a7c02c msvcrt: Import cos implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 08:55:38 +02:00
Piotr Caban ceefbb76a1 msvcrt: Import sin implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 08:55:36 +02:00
Piotr Caban 78fc19d67a msvcrt: Import _logbf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 08:55:33 +02:00
Piotr Caban 6758acbb43 msvcrt: Import _logb implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 08:55:30 +02:00
Piotr Caban 9bc856dfaf msvcrt: Import erf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 16:57:13 +02:00
Piotr Caban 7b0e5b2b69 msvcrt: Import erfc implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 16:57:09 +02:00
Piotr Caban 98525b04bc msvcrt: Import erff implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 16:57:04 +02:00
Piotr Caban de11fe6dcd msvcrt: Import erfcf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 16:57:00 +02:00
Piotr Caban b48e80a520 msvcrt: Import remainderf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 16:56:55 +02:00
Piotr Caban fd22e3b61b msvcrt: Import remainder implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 16:56:50 +02:00
Piotr Caban 8a2f7c731f msvcrt: Import remquof implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Piotr Caban c7fa467376 msvcrt: Import remquo implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Piotr Caban 29e99741d9 msvcrt: Import modff implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Piotr Caban 9984a5d661 msvcrt: Import modf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Piotr Caban bc5f28888c msvcrt: Import fmodf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Piotr Caban 2e8cfcf5b5 msvcrt: Import fmod implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Jacek Caban f013127647 msvcrt: Add sincos to importlib.
Fixes cross compilation with GCC 11, which may optimize a pair of sin(),
cos() calls to a single sincos() call, which is not exported by any
msvcrt version.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Piotr Caban f2c1872660 msvcrt: Import trunc implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban 5544e6de07 msvcrt: Import truncf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban 29c07324c1 msvcrt: Import floor implementation from musl.
The implementation is based on floorf.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban e5ddf0e8d8 msvcrt: Import floorf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban bba43bd6da msvcrt: Import ceilf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban 2a5e68ab80 msvcrt: Import ceil implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban e5d667de2f msvcrt: Import cbrt implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban 09bcc133f0 msvcrt: Import cbrtf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Piotr Caban c12ff71cdc msvcrt: Import nexttowardf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 21:01:19 +02:00
Piotr Caban ac4e675973 msvcrt: Call nextafter in nexttoward implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 21:01:15 +02:00
Piotr Caban 1dc3aa808f msvcrt: Import nextafterf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 21:01:11 +02:00
Piotr Caban f041eeab26 msvcrt: Import nextafter implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 21:01:06 +02:00
Piotr Caban 854a3cab4c msvcrt: Import neabyint implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 21:01:04 +02:00
Piotr Caban 2caca43733 msvcrt: Import neabyintf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 21:01:00 +02:00
Piotr Caban 90fd548d0a ucrtbase: Store sse and x87 exception in fexcept_t.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 20:40:53 +02:00
Piotr Caban 1b7e93c4c2 ucrtbase: Store sse and x87 status in fegetenv function family.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 20:40:53 +02:00
Piotr Caban 29cbb60f6d msvcr120: Don't modify fenv_t members in _except1.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 20:31:52 +02:00
Piotr Caban 593ddf0b66 msvcr120: Don't modify fenv_t members in math functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 20:31:48 +02:00
Piotr Caban 0f721c2f00 msvcr120: Add feraiseexcept implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 20:31:43 +02:00
Piotr Caban 06f205d078 msvcr120: Add feupdateenv implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 20:31:33 +02:00
Piotr Caban cdcfba9ad9 msvcr120: Fix setting status word in fesetenv.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 20:31:27 +02:00
Piotr Caban 0cdc52c65c msvcrt: Implement llrintf using rintf function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:36:29 +02:00
Piotr Caban 45586c5703 msvcrt: Implement llrint using rint function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:36:29 +02:00
Piotr Caban aa2248164c msvcrt: Implement lrintf using rintf function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:36:29 +02:00
Piotr Caban 0838c995ea msvcrt: Implement lrint using rint function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:36:29 +02:00
Piotr Caban ad2ecc6e06 msvcrt: Import rintf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:36:29 +02:00
Piotr Caban cba9981c47 msvcrt: Import rint implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:36:29 +02:00
Piotr Caban d5fb715536 msvcrt: Don't compile msvcr120 math functions in older versions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:33:37 +02:00
Arkadiusz Hiler 7435ca8545 msvcrt: Make UCRT _beginthread[ex]() hold the DLL reference.
MSVCRT's _beginthread[ex]() doesn't exhibit the same behavior and using
ThreadExit() does leak the reference.

FreeLibraryAndExit() has to be used because the DLL may be the only user
of the given CRT.

This fixes Baldur's Gate 3 crashing shortly after launch.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:23 +02:00
Arkadiusz Hiler 9e2fb411db msvcrt: Use trampoline for _beginthreadex().
This way we can call _endthreadex() at the end as stated in the documentation.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:23 +02:00
Arkadiusz Hiler 80678c4395 msvcrt: Make _beginthread() error out as documented.
msvcrt_set_errno() seems to be doing the right thing in case of too many
threads, invalid parameters, etc.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:23 +02:00
Arkadiusz Hiler d3ba02f35c msvcrt/tests: Add CREATE_SUSPENDED test for _beginthreadex().
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 21:33:15 +02:00
Arkadiusz Hiler a4af8bb050 msvcrt: Remove return after _endthread().
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 21:33:15 +02:00
Alexandre Julliard b35404aa61 include: Disallow wcsncpy() in Wine, similarly to strncpy().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 21:33:15 +02:00
Piotr Caban df9c11ffa8 msvcrt: Fix round implementation when 24-bit precision is used.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 21:05:46 +02:00
Piotr Caban 7a1e7cbeee msvcrt: Fix _unDName crash when demangling class function pointer.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Piotr Caban d91160835a msvcrt/tests: Cleanup datatype demangle tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Piotr Caban fd50524e1d msvcrt/tests: Remove strcmp_space helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Piotr Caban 7a1e032ee2 msvcrt/tests: Remove old versions workarounds from RTTI tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Piotr Caban d7cc3d6583 msvcrt/tests: Link to malloc/free functions in cpp tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Piotr Caban f4de92a4ed msvcrt: Import round implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban 69ad3c11cf msvcrt: Import lround implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban 7fa8b03cd3 msvcrt: Import lroundf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban 389e0532fe msvcrt: Import llround implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban 668cf2e66d msvcrt: Import llroundf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban 833e8cdd42 msvcrt: Import roundf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban 30200117d2 msvcrt: Import yn implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban 0a105999a2 msvcrt: Import jn implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:46 +02:00
Piotr Caban e10bd6f46f msvcrt: Import y1 implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Piotr Caban 3911ac3f45 msvcrt: Import j1 implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Piotr Caban 8f8fa9182a msvcrt: Import y0 implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 21:29:41 +02:00
Piotr Caban c739e22223 msvcrt: Import j0 implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 21:29:36 +02:00
Piotr Caban e9f0fc12dc msvcrt: Fix typo in asin error handling.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 21:28:55 +02:00
Michele Dionisio 8ea43f388f msvcrt: Add __stdio_common_vfprintf_p and __stdio_common_vfwprintf_p.
Signed-off-by: Michele Dionisio <michele.dionisio@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 20:08:48 +02:00
Piotr Caban 16f6a567f4 msvcrt: Add helpers for creating base class RTTI.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Lauri Kenttä 97b420224e msvcrt: Handle negative zero, infinity and nan in _ecvt and others.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50885
Signed-off-by: Lauri Kenttä <lauri.kentta@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 22:10:52 +02:00
Piotr Caban 0f7ed56852 msvcrt: Cleanup _ecvt tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 22:10:52 +02:00
Nikolay Sivov a1e47a3128 msvcrt/tests: Add a test for wcsncpy().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 20:38:52 +02:00
Alexandre Julliard 23ed647773 msvcrt: Avoid depending on the mount manager in fstat().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 10:29:54 +01:00
Rémi Bernon d5ab1401c0 msvcrt: Lazily initialize console handles.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 17:28:26 +01:00
Daniel Lehman 9fa81aab5f msvcr120: Add fegetexceptflag.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 17:22:32 +01:00
Daniel Lehman fd0c03c644 msvcr120: Add feclearexcept.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 17:22:26 +01:00
Daniel Lehman 5fd512504c msvcr120: Add fesetexceptflag.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 17:22:20 +01:00
Daniel Lehman 7981ab4fd0 msvcr120: Add fetestexcept.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 17:22:12 +01:00
Bernhard Kölbl 3dca00f1dd msvcrt: Update source pointer in wcsrtombs in C locale.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50698
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 17:56:20 +01:00
Piotr Caban 9c8f8e715f msvcrt: Improve acosf compatibility with native ucrtbase.
It reduces number of different acosf results from 5678739 to 240905.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:39:21 +01:00
Piotr Caban 0b8db61271 msvcrt: Improve asinf compatibility with native ucrtbase.
It reduces number of different asinf results from 5413834 to 639464.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Paul Gofman 611742d31f msvcrt: Ignore inherited FDs with invalid handles in msvcrt_init_io().
The process std handles should be preserved in this case.

Fixes error on startup in "Re:ZERO -Starting Life in Another World- The
Prophecy of the Throne" launcher.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 21:11:28 +01:00
Piotr Caban a6e3987e5b msvcrt: Add x87 asin implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50429
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Piotr Caban 4ae82fd007 msvcrt: Disable sse2 math functions in older versions of runtime.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Piotr Caban 0cd71776f4 msvcrt: Set mxcsr denormal flag in sqrtf if needed.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Piotr Caban e3772c917e msvcrt: Improve __libm_sse2_sqrt_precise implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 21:09:45 +01:00
Piotr Caban ba3cc1274d msvcrt: Improve sqrt accuracy and performance on i386.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 21:09:45 +01:00
Piotr Caban e53c4bd509 msvcrt: Imporve sqrt accuracy and performance on x86_64.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 21:09:45 +01:00
Piotr Caban b3fcb0f2c8 msvcr110: Copy utf16 strings in _Gettnames.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50409
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 21:09:45 +01:00
Piotr Caban 859261f480 msvcrt: Make __lc_time_data more similar to native.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 21:09:44 +01:00
Martin Storsjo fb0fa9aacf msvcrt: Fix reading BOM-less files opened with ccs=unicode.
This fixes a regression in running MSVC 2010 in wine, when reading
.def files (regressed in b0ab1b7602).

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-01-27 21:04:09 +01:00
Piotr Caban 38c4904960 msvcrt: Improve memmove performance on i386 and x86_64 architectures.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49663
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 10:28:39 +01:00
Zebediah Figura 0d1345ac2b include: Add InterlockedAnd().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:33 +01:00
Zebediah Figura 377f721362 include: Add InterlockedOr().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:23:35 +01:00
Alexandre Julliard dda104587b msvcrt: Fix some spec file discrepancies.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 17:05:55 +01:00
Alexandre Julliard 52a1737fc0 msvcrt: Implement pwctype() functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 17:04:34 +01:00
Alexandre Julliard 5131905771 msvcrt: Don't export fabsf on x86_64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 17:03:10 +01:00
Piotr Caban 560ac90ba0 msvcr100: Use LC_TIME code page when converting strftime data.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50151
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-04 14:13:04 +01:00
Jacek Caban df446b9c21 msvcrt: Use __ASM_USE_THISCALL_WRAPPER in cxx.h.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-16 15:30:06 +01:00
Jacek Caban 05806e0edb msvcrt: Use GCC-style assembly on Clang MSVC target.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-16 15:30:06 +01:00
Jacek Caban e8936e79c2 msvcrt: Prefix *rot* functions.
MSVC does not allow overriding those intrinsic functions.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-16 15:30:06 +01:00
Jacek Caban e734d72946 ucrtbase: Improve __intrinsic_abnormal_termination stub.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-16 15:30:06 +01:00
Piotr Caban 7d94c4f0e4 ntdll: Fix memchr implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50228
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 17:51:07 +01:00
Alexandre Julliard d44f543405 msvcrt: Fix _wstat() spec entry.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 16:45:45 +01:00
Piotr Caban 93cdf1ada0 msvcrt: Remove separate long double math funtions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 16:41:16 +01:00
Piotr Caban a7b9948f39 msvcrt: Use _configthreadlocale arguments definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 16:41:16 +01:00
Piotr Caban 79e950bb79 msvcrt: Remove non-needed function declarations from msvcrt.h.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 16:41:16 +01:00