Commit Graph

2359 Commits

Author SHA1 Message Date
Piotr Caban df60573653 msvcrt: Don't use strstr from C-library.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Piotr Caban 225dad5d0d msvcrt: Add _mbscspn_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Piotr Caban de8e6b6a28 msvcrt: Add _mbsspn_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Piotr Caban 69ea905674 msvcrt: Don't use strcspn from C-library.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Piotr Caban f65c426776 ucrtbase: Implement %G format for strftime.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Erich E. Hoover 0a89a69913 msvcrt: Fix fscanf return when EOF is immediately after an end of line.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Vijay Kiran Kamuju 679cdc4010 msvcrt: Implement %u format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Gijs Vermeulen 170ab94bde msvcrt: Add Concurrency::details::_Context::_Yield stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46279
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 21:04:11 +02:00
Piotr Caban d3675fd611 msvcrt: Return time since CRT initialization in clock function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 14:38:13 +02:00
Alexandre Julliard 2199be1c0f msvcrt: Export some functions on all architecture except i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 14:38:13 +02:00
Piotr Caban 70b3e2b0e8 msvcrt/tests: Add overlapped memory move sprintf test.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 12:31:22 +02:00
Vijay Kiran Kamuju c583c4afaa msvcrt: Implement %n and %t formats for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 12:30:59 +02:00
Felix Hädicke 90e520b418 msvcrt: Use memmove() instead of memcpy() puts_clbk_str().
memcpy() must not be used here, because results are undefined if the
memory areas overlap. This can cause problems, particularly if
particular compiler optimisations are enabled.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47918
Signed-off-by: Felix Hädicke <felixhaedicke@web.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 12:30:50 +02:00
Sven Baars f6ec5d1819 ucrtbase: Don't differentiate for 64-bit in __fpe_flt_rounds.
The previous behavior was only present on w1064v1507, and not on
any other version of Windows (both older and newer).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 23:38:39 +02:00
Vijay Kiran Kamuju 8e1435ef81 msvcrt: Implement %h format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 23:38:33 +02:00
Vijay Kiran Kamuju 0bdaecd2d7 msvcrt: Implement %e format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:06 +02:00
Martin Storsjo 56e6ce93b8 msvcrt: Fix the layout of threadlocaleinfostruct for ucrt.
In ucrt, this struct has a different layout, with only three fields
exposed in headers (which can be used by inline functions).

This fixes use of some ctype.h functions like e.g. _isdigit_l
from applications that use ucrt (both with MSVC and mingw-w64).

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 12:16:48 +02:00
Vijay Kiran Kamuju 3762402779 msvcrt: Implement %C format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 12:16:34 +02:00
Vijay Kiran Kamuju 5da8af40dd msvcrt: Implement %F format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:09 +02:00
Vijay Kiran Kamuju 1ed44b3554 msvcrt: Implement %D format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:09 +02:00
Piotr Caban 127d9932d9 msvcrt: Add wcrtomb_s tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Piotr Caban a57d67b9bc msvcrt: Add wcrtomb_s implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Vijay Kiran Kamuju 20810377ed msvcrt: Implement %R format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Piotr Caban 30913ff564 msvcrt: Don't write past buffer in strftime.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Piotr Caban 3577f06f71 msvcrt: Fix _putws implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47615
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 18:18:22 +02:00
Andrew Eikum bfe02fc747 msvcrt: Implement %T format for strftime.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 17:43:31 +02:00
Alexandre Julliard 0c853f0265 msvcrt: Move vtbl wrappers together with the other functions.
The .text directive can mess up the variable definitions.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47751
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 13:57:06 +02:00
Piotr Caban 702b1e29d5 msvcrt: Match broken multi-byte character with everything in _mbsspn.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa ab525d3f6f msvcrt: Reimplement _mbsspnp using _mbsspn.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47693
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa f0f93c791f msvcrt: Fix _mbsspn implementation.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa c62c51c04a msvcrt/tests: Add more tests for _mbsspn and _mbsspnp.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa 996cb72c8e msvcrt/tests: Restore the multibyte codepage after the tests.
N.B. _setmbcp() doesn't return the previous codepage.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Jacek Caban 0f15515cc2 mscvrt: Always provide float variants of math functions in importlib on x86.
We have them declared as inline wrappers around double variant in
math.h, but that's not enough. clang is smart enough to optimize them
back to *f variants anyway.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-26 17:41:15 +02:00
Alexandre Julliard ed6aa17d98 msvcrt: Simplify stack layout in __crtCapturePreviousContext().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 14:18:49 +02:00
Alexandre Julliard 44a6043388 ntdll: Move some exception definitions to winnt.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 13:17:37 +02:00
Jacek Caban 873a90e6f3 msvcrt: Avoid conflict with mingw __iob_func declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 18:11:16 +02:00
Jacek Caban 8445055b72 msvcrt: Export __p__iob only on i386.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 01:59:23 +02:00
Jacek Caban a0c424b111 msvcrt: Use __iob_func instead of __p__iob in __acrt_iob_func implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 01:58:36 +02:00
Jacek Caban 9246fca312 msvcr70: Provide floating point function wrappers in importlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
Martin Storsjo e38b46e7f7 msvcrt: Implement the tgamma functions.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 16:57:12 +02:00
Martin Storsjo 83a95b8fcf msvcrt: Implement the fdim functions.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 16:56:56 +02:00
Martin Storsjo dec4c99ae7 msvcrt: Provide the fmaf function on i386.
This is one of the new -f suffixed C99 math functions that actually
are available on all architectures, even on i386.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 19:12:03 +02:00
Dmitry Timoshkov 9ade30d0ce msvcrt: Fix handling of dst == src in wcscpy_s.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 20:43:37 +02:00
Dmitry Timoshkov c28af247e9 msvcrt: Add '-norelay' flag for _vsnprintf().
Otherwise for instance +relay,+msi log has msi: traces completely messed up.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 10:00:29 +02:00
Alexandre Julliard 61680b4449 winecrt0: Provide our own setjmp/longjmp functions for exception handling.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:51 +02:00
Zebediah Figura 9445bed298 ucrtbase: Write the %hh prefix as a single char.
This fixes a crash in Planet Coaster on startup.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:19:32 +02:00
Alexandre Julliard 4685e88de8 msvcrt/tests: Don't use win_skip for functions that are not exported on 64-bit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 20:20:09 +02:00
Alexandre Julliard a16ef96dc6 include/msvcrt: Add INFINITY and NAN definitions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 15:03:37 +02:00
Alexandre Julliard 030a460934 ucrtbase: Move the vsnprintf() wrapper function to the ucrtbase import library.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47250
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Andrew Eikum fa54e895a7 msvcrt: Implement fma and fmaf.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00