On Wed, May 17, 2017 at 7:30 AM, Kai Tietz <[email protected]> wrote: > This sed command is nice, but nothing to be recommended for our users. > Driver buiding is for sure the more rare case, and most users won't be > interested in that pretty much. For those which are, this might be a > way. > > Once again, why we include by default driverspecs.h ? Is that of any > meaning, beside for people using ddk?
The reason to include driverspecs.h from specstrings.h is because the official Microsoft version does so (I thought you knew that, so maybe I'm the one who is missing something here). I'm looking into it more now. There are comments at the top of Microsoft's driverspecs.h that explain that kernelspecs.h and driverspecs.h together are used to annotate drivers. But driverspecs.h contains annotations which are "appropriate to user space code, or which might appear in headers that are shared between user space and kernel space". So it seems to be that you don't have to be a driver developer to use driverspecs.h. One example of a user-space program that uses driverspecs.h is devcon, a Microsoft command-line utility that helps install and list drivers. It uses __drv_allocatesMem in some of its source code. It lives in the Windows-driver-samples repository on GitHub but it is not a driver: https://github.com/Microsoft/Windows-driver-samples/blob/master/setup/devcon/devcon.cpp#L360 But driverspecs.h should not be the main target of concern here, since the official driverspecs.h does not define __in or __out. It only mostly just defines things with the __drv prefix. Microsoft's sal.h is the header file that (unconditionally) defines __in and __out. But I don't understand the difference between those and _In_ and _Out_, and I can only find documentation for the latter pair, so it's a bit confusing. Now that I think about it again, given that driverspecs.h does not define __in or __out, I am actually in favor of Mateusz's patch now, because it will make mingw-w64 closer to the official Windows headers. +1 for Mateusz's patch. --David Grayson ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
