[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] std includes
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] std includes |
Date: |
Fri, 15 Jul 2011 09:55:23 +0100 |
On Thu, 2011-07-14 at 19:26 +0200, Simon Goldschmidt wrote:
> No, what I meant to say was that if you include the library files on
> top of the C file and put the "self-include" below that, you risk that
> you will be using types/defines from that library include file in your
> header file without noticing it (and that you would actually have to
> put the include into the header file, not the C file). When putting
> the "self-include" at the top, the compiler will prevent this.
>
> There's no problem with lwIP header files depending on C library
> files, but if so, the includes to the corresponding files naturally
> belong into the hear file, not into the C file,
Ah, OK - thanks for the explanation. That's a separate style point
(essentially whether header files should include other header files that
they depend on, or whether they should force the including C file to
pull in all the header files itself). I can see the advantages of both
schemes, and don't have a strong preference, but do tend towards
anything that avoids lots of #includes within header files themselves as
that quickly leads to a tangled mess of dependencies and clashes.
However, I think Bill is right that this is getting off topic.
Kieran
- Re: [lwip-users] std includes, (continued)
- Re: [lwip-users] std includes, Kieran Mansley, 2011/07/14
- Re: [lwip-users] std includes, Simon Goldschmidt, 2011/07/14
- Re: [lwip-users] std includes, Kieran Mansley, 2011/07/14
- Re: [lwip-users] std includes, Simon Goldschmidt, 2011/07/14
- Re: [lwip-users] std includes, Kieran Mansley, 2011/07/14
- Re: [lwip-users] std includes, Simon Goldschmidt, 2011/07/14
- Re: [lwip-users] std includes, Bill Auerbach, 2011/07/14
- Re: [lwip-users] std includes, Simon Goldschmidt, 2011/07/14
- Re: [lwip-users] std includes,
Kieran Mansley <=
- Re: [lwip-users] std includes, Timmy Brolin, 2011/07/14
Re: [lwip-users] std includes, timmy brolin, 2011/07/14
Re: [lwip-users] std includes, timmy brolin, 2011/07/14