Commit Graph

2314 Commits

Author SHA1 Message Date
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
Alexandre Julliard 0a79eb3608 include: Use the __thiscall attribute directly for the Mingw build.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 19:00:10 +02:00
Alexandre Julliard ee4db2005e include: Define thiscall assembly wrappers globally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 20:11:19 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Martin Storsjo 869e0a6360 msvcrt: Hook up _setjmpex for arm64 as well.
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-05-13 12:44:28 +02:00
Martin Storsjo 8582615894 msvcrt: Hook up the unprefixed logb/logbf/logbl functions for msvcr120/ucrtbase.
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-04-25 17:39:59 +02:00
Martin Storsjo fc1107382b msvcrt: Fix the fallback implementation of asinh for large negative values.
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-04-25 17:39:46 +02:00
Alexandre Julliard 52bff1fdfe msvcrt: Don't export the __p__* functions on 64-bit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:10 +02:00
Alexandre Julliard d4ef782db7 makefiles: Build all tests with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 12:10:51 +02:00
Martin Storsjo de8be4a09c msvcrt: Implement the remquo family of 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-04-11 19:29:41 +02:00
Martin Storsjo f20be3b00c msvcrt: Implement _get_environ and _get_wenviron.
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-04-11 19:29:41 +02:00
Alexandre Julliard 7b83b6b9de msvcrt/tests: Add a function pointer to bypass builtin printf().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:41 +02:00
Alexandre Julliard 9a4b596ed9 msvcrt/tests: Add some function pointers to bypass gcc builtin functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 21:01:46 +02:00
Alexandre Julliard 2e01a48440 msvcrt/tests: Use existing function pointers to call functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 21:01:46 +02:00
Alexandre Julliard b5408ff58c msvcrt: Don't set invalid std handles with kernel32.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 14:07:10 +02:00
Alexandre Julliard 9a364c1a66 msvcrt: Don't export _matherr().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:30 +02:00
Gijs Vermeulen 92ba9e7b6d msvcrt: Implement _wcsnset_s.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46902
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-02 19:21:57 +02:00
Gijs Vermeulen e49a937ae3 msvcrt/tests: Add missing return value check.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-02 19:21:45 +02:00
Alexandre Julliard b360bf81cb msvcrt: Export an import symbol for __acrt_iob_func() for compatibility with Mingw.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-02 17:15:02 +02:00
Alexandre Julliard ac38c175b5 msvcrt: Add MSVCRT_ prefix to the spawn() functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-02 11:51:56 +02:00
Piotr Caban b353ad7db8 msvcr110: Fix __crtGetShowWindowMode implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46928
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:32 +02:00
Alexandre Julliard 1f7489d493 crtdll: Share source with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:13:43 +01:00
Alexandre Julliard 4a5bff8368 msvcrt: Only add the onexit functions to the import library of msvcrt itself.
This partially reverts 0673ddf3a5.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 11:48:29 +01:00
Alexandre Julliard 62fd803e52 msvcrt: Only add __acrt_iob_func() to the import library of msvcrt itself.
This partially reverts ca50117418.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 11:41:39 +01:00
Alexandre Julliard ca50117418 msvcrt: Export the __acrt_iob_func function from the import library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 20:24:01 +01:00
Alexandre Julliard 0673ddf3a5 msvcrt: Export the onexit functions from the import library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 20:24:01 +01:00
Piotr Caban f48ea29726 msvcrt: Use _strnicmp instead of strncasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:36 +01:00
Piotr Caban 462caf8fbd msvcrt: Use _stricmp instead of strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:34 +01:00
Piotr Caban 3f675c1a9d msvcrt: Use internal toupper implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:32 +01:00
Piotr Caban 834134f284 msvcrt: Use internal tolower implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:30 +01:00
Gijs Vermeulen 3229074824 msvcr120: Add [to]wctrans.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46848
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 22:57:51 +01:00
Ken Thomases d22058d1cb msvcrt: Fix vtable alignment on macOS and certain non-x86 architectures.
On some platforms and architectures, the .align <n> directive aligns to 2^n
bytes, not n bytes.  The .balign <n> directive always aligns to n bytes.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:57 +01:00
Piotr Caban b633777ed4 msvcrt: Use correct locale when comparing strings in getenv.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:12:16 +01:00
Piotr Caban 513eb41f9a msvcrt: Correctly set _stat64.st_dev fields in _wstat64.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:12:07 +01:00
Piotr Caban 8c1684a50a msvcrt: Don't detect overflow in atol implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46845
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:10:44 +01:00
Piotr Caban 58140f73a2 msvcrt: Fix long limits in _atol_l.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:10:36 +01:00
Nikolay Sivov 8c8d8e80f5 ucrtbase: Add ilogb* functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Michael Stefaniuc cc12c0af71 msvcrt: Remove redundant not-NULL check (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:29 +01:00
Piotr Caban 79188582f0 msvcrt: Fix buffer overflow in _get_tzname.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46481
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 20:19:19 +01:00
Zebediah Figura 28e74af742 msvcr120: Add nexttoward implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45631
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 17:48:02 +01:00
Piotr Caban 35e570eb09 msvcrt: Change __getmainargs signature.
It was changed in newer versions of msvcrt/msvcrXX dlls.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:07:03 +01:00
Nikolay Sivov cebb947027 msvcrt: Add _ismbcl2().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:06:54 +01:00
Nikolay Sivov c166dfec00 msvcrt: Add _ismbcl2_l().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:06:51 +01:00
Piotr Caban 7d383d573d msvcrt: Use correct locale when validating character in _ismbcl0_l and _ismbcl1_l.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:06:44 +01:00
Piotr Caban a808235e45 msvcrt: Use mbtowc/wctomb for string conversion in printf.
This changes printf behaviour for C locale.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:06:28 +01:00
Nikolay Sivov 698b26a432 msvcrt: Add _ismbcl1().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46644
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00