After reading some comments on this list a little while ago in
the thread 'interesting idea to help "complete" the MingW/w32api
headers' on the mingw users mailing list, I became
curious--having been thinking about this kind of thing for a
while myself--and put GCC to work to determine what kind of
difference there is between the MinGW w32api headers and
Microsofts'. These are my prelimitary results.
Note: This e-mail will cause your computer to self-destruct 30
seconds after you close this e-mail to destroy any evidence
that may cause spurious lawsuits from silly corporations.
I used Microsoft Platform SDK, Nov 2001 ed. with minimal
GCC-compatibility modifications as my reference source to the
official Windows API. I used a vanilla unmodified
w32api-2.2.tar.gz as the w32api reference. My compiler was
the 20030208 MinGW release GCC 3.2.2 compiler using
20030104 MinGW binutils 1.13.90 and MinGW runtime 2.4.
Both lists of data were obtained from using an minimal
program containing main() and including <windows.h>.
I obtained a list of macros using gcc -g3 -E, grep '#define',
awk, and a tiny C++ program to strip function macro argument
parameter lists; the list of identifiers was obtained using
gcc -fdump-translation-unit, grep 'strg:', and awk. I used
another tiny C++ program to calculate the set difference
using the standard C++ algorithm of that name.
According to GCC, official headers define 17157 macros and
18118 identifiers. MinGW headers define 11244 macros and
10925 identifiers. MinGW defines 1161 macro names and
identifier names that Microsoft does not name at all,
and Microsoft defines 14268 identifiers and macros that
MinGW does not. Looking over the former list, I see it
includes mainly 'weird' stuff, internal header stuff,
and a few P* pointer-to-type definitions that Microsoft does
not use. Looking over the later, I see a lot of, well,
everything, but mostly stuff I have never heard of before,
plus some of Microsoft's internal header stuff. Much of it
looks like it could be important, and should be in MinGW's
w32api headers also.
It is likely there is some stuff I missed for MinGW because
it requires some other header or macro definition other than
<windows.h>, or for misc. other reasons. Also not included
are many header files which are not included from Microsoft's
Note also MinGW had some things defined as macros that
Microsoft had defined as typedefs, and vice versa.
Would someone like me to post these lists of differences
somewhere? If so, is there some freely-writable space for this?
Aaron W. LaFramboise