This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Q: should it work?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]