[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC qom-cpu 2/4] qemu-common.h: Move fprintf_functio
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH RFC qom-cpu 2/4] qemu-common.h: Move fprintf_function to qemu-types.h |
Date: |
Tue, 18 Dec 2012 08:53:41 +0100 |
This avoids a dependency on qemu-common.h from qemu/cpu.h.
Signed-off-by: Andreas Färber <address@hidden>
---
include/qemu/cpu.h | 2 +-
qemu-common.h | 5 -----
qemu-types.h | 6 ++++++
3 Dateien geändert, 7 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-)
diff --git a/include/qemu/cpu.h b/include/qemu/cpu.h
index 5fbb3f9..d737fcd 100644
--- a/include/qemu/cpu.h
+++ b/include/qemu/cpu.h
@@ -21,7 +21,7 @@
#define QEMU_CPU_H
#include "qemu/object.h"
-#include "qemu-common.h"
+#include "qemu-types.h"
#include "qemu-thread.h"
/**
diff --git a/qemu-common.h b/qemu-common.h
index e674786..98ab78d 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -12,7 +12,6 @@
#ifndef QEMU_COMMON_H
#define QEMU_COMMON_H
-#include "compiler.h"
#include "config-host.h"
#include "qemu-types.h"
@@ -24,7 +23,6 @@
/* we put basic includes here to avoid repeating them in device drivers */
#include <stdlib.h>
-#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
#include <string.h>
@@ -95,9 +93,6 @@ struct iovec {
#include <sys/uio.h>
#endif
-typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
- GCC_FMT_ATTR(2, 3);
-
#ifdef _WIN32
#define fsync _commit
#if !defined(lseek)
diff --git a/qemu-types.h b/qemu-types.h
index fd532a2..f7a7194 100644
--- a/qemu-types.h
+++ b/qemu-types.h
@@ -1,6 +1,12 @@
#ifndef QEMU_TYPEDEFS_H
#define QEMU_TYPEDEFS_H
+#include "compiler.h"
+#include <stdio.h>
+
+typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
+ GCC_FMT_ATTR(2, 3);
+
/* A load of opaque types so that device init declarations don't have to
pull in all the real definitions. */
typedef struct QEMUTimer QEMUTimer;
--
1.7.10.4