Q: should it work?
Shaun Jackman
sjackman@gmail.com
Mon Apr 3 14:46:00 GMT 2006
On 4/3/06, pedro_alves@portugalmail.pt <pedro_alves@portugalmail.pt> wrote:
...
> This is great, In porting Qt4 I used MSFT's headers. I planned on using mingw's
> headers, but never got into it. Currently I use a scheme like:
>
> windows.h
> ---------------
> #ifndef blabla_h
> #define blabla_h
> #include "fixmsheaders.h"
> #include_next "Windows.h"
> #endif
>
> in which the fixmsheaders.h fixed most things to have gcc eat the msfts headers.
>
> Then in applicaion, I add the sdk's include file dir as -dirafter.
...
I also use the #include_next scheme to patch header files. When the
header file I want to patch is in a standard include directory, such
as /PREFIX/include, I put a patch header in /PREFIX/sys-include,
which, believe it or not, is a included by GCC by default *before*
/PREFIX/include. My header file then uses #include_next to get the
actual header file.
I do not know for what sys-include is intended, but I've hijacked it
for this purpose, and it works very well!
Cheers,
Shaun
More information about the Newlib
mailing list