Commit graph

3038 commits

Author SHA1 Message Date
Torge Matthies 3a25d00108 msvcr100: Add _StructuredTaskCollection::_IsCanceling stub.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-04 23:33:23 +02:00
Torge Matthies 3b1df19cdb msvcr100: Add _StructuredTaskCollection::_Cancel stub.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-04 23:33:23 +02:00
Torge Matthies 4b5c486aae msvcr100: Add _StructuredTaskCollection::_RunAndWait stub.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-04 23:33:23 +02:00
Torge Matthies 09a6881ca2 msvcr110: Add _StructuredTaskCollection::_Schedule_loc stub.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-04 23:33:23 +02:00
Torge Matthies d31e54d61c msvcr100: Add _StructuredTaskCollection::_Schedule stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47375
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-04 23:33:23 +02:00
Torge Matthies ccde147084 msvcr120: Add _StructuredTaskCollection::_StructuredTaskCollection_dtor stub.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-04 23:33:23 +02:00
Alexandre Julliard 50aaedffc9 msvcrt: Unify the strncat_s() and wcsncat_s() implementations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-27 11:23:32 +02:00
Alexandre Julliard fdcf03fb72 msvcrt: Unify the strncpy_s() and wcsncpy_s() implementations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-27 11:23:32 +02:00
Alexandre Julliard 3514e65f26 msvcrt: Move the strncpy_s() implementation to string.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-27 11:23:32 +02:00
Akihiro Sagawa b4f20eec46 msvcrt: Avoid passing an invalid LCID to LCMapStringW.
Because it complains as follows on startup in Japanese locale:
002c:err:msvcrt:create_mbcinfo WideCharToMultiByte failed for cp 932, ret=0 (exp 196), error=122

This happens after commit c2a455a20d.

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>
2022-06-09 13:20:13 +02:00
Martin Storsjö ce4fdb1517 msvcrt: Hook up __C_specific_handler and __jump_unwind for arm.
This was set up for arm in ntdll and ucrtbase in
3ef9a04f91, but msvcrt was missed.

Also hook them up similarly in msvcr110, msvcr120 and msvcr120_app.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 20:46:49 +02:00
Piotr Caban b35faeb503 msvcrt: Reject UTF-8 locales in setlocale function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-12 22:19:20 +02:00
Jan Sikorski d5a0334b13 msvcrt: Faster memcmp().
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-26 14:45:18 +02:00
Piotr Caban 7af93f497c msvcrt: Use TICKSPERMSEC define in concurrency functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 22:15:15 +02:00
Torge Matthies 881879c658 msvcr110: Add _StructuredTaskCollection::_StructuredTaskCollection_ctor stub.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:37:56 +02:00
Alexandre Julliard 83a3a5c75b msvcrt: Fix mbcs initialization for UTF-8 codepage.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 16:03:14 +02:00
Alexandre Julliard 812ebc67a4 kernelbase: Fix IsValidLocale() and GetLocaleInfo() with special LOCALE_* identifiers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Paul Gofman cbbe8ad73a ucrtbase: Update ioinfo structure.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 17:50:57 +02:00
Paul Gofman 1c9e9ec360 msvcrt: Use newer ioinfo structure for _MSVC_VER >= 80.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 17:50:57 +02:00
Paul Gofman 4c90f58bb5 msvcr80: Fix ioinfo structure definition.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 17:50:57 +02:00
Paul Gofman 2636c9e80e msvcrt/tests: Add test for ioinfo->exflag.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 17:48:59 +02:00
Piotr Caban 2d2dba5374 msvcr100: Improve ThreadScheduler_ScheduleTask_loc stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45916
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-04 09:47:49 +02:00
Alexandre Julliard f14adf5928 msvcrt: Use EnumSystemLocalesEx instead of directly accessing kernel32 resources.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 11:02:32 +02:00
Alexandre Julliard 2c70ed249a kernelbase: Reimplement LOCALE_*CTRYNAME in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:21:28 +02:00
Alexandre Julliard 85a39a9773 kernelbase: Reimplement LOCALE_*LANGNAME in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:20:48 +02:00
Piotr Caban 746df92dba msvcr110: Make sure we don't hang in _Condition_variable::notify* functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-16 21:16:21 +01:00
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
Piotr Caban 4397d97d91 msvcrt: Print 0x prefix with %#x format in traces.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Piotr Caban 83fb79d41d msvcrt: Use %#I64x format in traces.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Eric Pouech 9b802a3d56 msvcr: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Piotr Caban a656a8b644 ucrtbase: Add support for r-value demangling in unDName.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44202
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 20:18:17 +01:00
Eric Pouech 948f465da7 msvcrt: Use correct integral type in _except1.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-04 19:42:01 +01:00
Eric Pouech 9ddcbb5f64 msvcr*: Use correct integral type in Interlocked* calls.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-04 19:42:01 +01:00
Eric Pouech 29541adafa msvcrt: Add casts to avoid 'long' types warning in locale functions.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 21:06:11 +01:00
Eric Pouech 800971f934 msvcrt: Add cast to avoid 'long' types warning in _beginthreadex.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 21:06:02 +01:00
Eric Pouech d7dad50544 msvcrt: Use correct integral types in structs.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 21:05:27 +01:00
Piotr Caban 3fbfddbd53 msvcrt: Use InitOnceExecuteOnce to allocate TLS index.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 17:19:41 +01:00
Piotr Caban 201266769d msvcrt: Don't use fegetenv in nearbyintf.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:18 +01:00
Piotr Caban 5d9d195f49 msvcrt: Don't use fegetenv in nearbyint.
The fegetenv/feupdateenv functions are broken in msvcr120 and are
causing unintentional SSE control word changes.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:18 +01:00
Piotr Caban e617fe0bda msvcrt: Don't set SSE control word in _except1.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:18 +01:00
Piotr Caban f12bcfd2ab msvcrt: Fix fmaf not to depend on rounding mode.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:18 +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 80eec636ee msvcrt: Fix Pi constants while computing acosf.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:27:16 +01:00
Piotr Caban 64c6deda5d msvcrt: Add support for demangling char{8,16,32}_t types.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:27:13 +01:00
Jacek Caban 907859d7cb msvcrt: Use __WINE_PE_BUILD in crt_gccmain.c.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52292
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-03 19:07:06 +01:00
Piotr Caban 7555573dc5 msvcrt: Fix restoring 53-bit precision mode in _control87.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52260
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 22:57:01 +01:00
Piotr Caban c521ec04c9 msvcrt: Make _setfp* helpers infallible.
The functions may only fail on unsupported compilers/architectures. It's
not really possible to handle errors properly.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-21 13:32:08 +01:00
Piotr Caban 564ede5d32 msvcrt: Don't set _EM_AMBIGOUS flag in _control87 when sse2 is not supported.
Fixes compilation warning.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-21 13:32:08 +01:00
Eric Pouech 01111b941d msvcrt: Fix double-free and memory leak in type_info destructor.
Spotted by toying with the gcc's static analyzer.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 20:44:27 +01:00
Piotr Caban 2f2891e5d5 msvcrt: Fix _strtime implementation in Hindi locale.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-13 17:58:22 +01:00