From: Greg C. <chi...@co...> - 2005-09-29 15:01:46
|
On 2005-9-29 14:24 UTC, Keith MARSHALL wrote: > Angus Leeming asked: > >>Is there some macro that I can use to identify the winapi headers >>as comming from MinGW rather from Microsoft? grep doesn't turn up >>anything but of course that just means I don't know what to search >>for :) >> >>I ask because differences in the two sets of headers will need work >>arounds in user code. > > Presumably by `macro', you mean an autoconf macro? If, OTOH, "macro" means a C preprocessor macro, then I think __W32API_VERSION might be the best choice. It even allows you to distinguish different w32api releases. I think it also works for cygwin, and maybe some other platforms too; if platform must further be distinguished, test __MINGW32__ __CYGWIN__ and so on. >>grep doesn't turn up >>anything but of course that just means I don't know what to search >>for :) To find out what macros are always predefined: touch eraseme.h; /MinGW/bin/cpp -dM eraseme.h To find out what macros are defined when you include any mingw header: echo "#include <stdio.h>" > eraseme.h; /MinGW/bin/cpp -dM eraseme.h It might be useful to replace <stdio.h> with <w32api.h> in that last command, for the present purpose. |