* [Qemu-devel] [patch]Make GTK build on OS X
@ 2013-03-26 22:16 C.W. Betts
2013-03-27 8:34 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: C.W. Betts @ 2013-03-26 22:16 UTC (permalink / raw)
To: qemu-devel
This patch makes the GTK UI build on OS X by including the right headers.
From b5cc84343f479d4870961c82fc7b384637e9616c Mon Sep 17 00:00:00 2001
From: "C.W. Betts" <computers57@hotmail.com>
Date: Sun, 24 Mar 2013 11:24:05 -0600
Subject: [PATCH 1/3] Make the GTK UI build on OS X.
---
ui/gtk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 305940d..e2948d7 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -54,7 +54,12 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/wait.h>
+#ifdef __APPLE__
+#include <termios.h>
+#include <util.h>
+#else
#include <pty.h>
+#endif
#include <math.h>
#include "ui/console.h"
--
1.8.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [patch]Make GTK build on OS X
2013-03-26 22:16 [Qemu-devel] [patch]Make GTK build on OS X C.W. Betts
@ 2013-03-27 8:34 ` Paolo Bonzini
2013-03-27 18:05 ` C.W. Betts
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2013-03-27 8:34 UTC (permalink / raw)
To: C.W. Betts; +Cc: qemu-devel
Il 26/03/2013 23:16, C.W. Betts ha scritto:
> This patch makes the GTK UI build on OS X by including the right headers.
>
>
>
> From b5cc84343f479d4870961c82fc7b384637e9616c Mon Sep 17 00:00:00 2001
> From: "C.W. Betts" <computers57@hotmail.com>
> Date: Sun, 24 Mar 2013 11:24:05 -0600
> Subject: [PATCH 1/3] Make the GTK UI build on OS X.
>
> ---
> ui/gtk.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 305940d..e2948d7 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -54,7 +54,12 @@
> #include <sys/socket.h>
> #include <sys/un.h>
> #include <sys/wait.h>
> +#ifdef __APPLE__
> +#include <termios.h>
> +#include <util.h>
> +#else
> #include <pty.h>
> +#endif
> #include <math.h>
>
> #include "ui/console.h"
>
termios.h can be included unconditionally. For util.h and pty.h, there
is already similar code in qemu-char.c:
#if defined(__GLIBC__)
#include <pty.h>
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__DragonFly__)
#include <libutil.h>
#else
#include <util.h>
#endif
Please move it to include/qemu-common.h instead so that there is no
duplication.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [patch]Make GTK build on OS X
2013-03-27 8:34 ` Paolo Bonzini
@ 2013-03-27 18:05 ` C.W. Betts
2013-03-27 18:34 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: C.W. Betts @ 2013-03-27 18:05 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Mar 27, 2013, at 2:34 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 26/03/2013 23:16, C.W. Betts ha scritto:
>> This patch makes the GTK UI build on OS X by including the right headers.
>>
>>
>>
>> From b5cc84343f479d4870961c82fc7b384637e9616c Mon Sep 17 00:00:00 2001
>> From: "C.W. Betts" <computers57@hotmail.com>
>> Date: Sun, 24 Mar 2013 11:24:05 -0600
>> Subject: [PATCH 1/3] Make the GTK UI build on OS X.
>>
>> ---
>> ui/gtk.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/ui/gtk.c b/ui/gtk.c
>> index 305940d..e2948d7 100644
>> --- a/ui/gtk.c
>> +++ b/ui/gtk.c
>> @@ -54,7 +54,12 @@
>> #include <sys/socket.h>
>> #include <sys/un.h>
>> #include <sys/wait.h>
>> +#ifdef __APPLE__
>> +#include <termios.h>
>> +#include <util.h>
>> +#else
>> #include <pty.h>
>> +#endif
>> #include <math.h>
>>
>> #include "ui/console.h"
>>
>
> termios.h can be included unconditionally. For util.h and pty.h, there
> is already similar code in qemu-char.c:
the pty.h include was already there
>
> #if defined(__GLIBC__)
> #include <pty.h>
> #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
> defined(__DragonFly__)
> #include <libutil.h>
> #else
> #include <util.h>
> #endif
>
> Please move it to include/qemu-common.h instead so that there is no
> duplication.
The next patch will do this. Thank you for the feedback.
>
> Paolo
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [patch]Make GTK build on OS X
2013-03-27 18:05 ` C.W. Betts
@ 2013-03-27 18:34 ` Paolo Bonzini
2013-03-27 19:48 ` Bob Breuer
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2013-03-27 18:34 UTC (permalink / raw)
To: C.W. Betts; +Cc: qemu-devel
----- Messaggio originale -----
> Da: "C.W. Betts" <computers57@hotmail.com>
> A: "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: qemu-devel@nongnu.org
> Inviato: Mercoledì, 27 marzo 2013 19:05:46
> Oggetto: Re: [patch]Make GTK build on OS X
>
>
> On Mar 27, 2013, at 2:34 AM, Paolo Bonzini <pbonzini@redhat.com>
> wrote:
>
> > Il 26/03/2013 23:16, C.W. Betts ha scritto:
> >> This patch makes the GTK UI build on OS X by including the right
> >> headers.
> >>
> >>
> >>
> >> From b5cc84343f479d4870961c82fc7b384637e9616c Mon Sep 17 00:00:00
> >> 2001
> >> From: "C.W. Betts" <computers57@hotmail.com>
> >> Date: Sun, 24 Mar 2013 11:24:05 -0600
> >> Subject: [PATCH 1/3] Make the GTK UI build on OS X.
> >>
> >> ---
> >> ui/gtk.c | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/ui/gtk.c b/ui/gtk.c
> >> index 305940d..e2948d7 100644
> >> --- a/ui/gtk.c
> >> +++ b/ui/gtk.c
> >> @@ -54,7 +54,12 @@
> >> #include <sys/socket.h>
> >> #include <sys/un.h>
> >> #include <sys/wait.h>
> >> +#ifdef __APPLE__
> >> +#include <termios.h>
> >> +#include <util.h>
> >> +#else
> >> #include <pty.h>
> >> +#endif
> >> #include <math.h>
> >>
> >> #include "ui/console.h"
> >>
> >
> > termios.h can be included unconditionally. For util.h and pty.h,
> > there
> > is already similar code in qemu-char.c:
> the pty.h include was already there
Yes, I know. The point is that there's already an idiom to choose
between pty.h/util.h/libutil.h, and we should not introduce another.
Paolo
> >
> > #if defined(__GLIBC__)
> > #include <pty.h>
> > #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
> > defined(__DragonFly__)
> > #include <libutil.h>
> > #else
> > #include <util.h>
> > #endif
> >
> > Please move it to include/qemu-common.h instead so that there is no
> > duplication.
> The next patch will do this. Thank you for the feedback.
> >
> > Paolo
> >
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [patch]Make GTK build on OS X
2013-03-27 18:34 ` Paolo Bonzini
@ 2013-03-27 19:48 ` Bob Breuer
2013-03-28 6:21 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Bob Breuer @ 2013-03-27 19:48 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, C.W. Betts
On 3/27/2013 1:34 PM, Paolo Bonzini wrote:
>
>
> ----- Messaggio originale -----
>> Da: "C.W. Betts" <computers57@hotmail.com>
>> A: "Paolo Bonzini" <pbonzini@redhat.com>
>> Cc: qemu-devel@nongnu.org
>> Inviato: Mercoledì, 27 marzo 2013 19:05:46
>> Oggetto: Re: [patch]Make GTK build on OS X
>>
>>
>> On Mar 27, 2013, at 2:34 AM, Paolo Bonzini <pbonzini@redhat.com>
>> wrote:
>>
>>> Il 26/03/2013 23:16, C.W. Betts ha scritto:
>>>> This patch makes the GTK UI build on OS X by including the right
>>>> headers.
>>>>
>>>>
>>>>
>>>> From b5cc84343f479d4870961c82fc7b384637e9616c Mon Sep 17 00:00:00
>>>> 2001
>>>> From: "C.W. Betts" <computers57@hotmail.com>
>>>> Date: Sun, 24 Mar 2013 11:24:05 -0600
>>>> Subject: [PATCH 1/3] Make the GTK UI build on OS X.
>>>>
>>>> ---
>>>> ui/gtk.c | 5 +++++
>>>> 1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/ui/gtk.c b/ui/gtk.c
>>>> index 305940d..e2948d7 100644
>>>> --- a/ui/gtk.c
>>>> +++ b/ui/gtk.c
>>>> @@ -54,7 +54,12 @@
>>>> #include <sys/socket.h>
>>>> #include <sys/un.h>
>>>> #include <sys/wait.h>
>>>> +#ifdef __APPLE__
>>>> +#include <termios.h>
>>>> +#include <util.h>
>>>> +#else
>>>> #include <pty.h>
>>>> +#endif
>>>> #include <math.h>
>>>>
>>>> #include "ui/console.h"
>>>>
>>>
>>> termios.h can be included unconditionally. For util.h and pty.h,
>>> there
>>> is already similar code in qemu-char.c:
>> the pty.h include was already there
>
> Yes, I know. The point is that there's already an idiom to choose
> between pty.h/util.h/libutil.h, and we should not introduce another.
Note that mingw has none of those headers, so double-check the _WIN32
conditionals.
>
> Paolo
>
>>>
>>> #if defined(__GLIBC__)
>>> #include <pty.h>
>>> #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
>>> defined(__DragonFly__)
>>> #include <libutil.h>
>>> #else
>>> #include <util.h>
>>> #endif
>>>
>>> Please move it to include/qemu-common.h instead so that there is no
>>> duplication.
>> The next patch will do this. Thank you for the feedback.
>>>
>>> Paolo
>>>
>>
>>
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [patch]Make GTK build on OS X
2013-03-27 19:48 ` Bob Breuer
@ 2013-03-28 6:21 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2013-03-28 6:21 UTC (permalink / raw)
To: Bob Breuer; +Cc: C.W. Betts, qemu-devel
> > Yes, I know. The point is that there's already an idiom to choose
> > between pty.h/util.h/libutil.h, and we should not introduce
> > another.
>
> Note that mingw has none of those headers, so double-check the _WIN32
> conditionals.
Good catch. C.W., the right include file is include/sysemu/os-posix.h.
My mistake, sorry.
Paolo
> >
> > Paolo
> >
> >>>
> >>> #if defined(__GLIBC__)
> >>> #include <pty.h>
> >>> #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
> >>> defined(__DragonFly__)
> >>> #include <libutil.h>
> >>> #else
> >>> #include <util.h>
> >>> #endif
> >>>
> >>> Please move it to include/qemu-common.h instead so that there is
> >>> no
> >>> duplication.
> >> The next patch will do this. Thank you for the feedback.
> >>>
> >>> Paolo
> >>>
> >>
> >>
> >
> >
> >
> >
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-28 6:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 22:16 [Qemu-devel] [patch]Make GTK build on OS X C.W. Betts
2013-03-27 8:34 ` Paolo Bonzini
2013-03-27 18:05 ` C.W. Betts
2013-03-27 18:34 ` Paolo Bonzini
2013-03-27 19:48 ` Bob Breuer
2013-03-28 6:21 ` Paolo Bonzini
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).