Commit Graph

748 Commits

Author SHA1 Message Date
Piotr Caban d81afa52ec msvcrt/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 11:04:19 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Piotr Caban acc7907dc9 msvcrt: Skip small-block heap tests if _set_sbh_threshold is not available.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49181
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-19 18:31:38 +01:00
Thomas Faber be0684dad5 msvcrt/tests: Show that spawn does not require locking of fds.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:52 +01:00
Andrew Eikum 0c6bab9339 msvcrt: Better handle multiple width specifiers.
Includes feedback from David Gow <david@davidgow.net> and Piotr Caban.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 17:33:56 +01:00
Piotr Caban e38f3761f8 msvcrt: Rewrite _popen function.
Old implementation was not thread safe, incorrectly copied file
descriptors to child process and was leaking parent pipe fd to child
process.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51719
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-25 18:53:19 +02:00
Alexandre Julliard d8ed47ec21 msvcrt: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-22 11:12:09 +02:00
Piotr Caban bb637469e1 msvcrt: Don't crash on NULL in fclose.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-11 19:42:26 +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
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
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
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
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
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 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
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
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
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 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
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 4a4621f42f msvcrt/tests: Use wide-char string literals.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 21:59:39 +01:00
Piotr Caban b0ab1b7602 msvcrt: Implement opening Unicode files with no BOM in _wsopen_dispatch.
Spotted by Alistair Leslie-Hughes.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:24 +01:00
Alexandre Julliard 86b0a633c6 msvcrt/tests: Remove the headers test.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 12:36:16 +01:00
Chip Davis 5d07f809a0 ucrtbase: Sync __lc_time_data definitions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:51 +01:00
Alexandre Julliard 1f27361894 msvcrt: Avoid long double type in $I10_OUTPUT().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 13:46:26 +01:00
Will Mainio e0812be876 msvcrt/tests: Add scanf tests for dashes in scanset.
Signed-off-by: Will Mainio <will.mainio@fastmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +01:00
Paul Gofman ebe3fe536c msvcrt: Implement _mbbtype_l().
Fixes Midnight Castle Succubus.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:51 +02:00
Paul Gofman 12106c214b msvcrt: Implement _mbscmp_l().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:47 +02:00
Paul Gofman 082de781f0 msvcrt: Implement _mbsnextc_l().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:44 +02:00
Paul Gofman e6a42874a2 msvcrt/tests: Test .{O|A}CP locale string.
Used by Marvel's Avengers.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 22:07:50 +02:00
Piotr Caban 8b7eedc180 msvcrt: Fix _vs{w,n}printf_c function when terminating character doesn't fit into buffer.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Daniel Lehman 5458eea5b3 msvcrt/tests: Add tests for SpecialCasing.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:36:14 +02:00
Piotr Caban 5983fcfec9 msvcrt: Return error on invalid character in mbstowcs.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 15:20:33 +02:00
Zebediah Figura 3f5066b12e msvcrt/tests: Fix some tests on Windows 2003 and earlier.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 10:22:50 +02:00
Piotr Caban 4fe481db95 msvcrt: Add __STRINGTOLD tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Daniel Lehman ee65859b7f msvcrt: Treat large exponent as overflow in strtod.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Daniel Lehman 0945ba00fb msvcrt: Set errno in strtod.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Daniel Lehman 3f8b0891e7 msvcrt/tests: Check errno in strtod test.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Piotr Caban 841fbd5b14 msvcrt: Don't use strcmpW in wcscmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 22:31:55 +02:00
Piotr Caban 1bc6f0c861 msvcrt: Reimplement floating point numbers printing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37913
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-13 21:22:11 +02:00
Piotr Caban 855668221d msvcrt: Reset buffer in fflush on error.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:26 +02:00
Piotr Caban ab5e48f4fc msvcrt: Fix 0 parsing in parse_double helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Piotr Caban 19bff79da8 msvcrt/tests: Cleanup strtod tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Jacek Caban 22315440fc include: Use long type for __msvcrt_long when possible.
Based on patch by Chip Davis.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 09:21:53 +02:00