This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Q: should it work?
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: "pedro_alves at portugalmail dot pt" <pedro_alves at portugalmail dot pt>
- Cc: eehouse at eehouse dot org, danny dot backx at scarlet dot be, newlib at sourceware dot org, craigv at voxware dot com
- Date: Mon, 3 Apr 2006 08:11:43 -0600
- Subject: Re: Q: should it work?
- References: <1144059642.4430f6fabd7d7@webmail5.portugalmail.pt>
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
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