|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH] Use standard header for offsetof |
Date: | Fri, 06 Jun 2008 15:32:11 -0500 |
User-agent: | Thunderbird 2.0.0.14 (X11/20080501) |
Stefan Weil wrote:
Anthony Liguori schrieb:Stefan Weil wrote:Anthony Liguori schrieb:I don't understand why you're adding #include <stdef.h> to files that do not define offsetof. What's the rationale for that?Regards, Anthony LiguoriThere were several possible ways to replace the defines for offsetof. After removing the defines, I could 1) include stddef.h at the places where offsetof was defined formerlyThis seems like the most logically thing to do to me. Otherwise, you're unnecessarily increasing the number of #include's in C files.exec-all.h is one of these places. Adding #include <stddef.h> there reduces the number of #include statements in C sources, but now all sources which need exec-all.h also include stddef.h during compilation.So this increases the number of included headers during a compilation.
If you want to take a stab at improving the #include's in QEMU, then you should do that as a separate patch. I'll warn you though that I doubt there's a lot of people interested in that and I think there's always reservations about changing headers because it often causes subtle breakages.
Don't complicate what should be a simple patch to use the standard offset of though with other clean-ups.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |