Patchwork [4/5] add missing inclusions of config-host.h

login
register
mail settings
Submitter Paolo Bonzini
Date April 27, 2013, 11:48 a.m.
Message ID <1367063321-19196-5-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/240109/
State New
Headers show

Comments

Paolo Bonzini - April 27, 2013, 11:48 a.m.
The next patch will add a dependency of qemu/osdep.h on config-host.h.
It could be nicer to use qemu-common.h, but I prefer to be safer this
close to hard feature freeze.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qga/channel-posix.c         | 1 +
 tests/libi2c-omap.c         | 1 +
 tests/libqtest.c            | 1 +
 tests/tcg/test-i386-fprem.c | 1 +
 tests/test-mul64.c          | 1 +
 ui/sdl_zoom.c               | 1 +
 ui/vnc.c                    | 1 +
 util/hbitmap.c              | 1 +
 8 files changed, 8 insertions(+)
Peter Maydell - April 27, 2013, 1:11 p.m.
On 27 April 2013 12:48, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The next patch will add a dependency of qemu/osdep.h on config-host.h.
> It could be nicer to use qemu-common.h, but I prefer to be safer this
> close to hard feature freeze.

Can't we just include config-host.h from osdep.h ?

-- PMM
Paolo Bonzini - April 27, 2013, 1:14 p.m.
Il 27/04/2013 15:11, Peter Maydell ha scritto:
> On 27 April 2013 12:48, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > The next patch will add a dependency of qemu/osdep.h on config-host.h.
> > It could be nicer to use qemu-common.h, but I prefer to be safer this
> > close to hard feature freeze.
> Can't we just include config-host.h from osdep.h ?

Yes, but that is also a bit more risky than I think we can afford at
this point.

Paolo
Peter Maydell - April 27, 2013, 1:19 p.m.
On 27 April 2013 14:14, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 27/04/2013 15:11, Peter Maydell ha scritto:
>> On 27 April 2013 12:48, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> > The next patch will add a dependency of qemu/osdep.h on config-host.h.
>> > It could be nicer to use qemu-common.h, but I prefer to be safer this
>> > close to hard feature freeze.
>> Can't we just include config-host.h from osdep.h ?
>
> Yes, but that is also a bit more risky than I think we can afford at
> this point.

Not sure I understand where the risk is -- all it does is
define a pile of CONFIG_* macros, right?

-- PMM
Paolo Bonzini - April 27, 2013, 9:08 p.m.
Il 27/04/2013 15:19, Peter Maydell ha scritto:
>>>> >> > The next patch will add a dependency of qemu/osdep.h on config-host.h.
>>>> >> > It could be nicer to use qemu-common.h, but I prefer to be safer this
>>>> >> > close to hard feature freeze.
>>> >> Can't we just include config-host.h from osdep.h ?
>> >
>> > Yes, but that is also a bit more risky than I think we can afford at
>> > this point.
> Not sure I understand where the risk is -- all it does is
> define a pile of CONFIG_* macros, right?

Yeah, I was unsure about triggering changes in all files that include
osdep.h, but there aren't that many actually.  Most files get it via
qemu-common.h, and qemu-common.h includes config-host.h.

Paolo

Patch

diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index e65dda3..30d978e 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -5,6 +5,7 @@ 
 #include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
+#include "config-host.h"
 #include "qemu/osdep.h"
 #include "qemu/sockets.h"
 #include "qga/channel.h"
diff --git a/tests/libi2c-omap.c b/tests/libi2c-omap.c
index c52458c..68d40f3 100644
--- a/tests/libi2c-omap.c
+++ b/tests/libi2c-omap.c
@@ -11,6 +11,7 @@ 
 #include <glib.h>
 #include <string.h>
 
+#include "config-host.h"
 #include "qemu/osdep.h"
 #include "qemu/bswap.h"
 #include "libqtest.h"
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 884f959..b40269e 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -28,6 +28,7 @@ 
 #include <unistd.h>
 #include <string.h>
 
+#include "config-host.h"
 #include "qemu/compiler.h"
 #include "qemu/osdep.h"
 
diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c
index e91fb1a..b64e842 100644
--- a/tests/tcg/test-i386-fprem.c
+++ b/tests/tcg/test-i386-fprem.c
@@ -22,6 +22,7 @@ 
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
+#include "config-host.h"
 #include "qemu/compiler.h"
 #include "qemu/osdep.h"
 #include <stdio.h>
diff --git a/tests/test-mul64.c b/tests/test-mul64.c
index a0a17f7..9a6a1ec 100644
--- a/tests/test-mul64.c
+++ b/tests/test-mul64.c
@@ -8,6 +8,7 @@ 
 
 #include <glib.h>
 #include <stdint.h>
+#include "config-host.h"
 #include "qemu/host-utils.h"
 #include "qemu/osdep.h"
 
diff --git a/ui/sdl_zoom.c b/ui/sdl_zoom.c
index 2625c45..b9b7322 100644
--- a/ui/sdl_zoom.c
+++ b/ui/sdl_zoom.c
@@ -11,6 +11,7 @@ 
  *
  */
 
+#include "config-host.h"
 #include "sdl_zoom.h"
 #include "qemu/osdep.h"
 #include <glib.h>
diff --git a/ui/vnc.c b/ui/vnc.c
index 86fe1dd..4216579 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -24,6 +24,7 @@ 
  * THE SOFTWARE.
  */
 
+#include "config-host.h"
 #include "vnc.h"
 #include "vnc-jobs.h"
 #include "sysemu/sysemu.h"
diff --git a/util/hbitmap.c b/util/hbitmap.c
index d936831..fc04d3b 100644
--- a/util/hbitmap.c
+++ b/util/hbitmap.c
@@ -9,6 +9,7 @@ 
  * later.  See the COPYING file in the top-level directory.
  */
 
+#include "config-host.h"
 #include <string.h>
 #include <glib.h>
 #include <assert.h>