RFC: Make w32api headers (effectively) self-contained

Keith Marshall <[email protected]> Mon, 12 Dec 2016 22:52:56 +0000
Newsgroups gmane.comp.gnu.mingw.devel
Organization MinGW Project
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Guys,

I've started playing with autotest, to implement unit tests for mingwrt
and w32api; (so far, I've implemented several tests for mingwrt, among
them a test group to verify self-containment of system headers).  This
is fine for mingwrt, but right now, if I invoke (say):

  $ echo '#include <winuser.h>' | mingw32-gcc -c -xc - -o /dev/null

I see a swathe of error messages, relating to undefined (custom) data
types; (winuser.h has inherent prerequisite dependencies on windef.h,
stdarg.h, and by default wingdi.h).  I don't know how Microsoft handle
this, but IMO it is just dreadfully poor software engineering; users
should not need to be concerned by such interdependencies among system
headers.

I'd like to start adding #include statements, as required, to make each
system header (effectively) self contained, and implement unit tests to
verify them.  Any reasons why I shouldn't do this?

- -- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJYTypIAAoJEMCtNsY0flo/a1gQAKYnRpZs0swYs84/mOXbNXWI
wogHlm6Cm6MdW4/k3Nx7mvrBCCFuS6pJrluL/qKKF4hdquUpFPjtwnrD6DSaycc1
C4TL7Dsm+nibzYa989y185BZK/JwEkChhoJhnxFG8woYLt41jVV2nSADgdJTgnv4
zvJKHjXbO7Tcp3BZAkhAi4jCwzxf7BSaTBUWhoQh6gL/Lv1M6WeooQID0oDIJxwG
dr8bt+0T8OakgR+SHkzkfnjj4ki19DqtHIOi+AtQ6DNDzlmyel74Q8wWSv2XtYdm
PFas3DjeE5yTgGvgpd+i/CGmfu9NPlTqmB7yYZ7LqY/1A7GqFtaFkutgFxYzYqTN
H66OA92QxYdHjneqVXDpRB3eoZMtWWDSYrmeMti+LGb2RdXloVZ4iFd23yXuEo/h
v93dagGGiPwPSe47/gxKovudXiLJzucWxqSQ5OEkxrfII9lgDcnAzw54wbRi4Wi3
+6GnacSC+53M4Xq7ccCw4wkMpzit3zRvh1FWw/ivu67Z0N5TGszjmx8tJrOZE48M
9IORR82aolBHKmOptf/8TeVQ8UNrZ/W29gwCrKEB0qOS3nago0CScjVsZCUDZVV6
gVODeVoMBvbbSgjXHU4inXT5jOjNIsxp8TIftoFpVwlTUMOHQ8TrDID9ydJsOTn8
Qzytalkbzkt+z7a9Du3E
=AA2q
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot