* [Qemu-devel] [PATCH] console: move chardev declarations to sysemu/char.h
@ 2014-06-23 7:29 Michael S. Tsirkin
2014-06-23 9:07 ` Riku Voipio
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2014-06-23 7:29 UTC (permalink / raw)
To: qemu-devel
Cc: Jan Kiszka, Riku Voipio, Michael Tokarev, Michael Roth,
Nikolay Nikolaev, Gerd Hoffmann, Anthony Liguori, Stefan Weil,
Antonios Motakis
move generic chardev APIs to sysemu/char.h, to make them available to
callers which can not depend on the whole of ui/console.h.
This fixes a build error on systems without pixman-devel:
./configure --disable-tools --disable-docs --target-list=arm-linux-user
...
pixman none
...
make
...
In file included from
/data/home/nchip/linaro/qemu/include/ui/console.h:4:0,
from /data/home/nchip/linaro/qemu/stubs/vc-init.c:2:
/data/home/nchip/linaro/qemu/include/ui/qemu-pixman.h:14:20: fatal
error: pixman.h: No such file or directory
#include <pixman.h>
^
compilation terminated.
Reported-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/sysemu/char.h | 5 +++++
include/ui/console.h | 5 -----
qemu-char.c | 1 -
stubs/vc-init.c | 2 +-
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index 3b835f6..672ed39 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -350,4 +350,9 @@ CharDriverState *qemu_chr_open_msmouse(void);
/* baum.c */
CharDriverState *chr_baum_init(void);
+/* console.c */
+typedef CharDriverState *(VcHandler)(ChardevVC *vc);
+
+void register_vc_handler(VcHandler *handler);
+CharDriverState *vc_init(ChardevVC *vc);
#endif
diff --git a/include/ui/console.h b/include/ui/console.h
index edbaa9b..845526e 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -310,11 +310,6 @@ void qemu_console_copy(QemuConsole *con, int src_x, int src_y,
DisplaySurface *qemu_console_surface(QemuConsole *con);
DisplayState *qemu_console_displaystate(QemuConsole *console);
-typedef CharDriverState *(VcHandler)(ChardevVC *vc);
-
-CharDriverState *vc_init(ChardevVC *vc);
-void register_vc_handler(VcHandler *handler);
-
/* sdl.c */
void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
diff --git a/qemu-char.c b/qemu-char.c
index a52613d..e6cbafb 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -23,7 +23,6 @@
*/
#include "qemu-common.h"
#include "monitor/monitor.h"
-#include "ui/console.h"
#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#include "sysemu/char.h"
diff --git a/stubs/vc-init.c b/stubs/vc-init.c
index 2af054f..308dfa0 100644
--- a/stubs/vc-init.c
+++ b/stubs/vc-init.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "ui/console.h"
+#include "sysemu/char.h"
CharDriverState *vc_init(ChardevVC *vc)
{
--
MST
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] console: move chardev declarations to sysemu/char.h
2014-06-23 7:29 [Qemu-devel] [PATCH] console: move chardev declarations to sysemu/char.h Michael S. Tsirkin
@ 2014-06-23 9:07 ` Riku Voipio
2014-06-23 10:34 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Riku Voipio @ 2014-06-23 9:07 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Jan Kiszka, Riku Voipio, Michael Tokarev, qemu-devel,
Nikolay Nikolaev, Michael Roth, Gerd Hoffmann, Anthony Liguori,
Stefan Weil, Antonios Motakis
On Mon, Jun 23, 2014 at 10:29:07AM +0300, Michael S. Tsirkin wrote:
> move generic chardev APIs to sysemu/char.h, to make them available to
> callers which can not depend on the whole of ui/console.h.
> This fixes a build error on systems without pixman-devel:
>
> ./configure --disable-tools --disable-docs --target-list=arm-linux-user
> ...
> pixman none
> ...
> make
> ...
> In file included from
> /data/home/nchip/linaro/qemu/include/ui/console.h:4:0,
> from /data/home/nchip/linaro/qemu/stubs/vc-init.c:2:
> /data/home/nchip/linaro/qemu/include/ui/qemu-pixman.h:14:20: fatal
> error: pixman.h: No such file or directory
> #include <pixman.h>
> ^
> compilation terminated.
This fix works for me, thanks.
Tested-by: Riku Voipio <riku.voipio@iki.fi>
> Reported-by: Riku Voipio <riku.voipio@iki.fi>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> include/sysemu/char.h | 5 +++++
> include/ui/console.h | 5 -----
> qemu-char.c | 1 -
> stubs/vc-init.c | 2 +-
> 4 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/include/sysemu/char.h b/include/sysemu/char.h
> index 3b835f6..672ed39 100644
> --- a/include/sysemu/char.h
> +++ b/include/sysemu/char.h
> @@ -350,4 +350,9 @@ CharDriverState *qemu_chr_open_msmouse(void);
> /* baum.c */
> CharDriverState *chr_baum_init(void);
>
> +/* console.c */
> +typedef CharDriverState *(VcHandler)(ChardevVC *vc);
> +
> +void register_vc_handler(VcHandler *handler);
> +CharDriverState *vc_init(ChardevVC *vc);
> #endif
> diff --git a/include/ui/console.h b/include/ui/console.h
> index edbaa9b..845526e 100644
> --- a/include/ui/console.h
> +++ b/include/ui/console.h
> @@ -310,11 +310,6 @@ void qemu_console_copy(QemuConsole *con, int src_x, int src_y,
> DisplaySurface *qemu_console_surface(QemuConsole *con);
> DisplayState *qemu_console_displaystate(QemuConsole *console);
>
> -typedef CharDriverState *(VcHandler)(ChardevVC *vc);
> -
> -CharDriverState *vc_init(ChardevVC *vc);
> -void register_vc_handler(VcHandler *handler);
> -
> /* sdl.c */
> void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
>
> diff --git a/qemu-char.c b/qemu-char.c
> index a52613d..e6cbafb 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -23,7 +23,6 @@
> */
> #include "qemu-common.h"
> #include "monitor/monitor.h"
> -#include "ui/console.h"
> #include "sysemu/sysemu.h"
> #include "qemu/timer.h"
> #include "sysemu/char.h"
> diff --git a/stubs/vc-init.c b/stubs/vc-init.c
> index 2af054f..308dfa0 100644
> --- a/stubs/vc-init.c
> +++ b/stubs/vc-init.c
> @@ -1,5 +1,5 @@
> #include "qemu-common.h"
> -#include "ui/console.h"
> +#include "sysemu/char.h"
>
> CharDriverState *vc_init(ChardevVC *vc)
> {
> --
> MST
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] console: move chardev declarations to sysemu/char.h
2014-06-23 9:07 ` Riku Voipio
@ 2014-06-23 10:34 ` Peter Maydell
0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-06-23 10:34 UTC (permalink / raw)
To: Riku Voipio
Cc: Michael S. Tsirkin, Jan Kiszka, Michael Tokarev, Michael Roth,
Nikolay Nikolaev, QEMU Developers, Gerd Hoffmann, Anthony Liguori,
Stefan Weil, Antonios Motakis
On 23 June 2014 10:07, Riku Voipio <riku.voipio@iki.fi> wrote:
> On Mon, Jun 23, 2014 at 10:29:07AM +0300, Michael S. Tsirkin wrote:
>> move generic chardev APIs to sysemu/char.h, to make them available to
>> callers which can not depend on the whole of ui/console.h.
>> This fixes a build error on systems without pixman-devel:
>>
>> ./configure --disable-tools --disable-docs --target-list=arm-linux-user
>> ...
>> pixman none
>> ...
>> make
>> ...
>> In file included from
>> /data/home/nchip/linaro/qemu/include/ui/console.h:4:0,
>> from /data/home/nchip/linaro/qemu/stubs/vc-init.c:2:
>> /data/home/nchip/linaro/qemu/include/ui/qemu-pixman.h:14:20: fatal
>> error: pixman.h: No such file or directory
>> #include <pixman.h>
>> ^
>> compilation terminated.
>
> This fix works for me, thanks.
>
> Tested-by: Riku Voipio <riku.voipio@iki.fi>
Applied to master as a buildfix; thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-23 10:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 7:29 [Qemu-devel] [PATCH] console: move chardev declarations to sysemu/char.h Michael S. Tsirkin
2014-06-23 9:07 ` Riku Voipio
2014-06-23 10:34 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).