01 Jul 2013



Newsletter 97


One of the last big missing pieces of building ReactOS using Visual Studio was support for C++. In ReactOS, the biggest piece of C++ code is explorer, without which users have no graphical shell when ReactOS boots up. Support for C++ requires not just a compiler capable of building C++ code, but also the presence of the standard template library. For developers where C++ was their first language, usage of the STL is fairly common and it is almost guaranteed to be linked in by default regardless of whether it is used or not. When building with GCC, the GCC bundled STL implementation was used, but this approach doesn't quite work in Visual Studio. In Visual Studio, the C Runtime and the STL are bundled together, so to link against one is to link against both. This causes massive linkage duplication with ReactOS' own C Runtime implementation, so an alternative was needed. A while back an import of the STLport library was done to provide ReactOS with an STL implementation that could be built with either GCC or VC++. That import had a few holes however, mostly involving file objects. Thomas Faber has plugged them to allow building and linking of ReactOS' C++ components, meaning that close to all of ReactOS can now be built using Microsoft's toolchain.


There was a raft of USB fixes that did not make it into 0.3.15 due to the code freeze, but many of them were due to the tag team of Johannes Anderwald and Thomas. Thomas was originally hoping to use ReactOS as part of his research thesis and started banging at the USB stack to see how it would break and break it did, in many spectacular fashions. For his test setup, Thomas used the USB passthrough of VirtualBox and had devices 'plugged in' not only after ReactOS was running but before so that during the boot process the devices would be detected. The latter configuration saw many USB bugs be discovered, which Thomas reported to Johannes with the appropriate debug log to help him narrow down and fix the problems. This approach highlights an interesting workaround to the difficulty of testing ReactOS with real hardware. USB devices are certainly real hardware but it is often difficult getting debug output off of actual computers. Testing using USB passthrough in virtual machines sidesteps this issue rather nicely while at the same time allowing ReactOS to be stress tested with the variety that is real hardware.


Support for 16bit Windows applications was one of the things the project developers considered not to be a requirement for NT5.2 compatibility so no work was ever done on NTVDM, especially in light of other more critical components. ReactOS is however an open source project, meaning we rarely turn down contributions. As such, when community member Aleksandar Andrejevic offered to attempt the implementation, the developers were perfectly willing to give him a branch to work in. So far he has managed to implement the DOS memory manager and load executables. Most programs exit immediately as there is still a lot of functionality missing and Aleksandar's next task is to deal with file I/O. The traditional "Hello World" application however does run successfully, so Aleksandar's basic implementation has at least achieved the proof of concent stage.


The concept of self-hosting means that one build something using the thing being built. For compilers, this would mean something like building GCC using GCC. For operating systems, it means building ReactOS using ReactOS as the host. ReactOS has actually already reached this stage, but a recent change in the configure.cmd script made things a tad bit more difficult. To get around the issue, Sylvain Petreolle implemented the GetLocalDateTime function for the Windows Management Instrumentation that is needed by the new version of the script. Granted one could do everything configure.cmd does by hand, but it is a very handy script to get things bootsrapped. Sylvain's work has been sent to Wine, which is from where ReactOS will get its implementation of WMI, but a few things still need to be ironed out. Once those issues are resolved, building ReactOS on ReactOS should once more be as easy as building it on Windows.

News Type: