Commit Graph

219 Commits

Author SHA1 Message Date
Piotr Caban dfbfe0ee44 msvcirt/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 21:20:41 +01:00
Piotr Caban 47f79c4d17 msvcirt/tests: Fix uninitialized variable warning.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:41 +01:00
Eric Pouech df25a1924a msvcp: 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
Fabian Maurer 1ebee86f6d msvcirt/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:20 +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
Alexandre Julliard 088a787a2c makefiles: Make -mno-cygwin the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Piotr Caban 3a86f0a68f msvcp90: Remove MSVCRT_ prefix from new() and delete().
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Gijs Vermeulen 93a8798914 msvcirt: No longer prefer native.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
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 8440658494 msvcp: Remove MSVCP_ prefix from RTTI and vtable related code.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Alexandre Julliard 4ea044a6c7 msvcirt: Use --prefer-native instead of DLL_WINE_PREATTACH.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 11:40:42 +01:00
Gijs Vermeulen 4981785f0f msvcirt: Implement remainder of fstream class.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:49:09 +01:00
Francois Gouget 1a7b256f7c msvcirt/tests: Fix the spelling of a couple of ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 22:29:32 +02:00
Gijs Vermeulen d18a9b9630 msvcirt: Implement ofstream class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31342
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:35 +02:00
Gijs Vermeulen 19342f43bb msvcirt: Set error when file can't be opened in fstream_open_ctor.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-17 20:54:16 +02:00
Piotr Caban a6223249b4 msvcirt: Set error when file can't be opened in ifstream_open_ctor.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 21:09:58 +02:00
Arkadiusz Hiler a8266a9ba2 msvcirt: Implement a part of fstream.
This patch make it possible to play Tron 2.0.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Arkadiusz Hiler b3428ac9d0 msvcirt: Include iostream in strstream's and stdiostream's rtti hierarchy.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:07:25 +02:00
Arkadiusz Hiler d25e7429cc msvcirt: Implement _mtlock() and _mtunlock().
Looks like they are just cdecl wrappers around stdcall EnterCriticalSection()
and LeaveCriticalSection().

The game TRON 2.0 was crashing on the stubs. Now it makes it a bit further.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:07:25 +02:00
Arkadiusz Hiler 8749ae83c1 msvcirt: Be more obvious in out-of-memory situations.
Just like in the new ifstream, if we are out of memory it's better to fail
loudly with an obvious FIXME message than to leave user with half-initialized
object causing ephemeral issues that are hard to debug.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:41:53 +02:00
Arkadiusz Hiler ad7fa2396e msvcirt: Implement ifstream::setbuf().
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:41:49 +02:00
Arkadiusz Hiler f4bb6abebc msvcirt: Correct the behavior of filebuf::setbuf().
While implementing ifstream::setbuf() it turned out that filebuf::setbuf(),
behaves a bit different on Windows than our implementation.

It seems to reimplement streambuf::setbuf() with a very minor difference - it
doesn't ever set unbuffered to 0 and allows to change the underlying buffer as
long as the file is not opened.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:41:43 +02:00
Arkadiusz Hiler a0faee89e0 msvcirt: Implement most of ifstream.
Based on semi-stubs by Gijs Vermeulen.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22616
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30014
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 14:52:55 +02:00
Rémi Bernon e8fbc6c90b msvcirt/tests: Fix signed integral cast warning.
Assign the char field separately.

Reported by MinGW GCC 10 with -Woverflow.

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>
2020-06-04 11:58:49 +02:00
Jacek Caban acc42a9c71 msvcirt: Use __ASM_USE_THISCALL_WRAPPER macro.
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-04-27 12:50:40 +02:00
Jacek Caban fff313f183 msvcirt: Use __ASM_BLOCK_BEGIN and __ASM_BLOCK_END macros.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 22:03:16 +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
Jacek Caban 14df0183b0 makefiles: Explicitly import msvcrt in modules that need specific crt version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:32:04 +01:00
Alexandre Julliard b445b7fe7b msvcirt/tests: Fix some signed char issues.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 12:32:34 +01: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 0598c70608 msvcirt: Use the standard -mno-cygwin build flag.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 19:00:10 +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 d4ef782db7 makefiles: Build all tests with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 12:10:51 +02:00
Alexandre Julliard e79b0fd752 msvcirt: Rename clog variable to avoid conflict with builtin function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 16:46:41 +02:00
Michael Stefaniuc 1962674277 msvcirt/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-11 15:09:31 +02:00
Daniel Lehman daf0172bd9 msvcirt/tests: Add more exception tests.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-20 18:59:35 +02:00
Alexandre Julliard c28816cc37 msvcirt/tests: Silence a compiler warning.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-22 15:08:00 +01:00
Iván Matellanes 6d1901f885 msvcirt: Implement stdiostream constructors.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-23 17:31:34 +02:00
Iván Matellanes 384e74cd75 msvcirt: Add a partial implementation of class stdiostream.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-23 17:31:31 +02:00
Iván Matellanes 95018e6887 msvcirt: Implement strstream constructors.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-23 17:31:27 +02:00
Iván Matellanes 4df13fff82 msvcirt: Add a partial implementation of class strstream.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-23 17:31:24 +02:00
Iván Matellanes 44d52f2b72 msvcirt: Implement istrstream constructors.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 07:03:18 -07:00
Iván Matellanes 56c5e42109 msvcirt: Add a partial implementation of class istrstream.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 07:03:15 -07:00
Iván Matellanes 2d4e7d4050 msvcirt/tests: Add tests of ostrstream::pcount.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 07:03:11 -07:00
Iván Matellanes 96633cda3f msvcirt: Implement ostrstream constructors.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 07:03:08 -07:00
Iván Matellanes 1c1df68724 msvcirt: Add a partial implementation of class ostrstream.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 07:03:06 -07:00
Iván Matellanes 611b727386 msvcirt: Don't return negative values in in_avail and out_waiting.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 07:03:01 -07:00
Iván Matellanes 9be41b5b6b msvcirt: Implement ios::sync_with_stdio.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:38:11 +09:00
Iván Matellanes 5a2bac8d12 msvcirt: Add predefined streams.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:38:11 +09:00
Iván Matellanes 1978c7d716 msvcirt: Implement Iostream_init constructor.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:38 +09:00
Iván Matellanes 5981a3279b msvcirt: Add a partial implementation of class Iostream_init.
Signed-off-by: Iván Matellanes <matellanesivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00