Commit graph

89 commits

Author SHA1 Message Date
Pierre Schweitzer 38791299ca
[VFATLIB] Simplify in-memory boot sector copy.
So that, coverity is happy again.
NFC

CID 1434230, 1434233, 1434238, 1434243, 1434246, 1434272
2018-04-14 12:05:32 +02:00
Mark Jansen 9aa26b9c23
[RTL] actctx: Use the new RosGetProcessCompatVersion. 2018-04-09 19:36:09 +02:00
Mark Jansen d49004352f
[NTDLL] Check the process manifest at startup for a compatibility section. 2018-04-09 19:36:09 +02:00
Giannis Adamopoulos e195199a51 Fix build 2018-04-09 01:42:17 +03:00
Giannis Adamopoulos 8d3045622e [RTL] actctx.c: Use an alternative implicit activation context when an application is built for latest windows versions.
Instead of loading systemcompatible.manifest as the implicit activation context, load forwardcompatible.manifest
Add a new assembly containing all apisets called ReactOS.Apisets and make it a dependency to forwardcompatible.manifest
2018-04-09 01:28:43 +03:00
Mark Jansen 19912955f6
[RTL] Fixes for supportedOS close elements.
Imported from wine
f8cca44: ntdll: Allow closing tags for 'supportedOS' elements.
697d4a7: ntdll: Allow explicitly specified asm.v2 namespace for "trustInfo".
2018-04-09 00:07:31 +02:00
Mark Jansen 5100859e06
[ZLIB] Add minizip as library.
CORE-7684
2018-04-07 15:29:59 +02:00
Timo Kreuzer 6b1ca75899
[REACTOS] Fix 64 bit build (#465)
* [HAL] Simplify HalpReboot() and make it portable
* [NTOS:MM] Cast constant to PVOID
* [BINPATCH] Fix 64 bit build
* [VFDDRV] Fix 64 bit build and buffer overruns
* [USBOHCI] Fix structure alignment issues
* [ATL_APITEST] Fix 64 bit build
* [XDK] Update unwind structures in winnt.h
* [NTDLL_APITEST] Fix 64 bit build
* [NTDLL_WINETEST] Fix 64 bit build
* [TFTPD] Fix x64 build
* [USBPORT] Fix a C_ASSERT
* [DSOUND] Fix x64 build
* [HAL] Remove obsolete GetPteAddress() macro
2018-04-03 15:13:17 -06:00
Amine Khaldi 10517de5e6 [STRMBASE] Sync with Wine Staging 3.3. CORE-14434 2018-04-01 13:15:06 +01:00
Victor Perevertkin 65eabed2e1
[CRT] Fixed _tstat64 which wrongly set executable bits on files. CORE-10904
Replaced some string functions with their tchar.h analogs
2018-03-26 13:41:27 +02:00
Thomas Faber 2765bddffa
[CRT] Various fixes to Wine file functions.
Import the following Wine commits:
* ea2798f1ce9 Iván Matellanes: msvcrt: _setmode should check if file descriptor is valid.
* 9b495caacfd Carlo Bramini: msvcrt: Call SetFilePointer() with correct parameters.
* 13f34481b26 Carlo Bramini: msvcrt: Use MSVCRT_xxx macros instead of the same ones from GLIBC.
* 781b069ed81 Piotr Caban: msvcrt: Don't close HANDLE if stdout or stderr is sharing it.
2018-03-26 13:35:02 +02:00
Thomas Faber 6aa8e3cc20
[CRT] Update file descriptor handling to match Wine (7/7). CORE-14504
Import Wine commits by Piotr Caban:
* 6ed69c107f8 msvcrt: Avoid using global critical section while allocating new file descriptors.
* 725e4733cf8 msvcrt: Remove no longer needed global lock from functions using fd critical sections.
2018-03-26 13:01:00 +02:00
Thomas Faber 27b79867ea
[CRT] Update file descriptor handling to match Wine (6/7). CORE-14504
Import Wine commits by Piotr Caban:
* 417b6056877 msvcrt: Fix possible deadlock in dup2 function.
* e7fc2370885 msvcrt: Don't use fdend in create_io_inherit_block.
2018-03-26 13:00:49 +02:00
Thomas Faber 53864fcc5f
[CRT] Update file descriptor handling to match Wine (5/7). CORE-14504
Import Wine commits by Piotr Caban:
* 86baccc9ae9 msvcrt: Get rid of fdtoh helper.
* bd6eaf918c5 msvcrt: Get rid of is_valid_fd helper.
2018-03-26 13:00:39 +02:00
Thomas Faber bffd8201d0
[CRT] Update file descriptor handling to match Wine (4/7). CORE-14504
Import Wine commits by Piotr Caban:
* c7b0fb51543 msvcrt: Use fd critical section in _dup2.
* b052afd4afa msvcrt: Use fd critical section in msvcrt_free_fd.
* 16285f5700f msvcrt: Use fd critical section in read.
* 9ce2a8a60c1 msvcrt: Use fd critical section in create_io_inherit_block.
* f00b7f40584 msvcrt: Use fd critical section in _setmode.
* ba757eaec74 msvcrt: Use fd critical section in _write.
* eec7a565bec msvcrt: Don't lock __badioinfo.
2018-03-26 13:00:25 +02:00
Thomas Faber c529e727d7
[CRT] Update file descriptor handling to match Wine (3/7). CORE-14504
Import Wine commits by Piotr Caban:
* 6c2d4f1092d msvcrt: Use fd critical section in _fstat64.
* 9278190d468 msvcrt: Use fd critical section in _futime64.
2018-03-26 13:00:15 +02:00
Thomas Faber 9eb1eae28c
[CRT] Update file descriptor handling to match Wine (2/7). CORE-14504
Import Wine commits by Piotr Caban:
* 4508e665c07 msvcrt: Use fd critical section in _commit.
* afc6962a24a msvcrt: Use fd critical section in _close.
* 9a4cfbc3edc msvcrt: Use fd critical section in _eof.
* ffdd16cc0d7 msvcrt: Use fd critical section in _locking.
* fa6de597700 msvcrt: Use fd critical section in _lseeki64.
* f2f45d5fe67 msvcrt: Use fd critical section in _chsize_s.
2018-03-26 13:00:06 +02:00
Thomas Faber 25064fdf3c
[CRT] Update file descriptor handling to match Wine (1/7). CORE-14504
Import Wine commits by Piotr Caban:
* 0c4cb6ce5d4 msvcrt: Initialize file descriptor critical section.
* 1d791f5db24 msvcrt: Rename msvcrt_get_ioinfo function.
2018-03-26 12:59:58 +02:00
Hermès Bélusca-Maïto 1a31889801
[CRT] Implement the missing CRT _sc(w)printf() functions. CORE-14497 2018-03-23 22:30:18 +01:00
Hermès Bélusca-Maïto fd6e2d752d
[CRT] Fix implementation of _vsc(w)printf() for native NT. 2018-03-23 22:03:35 +01:00
Mark Jansen 2f548599a4
[SDK] Do not use a NUL file while calculating format string length
CORE-14342
2018-03-10 00:04:57 +01:00
Timo Kreuzer 0182dcd71b [PSDK][REACTOS] Fix definitions and usage of DWLP_MSGRESULT, DWLP_DLGPROC, and DWLP_USER
- Make sure the DWLP_* values are correct on _WIN64
- Don't use the DWL_* constants, they are not portable. Enforce this by removing them entirely from winuser.h
- Make sure Get/SetWindowLong*Ptr* is used and pointers are not truncated to LONG
2018-03-04 16:27:07 +01:00
Pierre Schweitzer 6ff94017e4
[VFATLIB] Fix FAT partitions formatting in a non clean fashion.
(So the fun begins)
In spite of what VFATLIB headers pretend, there's not magic in FAT boot sector.
The 3 first bytes are just the jump instruction (to the boot code). No jump, no boot.
Also, some (many?) FAT implementations rely on the jump code to help detecting that
a FAT volume is really a FAT volume. Like MS FastFAT. Or our own FAT recognizer in FS_REC.
The story is that, up to that commit, we zeroed the 3 first bytes; leading to broken
FAT volumes.
This got hidden in most cases by the fact that during setup, when we install boot
loader, we erase parts of the boot sector, including the jump instruction, making the
volume valid again. But that wouldn't fix secondary volumes where the boot loader isn't
installed.
And, also, imagine a scenario where you want to install ReactOS on a newly formatted volume
with MS FastFAT instead of our own implementation... That would simply not work to
the fact that the driver wouldn't recognize the fresh formatted volume!

(So the non fashion begins)
Fix this by putting a not that valid jump into the boot sector when formatting our
partitions. That way, our volume is always regarding a FAT view point. But, instead of
putting values that mean (nearly) nothing. We should also put a dummy bootloader
displaying the user and error message, as done by dosfstools.

(So the hope begins)
This opens the way for trying to install ReactOS with MS FastFAT (doesn't work yet).

CORE-11819
CORE-14362
2018-02-21 00:26:13 +01:00
Mark Jansen ee7f479c57
[RTL][XDK][KERNERL32_WINETEST] Import wine actctx changes from 3.2-37c98396
This adds support for reading the trustInfo (requestedExecutionLevel),
and the compatibility (supportedOs) sections.
2018-02-19 22:23:39 +01:00
Thomas Faber ad68422a7b
[IP] Silence "TCP operation failed" debug spam. 2018-02-15 12:26:35 +01:00
Hermès Bélusca-Maïto 075d58cc64
[CONUTILS] Relax the enforcement of using FORMAT_MESSAGE_MAX_WIDTH_MASK in the ConMsg* and ConResMsg* functions. 2018-02-11 18:10:08 +01:00
Serge Gautherie 44023cb7d7
[CRT:STARTUP] Fix a Clang-Cl warning about GS_ExceptionPointers
"warning: unused variable 'GS_ExceptionPointers' [-Wunused-const-variable]"
Missed in CORE-8626 r64704.

CORE-14306
2018-02-10 18:13:12 +01:00
Thomas Faber a7ef5747b5
[STRMBASE] Sync with Wine 3.0. CORE-14225 2018-02-10 17:53:05 +01:00
Thomas Faber 2d887745a7
[LIBXML2] Restore lost ROS-diff introduced in 7571d351ce. CORE-14291 CORE-11799 2018-02-08 00:41:39 +01:00
Thomas Faber fc82f8e2e3
[LIBXML2] Update to version 2.9.7. CORE-14291 2018-02-05 18:55:48 +01:00
Thomas Faber 2f8a7f36f5
[LIBMPG123] Update to version 1.25.8. CORE-14291 2018-02-05 14:40:39 +01:00
Alex Ionescu 16e0cca7e1 [RTL]: Document and flesh out Boot Status Data (BSD) API/Structures
[NDK]: Document latest RTL_BSD_DATA as of RS3 based on ext.dll WinDBG
extension "!blackboxbsd" which outputs the entire structure field by
field :).
[NDK]: Update RTL_BSD_ITEM_TYPE thanks to ole32 symbols
[RTL]: Move system volume APIs to sysvol.c
[RTL]: Fill out BsdItemTable based on actual field offsets/sizes and not
hardcoded magic numbers which we won't ask where they came from.
[RTL]: Make RtlCreateBootStatusDataFile use an appropriate structure for
initializing the buffer instead of "UCHAR Buffer[12] = {0xC,0,0,0,
1,0,0,0, 1, 0x1e, 1, 0};" which appears like magic knowledge.
[RTL]: Rename "WriteMode" to "Read" in RtlGetSetBootStatusData since
it's much less confusing.
[RTL]: Some formatting fixes, SAL updates.
2018-02-04 09:33:32 -08:00
Hermès Bélusca-Maïto ce044cf80e
[CONUTILS] Fix and improve the documentation for "outstream" and "utils", addendum to f982d77. 2018-02-02 22:19:54 +01:00
Hermès Bélusca-Maïto f982d77b8a
[CONUTILS] Diverse improvements: start doxygenating and add some resource messsage helper functions.
- Start to doxygenate the library, focusing in great details on the
  functions of the "outstream" module.
- Add a K32LoadStringEx function that expands (K32)LoadString by
  allowing a LanguageId parameter to be able to load strings from other
  languages than the current one.
- Add "ConResMsg*" helper functions to be able to (format and) print
  message strings with inserts that come *NOT* from a message table (as
  usual) *BUT* from resource string tables.
  Will be helpful for CORE-14265 in particular.

[CMD] Fix the call to ConMsgPrintfV().
2018-02-02 00:41:54 +01:00
Stanislav Motylkov 63ad8a71c0 [IPHLPAPI] Fix IcmpSendEcho output when host is not reachable
- Add missing error code to DDK/NDIS
- Fix error code in IP driver
- Patch MSAFD to reply correct WSA error code
- Fix IcmpSendEcho function
  - Fix returning error code in ICMP_ECHO_REPLY (see MSDN)
  - Fix returning host address (using GetBestInterface and GetIpAddrTable functions)
- Fix GetBestRoute function (it is used by GetBestInterface)

Relates to #318 and CORE-14241
2018-01-31 17:28:21 +00:00
Hermès Bélusca-Maïto 4e697fee2c
[CONUTILS] Split stream.c into input and output stream modules.
As code grows, this will allow for better maintenance of the console
stream code. In particular the input stream module will contain special
code for handling TTYs, and this is something not all console programs
will need. Having this code in a separate module will allow for the linker
to possibly remove this code when it is unused.
2018-01-31 02:10:41 +01:00
Hermès Bélusca-Maïto 32c875032b
[EVTLIB] Make the header C++ compatible. 2018-01-27 16:07:32 +01:00
Hermès Bélusca-Maïto e9113338c6
[CONUTILS] Fix macro definition. 2018-01-27 16:00:58 +01:00
Hermès Bélusca-Maïto 1e87e2fa9d
[CONUTILS] Make the headers C++ compatible. 2018-01-27 15:49:17 +01:00
Giannis Adamopoulos 1e903d96cb [RTL] actctx: Implement the implicit activation context 2018-01-27 02:45:50 +02:00
Amine Khaldi d7c47feb25 [FREETYPE] Bring back our diffs to reduce the stack usage in cf2_interpT2CharString(). CORE-14227 2018-01-21 13:31:05 +01:00
Serge Gautherie 63775c3215
[LWIP] dhcp.c: Cherry-pick lwIP 32aa9a4. CORE-8978
- Fix a while() check order.
2018-01-20 16:04:34 +01:00
Thomas Faber 095a4d1d23
[RTL] Handle RtlReAllocateHeap failure in com_class_add_progid. CID 1223161 2018-01-20 09:48:07 +01:00
Amine Khaldi b744385652 [FREETYPE] Update to v2.9.0 and use this as a chance to slim down our lib a bit. CORE-14220 2018-01-18 23:29:50 +01:00
Timo Kreuzer f60a9eb7a3 [RTL] Fix amd64 version of DebugService2 2018-01-01 12:09:38 +01:00
Thomas Faber 008e035b7e
[LIBS] Use KeClearEvent instead of KeResetEvent where the previous state is not needed. 2017-12-30 11:46:57 +01:00
Giannis Adamopoulos 406c31cee8 [ATL] CWindow: Add an overload of GetDlgItemText which takes a CSimpleString as parameter 2017-12-27 19:25:58 +02:00
Giannis Adamopoulos deb908b038 [ATL] -Add COMMAND_CODE_HANDLER macro 2017-12-27 19:25:58 +02:00
Mark Jansen fa3e173515 [ATL] Add CString.AllocSysString 2017-12-25 14:00:51 +01:00
Mark Jansen 6c92d5c14a [ATL] Add CComBSTR.Attach 2017-12-25 14:00:51 +01:00